diff --git a/.gitignore b/.gitignore index 98fcdbe..5133f63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ - +.idea # Created by https://www.gitignore.io/api/java,gradle,windows,osx,linux ### Java ### diff --git a/build.gradle b/build.gradle index 569d501..d6e854f 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ plugins { } group = 'org.bdware' -version = 'dev-221113' +version = 'dev-250321' java { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -26,6 +26,7 @@ def grpc_java_version = '1.71.0' def junit_version = '5.12.1' tasks.withType(JavaCompile) { + options.warnings = false options.encoding = "UTF-8" } @@ -64,12 +65,12 @@ protobuf { artifact = 'io.grpc:protoc-gen-grpc-java:' + grpc_java_version } } - generatedFilesBaseDir = "$projectDir/src" + // generatedFilesBaseDir = "$projectDir/src" generateProtoTasks { all().each { task -> task.plugins { grpc { - outputSubDir = 'java' + outputSubDir = "java" } } } diff --git a/src/main/java/com/google/api/AnnotationsProto.java b/src/main/java/com/google/api/AnnotationsProto.java deleted file mode 100644 index cb49210..0000000 --- a/src/main/java/com/google/api/AnnotationsProto.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/annotations.proto - -// Protobuf Java Version: 3.25.6 -package com.google.api; - -public final class AnnotationsProto { - private AnnotationsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - registry.add(com.google.api.AnnotationsProto.http); - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public static final int HTTP_FIELD_NUMBER = 72295728; - /** - *
- * See `HttpRule`. - *- * - *
extend .google.protobuf.MethodOptions { ... }
- */
- 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 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\025google/api/http.proto\032 google/protob" +
- "uf/descriptor.proto:E\n\004http\022\036.google.pro" +
- "tobuf.MethodOptions\030\260\312\274\" \001(\0132\024.google.ap" +
- "i.HttpRuleBn\n\016com.google.apiB\020Annotation" +
- "sProtoP\001ZAgoogle.golang.org/genproto/goo" +
- "gleapis/api/annotations;annotations\242\002\004GA" +
- "PIb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.api.HttpProto.getDescriptor(),
- com.google.protobuf.DescriptorProtos.getDescriptor(),
- });
- http.internalInit(descriptor.getExtensions().get(0));
- com.google.api.HttpProto.getDescriptor();
- com.google.protobuf.DescriptorProtos.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/com/google/api/CustomHttpPattern.java b/src/main/java/com/google/api/CustomHttpPattern.java
deleted file mode 100644
index 4ec0337..0000000
--- a/src/main/java/com/google/api/CustomHttpPattern.java
+++ /dev/null
@@ -1,742 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/api/http.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.api;
-
-/**
- * - * A custom pattern is used for defining custom HTTP verb. - *- * - * Protobuf type {@code google.api.CustomHttpPattern} - */ -public final class CustomHttpPattern extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.api.CustomHttpPattern) - CustomHttpPatternOrBuilder { -private static final long serialVersionUID = 0L; - // Use CustomHttpPattern.newBuilder() to construct. - private CustomHttpPattern(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private CustomHttpPattern() { - kind_ = ""; - path_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CustomHttpPattern(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.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; - @SuppressWarnings("serial") - private volatile java.lang.Object kind_ = ""; - /** - *
- * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @return The kind.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @return The bytes for kind.
- */
- @java.lang.Override
- 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;
- @SuppressWarnings("serial")
- private volatile java.lang.Object path_ = "";
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @return The path.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @return The bytes for path.
- */
- @java.lang.Override
- 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;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.api.CustomHttpPattern)) {
- return super.equals(obj);
- }
- com.google.api.CustomHttpPattern other = (com.google.api.CustomHttpPattern) obj;
-
- if (!getKind()
- .equals(other.getKind())) return false;
- if (!getPath()
- .equals(other.getPath())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + KIND_FIELD_NUMBER;
- hash = (53 * hash) + getKind().hashCode();
- hash = (37 * hash) + PATH_FIELD_NUMBER;
- hash = (53 * hash) + getPath().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.api.CustomHttpPattern parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.api.CustomHttpPattern parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- 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 com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.CustomHttpPattern parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.api.CustomHttpPattern parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.api.CustomHttpPattern parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.CustomHttpPattern parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- 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);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * - * A custom pattern is used for defining custom HTTP verb. - *- * - * Protobuf type {@code google.api.CustomHttpPattern} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder
- * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @return The kind.
- */
- 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;
- }
- }
- /**
- * - * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @return The bytes for kind.
- */
- 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;
- }
- }
- /**
- * - * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @param value The kind to set.
- * @return This builder for chaining.
- */
- public Builder setKind(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- kind_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- * - * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @return This builder for chaining.
- */
- public Builder clearKind() {
- kind_ = getDefaultInstance().getKind();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * - * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @param value The bytes for kind to set.
- * @return This builder for chaining.
- */
- public Builder setKindBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- kind_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object path_ = "";
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @return The path.
- */
- 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;
- }
- }
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @return The bytes for path.
- */
- 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;
- }
- }
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @param value The path to set.
- * @return This builder for chaining.
- */
- public Builder setPath(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- path_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @return This builder for chaining.
- */
- public Builder clearPath() {
- path_ = getDefaultInstance().getPath();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @param value The bytes for path to set.
- * @return This builder for chaining.
- */
- public Builder setPathBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- path_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@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- * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @return The kind.
- */
- java.lang.String getKind();
- /**
- * - * The name of this custom HTTP verb. - *- * - *
string kind = 1;
- * @return The bytes for kind.
- */
- com.google.protobuf.ByteString
- getKindBytes();
-
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @return The path.
- */
- java.lang.String getPath();
- /**
- * - * The path matched by this custom verb. - *- * - *
string path = 2;
- * @return The bytes for path.
- */
- com.google.protobuf.ByteString
- getPathBytes();
-}
diff --git a/src/main/java/com/google/api/Http.java b/src/main/java/com/google/api/Http.java
deleted file mode 100644
index b6ba42f..0000000
--- a/src/main/java/com/google/api/Http.java
+++ /dev/null
@@ -1,1013 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/api/http.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.api;
-
-/**
- * - * Defines the HTTP configuration for an API 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. - *- * - * Protobuf type {@code google.api.Http} - */ -public final class Http extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.api.Http) - HttpOrBuilder { -private static final long serialVersionUID = 0L; - // Use Http.newBuilder() to construct. - private Http(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private Http() { - rules_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Http(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Http.class, com.google.api.Http.Builder.class); - } - - public static final int RULES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List
- * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- @java.lang.Override
- public java.util.List- * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.api.HttpRuleOrBuilder>
- getRulesOrBuilderList() {
- return rules_;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- @java.lang.Override
- public int getRulesCount() {
- return rules_.size();
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- @java.lang.Override
- public com.google.api.HttpRule getRules(int index) {
- return rules_.get(index);
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- @java.lang.Override
- public com.google.api.HttpRuleOrBuilder getRulesOrBuilder(
- int index) {
- return rules_.get(index);
- }
-
- public static final int FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER = 2;
- private boolean fullyDecodeReservedExpansion_ = false;
- /**
- * - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - *- * - *
bool fully_decode_reserved_expansion = 2;
- * @return The fullyDecodeReservedExpansion.
- */
- @java.lang.Override
- public boolean getFullyDecodeReservedExpansion() {
- return fullyDecodeReservedExpansion_;
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- 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));
- }
- if (fullyDecodeReservedExpansion_ != false) {
- output.writeBool(2, fullyDecodeReservedExpansion_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- 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));
- }
- if (fullyDecodeReservedExpansion_ != false) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(2, fullyDecodeReservedExpansion_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.api.Http)) {
- return super.equals(obj);
- }
- com.google.api.Http other = (com.google.api.Http) obj;
-
- if (!getRulesList()
- .equals(other.getRulesList())) return false;
- if (getFullyDecodeReservedExpansion()
- != other.getFullyDecodeReservedExpansion()) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getRulesCount() > 0) {
- hash = (37 * hash) + RULES_FIELD_NUMBER;
- hash = (53 * hash) + getRulesList().hashCode();
- }
- hash = (37 * hash) + FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getFullyDecodeReservedExpansion());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.api.Http parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.api.Http parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- 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 com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.Http parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.api.Http parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.api.Http parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.api.Http parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.Http parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- 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);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * - * Defines the HTTP configuration for an API 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. - *- * - * Protobuf type {@code google.api.Http} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder
- * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public java.util.List- * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public int getRulesCount() {
- if (rulesBuilder_ == null) {
- return rules_.size();
- } else {
- return rulesBuilder_.getCount();
- }
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public com.google.api.HttpRule getRules(int index) {
- if (rulesBuilder_ == null) {
- return rules_.get(index);
- } else {
- return rulesBuilder_.getMessage(index);
- }
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- 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;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- 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;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- 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;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- 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;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- 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;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- 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;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- 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;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public Builder clearRules() {
- if (rulesBuilder_ == null) {
- rules_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- rulesBuilder_.clear();
- }
- return this;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public Builder removeRules(int index) {
- if (rulesBuilder_ == null) {
- ensureRulesIsMutable();
- rules_.remove(index);
- onChanged();
- } else {
- rulesBuilder_.remove(index);
- }
- return this;
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public com.google.api.HttpRule.Builder getRulesBuilder(
- int index) {
- return getRulesFieldBuilder().getBuilder(index);
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public com.google.api.HttpRuleOrBuilder getRulesOrBuilder(
- int index) {
- if (rulesBuilder_ == null) {
- return rules_.get(index); } else {
- return rulesBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public java.util.List extends com.google.api.HttpRuleOrBuilder>
- getRulesOrBuilderList() {
- if (rulesBuilder_ != null) {
- return rulesBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(rules_);
- }
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public com.google.api.HttpRule.Builder addRulesBuilder() {
- return getRulesFieldBuilder().addBuilder(
- com.google.api.HttpRule.getDefaultInstance());
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public com.google.api.HttpRule.Builder addRulesBuilder(
- int index) {
- return getRulesFieldBuilder().addBuilder(
- index, com.google.api.HttpRule.getDefaultInstance());
- }
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- public java.util.List- * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - *- * - *
bool fully_decode_reserved_expansion = 2;
- * @return The fullyDecodeReservedExpansion.
- */
- @java.lang.Override
- public boolean getFullyDecodeReservedExpansion() {
- return fullyDecodeReservedExpansion_;
- }
- /**
- * - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - *- * - *
bool fully_decode_reserved_expansion = 2;
- * @param value The fullyDecodeReservedExpansion to set.
- * @return This builder for chaining.
- */
- public Builder setFullyDecodeReservedExpansion(boolean value) {
-
- fullyDecodeReservedExpansion_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- * - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - *- * - *
bool fully_decode_reserved_expansion = 2;
- * @return This builder for chaining.
- */
- public Builder clearFullyDecodeReservedExpansion() {
- bitField0_ = (bitField0_ & ~0x00000002);
- fullyDecodeReservedExpansion_ = false;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.api.Http)
- }
-
- // @@protoc_insertion_point(class_scope:google.api.Http)
- private static final com.google.api.Http DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.api.Http();
- }
-
- public static com.google.api.Http getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser- * Message that represents an arbitrary HTTP body. It should only be used for - * payload formats that can't be represented as JSON, such as raw binary or - * an HTML page. - * - * - * This message can be used both in streaming and non-streaming API methods in - * the request as well as the response. - * - * It can be used as a top-level request field, which is convenient if one - * wants to extract parameters from either the URL or HTTP template into the - * request fields and also want access to the raw HTTP body. - * - * Example: - * - * message GetResourceRequest { - * // A unique request id. - * string request_id = 1; - * - * // The raw HTTP body is bound to this field. - * google.api.HttpBody http_body = 2; - * } - * - * service ResourceService { - * rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); - * rpc UpdateResource(google.api.HttpBody) returns - * (google.protobuf.Empty); - * } - * - * Example with streaming methods: - * - * service CaldavService { - * rpc GetCalendar(stream google.api.HttpBody) - * returns (stream google.api.HttpBody); - * rpc UpdateCalendar(stream google.api.HttpBody) - * returns (stream google.api.HttpBody); - * } - * - * Use of this type only changes how the request and response bodies are - * handled, all other features will continue to work unchanged. - *- * - * Protobuf type {@code google.api.HttpBody} - */ -public final class HttpBody extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.api.HttpBody) - HttpBodyOrBuilder { -private static final long serialVersionUID = 0L; - // Use HttpBody.newBuilder() to construct. - private HttpBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private HttpBody() { - contentType_ = ""; - data_ = com.google.protobuf.ByteString.EMPTY; - extensions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HttpBody(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpBodyProto.internal_static_google_api_HttpBody_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpBodyProto.internal_static_google_api_HttpBody_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.HttpBody.class, com.google.api.HttpBody.Builder.class); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object contentType_ = ""; - /** - *
- * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @return The contentType.
- */
- @java.lang.Override
- public java.lang.String getContentType() {
- java.lang.Object ref = contentType_;
- 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();
- contentType_ = s;
- return s;
- }
- }
- /**
- * - * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @return The bytes for contentType.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getContentTypeBytes() {
- java.lang.Object ref = contentType_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- contentType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int DATA_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * - * The HTTP request/response body as raw binary. - *- * - *
bytes data = 2;
- * @return The data.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getData() {
- return data_;
- }
-
- public static final int EXTENSIONS_FIELD_NUMBER = 3;
- @SuppressWarnings("serial")
- private java.util.List- * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- @java.lang.Override
- public java.util.List- * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- @java.lang.Override
- public java.util.List extends com.google.protobuf.AnyOrBuilder>
- getExtensionsOrBuilderList() {
- return extensions_;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- @java.lang.Override
- public int getExtensionsCount() {
- return extensions_.size();
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- @java.lang.Override
- public com.google.protobuf.Any getExtensions(int index) {
- return extensions_.get(index);
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- @java.lang.Override
- public com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder(
- int index) {
- return extensions_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contentType_);
- }
- if (!data_.isEmpty()) {
- output.writeBytes(2, data_);
- }
- for (int i = 0; i < extensions_.size(); i++) {
- output.writeMessage(3, extensions_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contentType_);
- }
- if (!data_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, data_);
- }
- for (int i = 0; i < extensions_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, extensions_.get(i));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.api.HttpBody)) {
- return super.equals(obj);
- }
- com.google.api.HttpBody other = (com.google.api.HttpBody) obj;
-
- if (!getContentType()
- .equals(other.getContentType())) return false;
- if (!getData()
- .equals(other.getData())) return false;
- if (!getExtensionsList()
- .equals(other.getExtensionsList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + getContentType().hashCode();
- hash = (37 * hash) + DATA_FIELD_NUMBER;
- hash = (53 * hash) + getData().hashCode();
- if (getExtensionsCount() > 0) {
- hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
- hash = (53 * hash) + getExtensionsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.api.HttpBody parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.api.HttpBody parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.api.HttpBody parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.api.HttpBody 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.HttpBody parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.api.HttpBody parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.api.HttpBody parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.HttpBody parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.api.HttpBody parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.api.HttpBody parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.api.HttpBody parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.HttpBody parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.api.HttpBody prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * - * Message that represents an arbitrary HTTP body. It should only be used for - * payload formats that can't be represented as JSON, such as raw binary or - * an HTML page. - * - * - * This message can be used both in streaming and non-streaming API methods in - * the request as well as the response. - * - * It can be used as a top-level request field, which is convenient if one - * wants to extract parameters from either the URL or HTTP template into the - * request fields and also want access to the raw HTTP body. - * - * Example: - * - * message GetResourceRequest { - * // A unique request id. - * string request_id = 1; - * - * // The raw HTTP body is bound to this field. - * google.api.HttpBody http_body = 2; - * } - * - * service ResourceService { - * rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); - * rpc UpdateResource(google.api.HttpBody) returns - * (google.protobuf.Empty); - * } - * - * Example with streaming methods: - * - * service CaldavService { - * rpc GetCalendar(stream google.api.HttpBody) - * returns (stream google.api.HttpBody); - * rpc UpdateCalendar(stream google.api.HttpBody) - * returns (stream google.api.HttpBody); - * } - * - * Use of this type only changes how the request and response bodies are - * handled, all other features will continue to work unchanged. - *- * - * Protobuf type {@code google.api.HttpBody} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder
- * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @return The contentType.
- */
- public java.lang.String getContentType() {
- java.lang.Object ref = contentType_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- contentType_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * - * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @return The bytes for contentType.
- */
- public com.google.protobuf.ByteString
- getContentTypeBytes() {
- java.lang.Object ref = contentType_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- contentType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * - * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @param value The contentType to set.
- * @return This builder for chaining.
- */
- public Builder setContentType(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- contentType_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- * - * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @return This builder for chaining.
- */
- public Builder clearContentType() {
- contentType_ = getDefaultInstance().getContentType();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * - * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @param value The bytes for contentType to set.
- * @return This builder for chaining.
- */
- public Builder setContentTypeBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- contentType_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * - * The HTTP request/response body as raw binary. - *- * - *
bytes data = 2;
- * @return The data.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getData() {
- return data_;
- }
- /**
- * - * The HTTP request/response body as raw binary. - *- * - *
bytes data = 2;
- * @param value The data to set.
- * @return This builder for chaining.
- */
- public Builder setData(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- data_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- * - * The HTTP request/response body as raw binary. - *- * - *
bytes data = 2;
- * @return This builder for chaining.
- */
- public Builder clearData() {
- bitField0_ = (bitField0_ & ~0x00000002);
- data_ = getDefaultInstance().getData();
- onChanged();
- return this;
- }
-
- private java.util.List- * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public java.util.List- * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public int getExtensionsCount() {
- if (extensionsBuilder_ == null) {
- return extensions_.size();
- } else {
- return extensionsBuilder_.getCount();
- }
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public com.google.protobuf.Any getExtensions(int index) {
- if (extensionsBuilder_ == null) {
- return extensions_.get(index);
- } else {
- return extensionsBuilder_.getMessage(index);
- }
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder setExtensions(
- int index, com.google.protobuf.Any value) {
- if (extensionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureExtensionsIsMutable();
- extensions_.set(index, value);
- onChanged();
- } else {
- extensionsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder setExtensions(
- int index, com.google.protobuf.Any.Builder builderForValue) {
- if (extensionsBuilder_ == null) {
- ensureExtensionsIsMutable();
- extensions_.set(index, builderForValue.build());
- onChanged();
- } else {
- extensionsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder addExtensions(com.google.protobuf.Any value) {
- if (extensionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureExtensionsIsMutable();
- extensions_.add(value);
- onChanged();
- } else {
- extensionsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder addExtensions(
- int index, com.google.protobuf.Any value) {
- if (extensionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureExtensionsIsMutable();
- extensions_.add(index, value);
- onChanged();
- } else {
- extensionsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder addExtensions(
- com.google.protobuf.Any.Builder builderForValue) {
- if (extensionsBuilder_ == null) {
- ensureExtensionsIsMutable();
- extensions_.add(builderForValue.build());
- onChanged();
- } else {
- extensionsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder addExtensions(
- int index, com.google.protobuf.Any.Builder builderForValue) {
- if (extensionsBuilder_ == null) {
- ensureExtensionsIsMutable();
- extensions_.add(index, builderForValue.build());
- onChanged();
- } else {
- extensionsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder addAllExtensions(
- java.lang.Iterable extends com.google.protobuf.Any> values) {
- if (extensionsBuilder_ == null) {
- ensureExtensionsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, extensions_);
- onChanged();
- } else {
- extensionsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder clearExtensions() {
- if (extensionsBuilder_ == null) {
- extensions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- extensionsBuilder_.clear();
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public Builder removeExtensions(int index) {
- if (extensionsBuilder_ == null) {
- ensureExtensionsIsMutable();
- extensions_.remove(index);
- onChanged();
- } else {
- extensionsBuilder_.remove(index);
- }
- return this;
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public com.google.protobuf.Any.Builder getExtensionsBuilder(
- int index) {
- return getExtensionsFieldBuilder().getBuilder(index);
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder(
- int index) {
- if (extensionsBuilder_ == null) {
- return extensions_.get(index); } else {
- return extensionsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public java.util.List extends com.google.protobuf.AnyOrBuilder>
- getExtensionsOrBuilderList() {
- if (extensionsBuilder_ != null) {
- return extensionsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(extensions_);
- }
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public com.google.protobuf.Any.Builder addExtensionsBuilder() {
- return getExtensionsFieldBuilder().addBuilder(
- com.google.protobuf.Any.getDefaultInstance());
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public com.google.protobuf.Any.Builder addExtensionsBuilder(
- int index) {
- return getExtensionsFieldBuilder().addBuilder(
- index, com.google.protobuf.Any.getDefaultInstance());
- }
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- public java.util.List- * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @return The contentType.
- */
- java.lang.String getContentType();
- /**
- * - * The HTTP Content-Type header value specifying the content type of the body. - *- * - *
string content_type = 1;
- * @return The bytes for contentType.
- */
- com.google.protobuf.ByteString
- getContentTypeBytes();
-
- /**
- * - * The HTTP request/response body as raw binary. - *- * - *
bytes data = 2;
- * @return The data.
- */
- com.google.protobuf.ByteString getData();
-
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- java.util.List- * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- com.google.protobuf.Any getExtensions(int index);
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- int getExtensionsCount();
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- java.util.List extends com.google.protobuf.AnyOrBuilder>
- getExtensionsOrBuilderList();
- /**
- * - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - *- * - *
repeated .google.protobuf.Any extensions = 3;
- */
- com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder(
- int index);
-}
diff --git a/src/main/java/com/google/api/HttpBodyProto.java b/src/main/java/com/google/api/HttpBodyProto.java
deleted file mode 100644
index d8ca3e9..0000000
--- a/src/main/java/com/google/api/HttpBodyProto.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/api/httpbody.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.api;
-
-public final class HttpBodyProto {
- private HttpBodyProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_api_HttpBody_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_api_HttpBody_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\031google/api/httpbody.proto\022\ngoogle.api\032" +
- "\031google/protobuf/any.proto\"X\n\010HttpBody\022\024" +
- "\n\014content_type\030\001 \001(\t\022\014\n\004data\030\002 \001(\014\022(\n\nex" +
- "tensions\030\003 \003(\0132\024.google.protobuf.AnyBh\n\016" +
- "com.google.apiB\rHttpBodyProtoP\001Z;google." +
- "golang.org/genproto/googleapis/api/httpb" +
- "ody;httpbody\370\001\001\242\002\004GAPIb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.AnyProto.getDescriptor(),
- });
- internal_static_google_api_HttpBody_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_api_HttpBody_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_api_HttpBody_descriptor,
- new java.lang.String[] { "ContentType", "Data", "Extensions", });
- com.google.protobuf.AnyProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/com/google/api/HttpOrBuilder.java b/src/main/java/com/google/api/HttpOrBuilder.java
deleted file mode 100644
index 1279480..0000000
--- a/src/main/java/com/google/api/HttpOrBuilder.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/api/http.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.api;
-
-public interface HttpOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.api.Http)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- java.util.List- * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- com.google.api.HttpRule getRules(int index);
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- int getRulesCount();
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- java.util.List extends com.google.api.HttpRuleOrBuilder>
- getRulesOrBuilderList();
- /**
- * - * A list of HTTP configuration rules that apply to individual API methods. - * - * **NOTE:** All service configuration rules follow "last one wins" order. - *- * - *
repeated .google.api.HttpRule rules = 1;
- */
- com.google.api.HttpRuleOrBuilder getRulesOrBuilder(
- int index);
-
- /**
- * - * When set to true, URL path parmeters will be fully URI-decoded except in - * cases of single segment matches in reserved expansion, where "%2F" will be - * left encoded. - * - * The default behavior is to not decode RFC 6570 reserved characters in multi - * segment matches. - *- * - *
bool fully_decode_reserved_expansion = 2;
- * @return The fullyDecodeReservedExpansion.
- */
- boolean getFullyDecodeReservedExpansion();
-}
diff --git a/src/main/java/com/google/api/HttpProto.java b/src/main/java/com/google/api/HttpProto.java
deleted file mode 100644
index 83f6dac..0000000
--- a/src/main/java/com/google/api/HttpProto.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/api/http.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.api;
-
-public final class HttpProto {
- private HttpProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_api_Http_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_api_Http_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_api_HttpRule_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_api_HttpRule_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_api_CustomHttpPattern_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_api_CustomHttpPattern_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\"T\n\004H" +
- "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" +
- "\022\'\n\037fully_decode_reserved_expansion\030\002 \001(" +
- "\010\"\201\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\006cus" +
- "tom\030\010 \001(\0132\035.google.api.CustomHttpPattern" +
- "H\000\022\014\n\004body\030\007 \001(\t\022\025\n\rresponse_body\030\014 \001(\t\022" +
- "1\n\023additional_bindings\030\013 \003(\0132\024.google.ap" +
- "i.HttpRuleB\t\n\007pattern\"/\n\021CustomHttpPatte" +
- "rn\022\014\n\004kind\030\001 \001(\t\022\014\n\004path\030\002 \001(\tBj\n\016com.go" +
- "ogle.apiB\tHttpProtoP\001ZAgoogle.golang.org" +
- "/genproto/googleapis/api/annotations;ann" +
- "otations\370\001\001\242\002\004GAPIb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- internal_static_google_api_Http_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_api_Http_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_api_Http_descriptor,
- new java.lang.String[] { "Rules", "FullyDecodeReservedExpansion", });
- internal_static_google_api_HttpRule_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_google_api_HttpRule_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_api_HttpRule_descriptor,
- new java.lang.String[] { "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "ResponseBody", "AdditionalBindings", "Pattern", });
- internal_static_google_api_CustomHttpPattern_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_google_api_CustomHttpPattern_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_api_CustomHttpPattern_descriptor,
- new java.lang.String[] { "Kind", "Path", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/com/google/api/HttpRule.java b/src/main/java/com/google/api/HttpRule.java
deleted file mode 100644
index 60152df..0000000
--- a/src/main/java/com/google/api/HttpRule.java
+++ /dev/null
@@ -1,3291 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/api/http.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.api;
-
-/**
- * - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * 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: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: <proto_package_name>.Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * 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: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * 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: - * - * - * 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: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * 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: - * - * 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 indicates there is no HTTP request 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. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - *- * - * Protobuf type {@code google.api.HttpRule} - */ -public final class HttpRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.api.HttpRule) - HttpRuleOrBuilder { -private static final long serialVersionUID = 0L; - // Use HttpRule.newBuilder() to construct. - private HttpRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private HttpRule() { - selector_ = ""; - body_ = ""; - responseBody_ = ""; - additionalBindings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HttpRule(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); - } - - private int patternCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object pattern_; - public enum PatternCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GET(2), - PUT(3), - POST(4), - DELETE(5), - PATCH(6), - CUSTOM(8), - PATTERN_NOT_SET(0); - private final int value; - private PatternCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PatternCase valueOf(int value) { - return forNumber(value); - } - - public static PatternCase forNumber(int value) { - switch (value) { - case 2: return GET; - case 3: return PUT; - case 4: return POST; - case 5: return DELETE; - case 6: return PATCH; - case 8: return CUSTOM; - case 0: return PATTERN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public PatternCase - getPatternCase() { - return PatternCase.forNumber( - patternCase_); - } - - public static final int SELECTOR_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object selector_ = ""; - /** - *
- * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @return The selector.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @return The bytes for selector.
- */
- @java.lang.Override
- 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;
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return Whether the get field is set.
- */
- public boolean hasGet() {
- return patternCase_ == 2;
- }
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return The get.
- */
- 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;
- }
- }
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return The bytes for get.
- */
- 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;
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return Whether the put field is set.
- */
- public boolean hasPut() {
- return patternCase_ == 3;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return The put.
- */
- 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;
- }
- }
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return The bytes for put.
- */
- 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;
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return Whether the post field is set.
- */
- public boolean hasPost() {
- return patternCase_ == 4;
- }
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return The post.
- */
- 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;
- }
- }
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return The bytes for post.
- */
- 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;
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return Whether the delete field is set.
- */
- public boolean hasDelete() {
- return patternCase_ == 5;
- }
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return The delete.
- */
- 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;
- }
- }
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return The bytes for delete.
- */
- 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;
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return Whether the patch field is set.
- */
- public boolean hasPatch() {
- return patternCase_ == 6;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return The patch.
- */
- 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;
- }
- }
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return The bytes for patch.
- */
- 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;
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- * @return Whether the custom field is set.
- */
- @java.lang.Override
- public boolean hasCustom() {
- return patternCase_ == 8;
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- * @return The custom.
- */
- @java.lang.Override
- public com.google.api.CustomHttpPattern getCustom() {
- if (patternCase_ == 8) {
- return (com.google.api.CustomHttpPattern) pattern_;
- }
- return com.google.api.CustomHttpPattern.getDefaultInstance();
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- @java.lang.Override
- 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;
- @SuppressWarnings("serial")
- private volatile java.lang.Object body_ = "";
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @return The body.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @return The bytes for body.
- */
- @java.lang.Override
- 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 RESPONSE_BODY_FIELD_NUMBER = 12;
- @SuppressWarnings("serial")
- private volatile java.lang.Object responseBody_ = "";
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @return The responseBody.
- */
- @java.lang.Override
- public java.lang.String getResponseBody() {
- java.lang.Object ref = responseBody_;
- 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();
- responseBody_ = s;
- return s;
- }
- }
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @return The bytes for responseBody.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getResponseBodyBytes() {
- java.lang.Object ref = responseBody_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- responseBody_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ADDITIONAL_BINDINGS_FIELD_NUMBER = 11;
- @SuppressWarnings("serial")
- private java.util.List- * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- @java.lang.Override
- public java.util.List- * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- @java.lang.Override
- public java.util.List extends com.google.api.HttpRuleOrBuilder>
- getAdditionalBindingsOrBuilderList() {
- return additionalBindings_;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- @java.lang.Override
- public int getAdditionalBindingsCount() {
- return additionalBindings_.size();
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- @java.lang.Override
- public com.google.api.HttpRule getAdditionalBindings(int index) {
- return additionalBindings_.get(index);
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- @java.lang.Override
- public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(
- int index) {
- return additionalBindings_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_);
- }
- if (patternCase_ == 2) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pattern_);
- }
- if (patternCase_ == 3) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pattern_);
- }
- if (patternCase_ == 4) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pattern_);
- }
- if (patternCase_ == 5) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pattern_);
- }
- if (patternCase_ == 6) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pattern_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 7, body_);
- }
- if (patternCase_ == 8) {
- output.writeMessage(8, (com.google.api.CustomHttpPattern) pattern_);
- }
- for (int i = 0; i < additionalBindings_.size(); i++) {
- output.writeMessage(11, additionalBindings_.get(i));
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseBody_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 12, responseBody_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_);
- }
- if (patternCase_ == 2) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pattern_);
- }
- if (patternCase_ == 3) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pattern_);
- }
- if (patternCase_ == 4) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pattern_);
- }
- if (patternCase_ == 5) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pattern_);
- }
- if (patternCase_ == 6) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pattern_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, body_);
- }
- if (patternCase_ == 8) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(8, (com.google.api.CustomHttpPattern) pattern_);
- }
- for (int i = 0; i < additionalBindings_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(11, additionalBindings_.get(i));
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseBody_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, responseBody_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.api.HttpRule)) {
- return super.equals(obj);
- }
- com.google.api.HttpRule other = (com.google.api.HttpRule) obj;
-
- if (!getSelector()
- .equals(other.getSelector())) return false;
- if (!getBody()
- .equals(other.getBody())) return false;
- if (!getResponseBody()
- .equals(other.getResponseBody())) return false;
- if (!getAdditionalBindingsList()
- .equals(other.getAdditionalBindingsList())) return false;
- if (!getPatternCase().equals(other.getPatternCase())) return false;
- switch (patternCase_) {
- case 2:
- if (!getGet()
- .equals(other.getGet())) return false;
- break;
- case 3:
- if (!getPut()
- .equals(other.getPut())) return false;
- break;
- case 4:
- if (!getPost()
- .equals(other.getPost())) return false;
- break;
- case 5:
- if (!getDelete()
- .equals(other.getDelete())) return false;
- break;
- case 6:
- if (!getPatch()
- .equals(other.getPatch())) return false;
- break;
- case 8:
- if (!getCustom()
- .equals(other.getCustom())) return false;
- break;
- case 0:
- default:
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
- hash = (53 * hash) + getSelector().hashCode();
- hash = (37 * hash) + BODY_FIELD_NUMBER;
- hash = (53 * hash) + getBody().hashCode();
- hash = (37 * hash) + RESPONSE_BODY_FIELD_NUMBER;
- hash = (53 * hash) + getResponseBody().hashCode();
- if (getAdditionalBindingsCount() > 0) {
- hash = (37 * hash) + ADDITIONAL_BINDINGS_FIELD_NUMBER;
- hash = (53 * hash) + getAdditionalBindingsList().hashCode();
- }
- switch (patternCase_) {
- case 2:
- hash = (37 * hash) + GET_FIELD_NUMBER;
- hash = (53 * hash) + getGet().hashCode();
- break;
- case 3:
- hash = (37 * hash) + PUT_FIELD_NUMBER;
- hash = (53 * hash) + getPut().hashCode();
- break;
- case 4:
- hash = (37 * hash) + POST_FIELD_NUMBER;
- hash = (53 * hash) + getPost().hashCode();
- break;
- case 5:
- hash = (37 * hash) + DELETE_FIELD_NUMBER;
- hash = (53 * hash) + getDelete().hashCode();
- break;
- case 6:
- hash = (37 * hash) + PATCH_FIELD_NUMBER;
- hash = (53 * hash) + getPatch().hashCode();
- break;
- case 8:
- hash = (37 * hash) + CUSTOM_FIELD_NUMBER;
- hash = (53 * hash) + getCustom().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.api.HttpRule parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.api.HttpRule parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- 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 com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.HttpRule parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.api.HttpRule parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.api.HttpRule parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.api.HttpRule parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.api.HttpRule parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- 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);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * - * `HttpRule` defines the mapping of an RPC method to one or more HTTP - * REST API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and - * HTTP request body. The mapping is typically specified as an - * `google.api.http` annotation on the RPC method, - * 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: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * SubMessage sub = 2; // `sub.subfield` is url-mapped - * } - * message Message { - * string text = 1; // content of the resource - * } - * - * The same http annotation can alternatively be expressed inside the - * `GRPC API Configuration` YAML file. - * - * http: - * rules: - * - selector: <proto_package_name>.Messaging.GetMessage - * get: /v1/messages/{message_id}/{sub.subfield} - * - * This definition enables an automatic, bidrectional mapping of HTTP - * JSON to RPC. Example: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` - * - * 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: - * - * - * service Messaging { - * rpc GetMessage(GetMessageRequest) returns (Message) { - * option (google.api.http).get = "/v1/messages/{message_id}"; - * } - * } - * message GetMessageRequest { - * message SubMessage { - * string subfield = 1; - * } - * string message_id = 1; // mapped to the URL - * int64 revision = 2; // becomes a parameter - * SubMessage sub = 3; // `sub.subfield` becomes a parameter - * } - * - * - * This enables a HTTP JSON to RPC mapping as below: - * - * HTTP | RPC - * -----|----- - * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - * - * 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: - * - * - * 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: - * - * service Messaging { - * rpc UpdateMessage(Message) returns (Message) { - * option (google.api.http) = { - * put: "/v1/messages/{message_id}" - * body: "*" - * }; - * } - * } - * message Message { - * string message_id = 1; - * 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: - * - * 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 indicates there is no HTTP request 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. The syntax `**` matches zero - * or more path segments, which must be the last part of the path except the - * `Verb`. The syntax `LITERAL` matches literal text in the path. - * - * The syntax `Variable` matches part of the URL path as specified by its - * template. A variable template must not contain other variables. If a variable - * matches a single path segment, its template may be omitted, e.g. `{var}` - * is equivalent to `{var=*}`. - * - * If a variable contains exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, all characters - * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the - * Discovery Document as `{var}`. - * - * If a variable contains one or more path segments, such as `"{var=foo/*}"` - * or `"{var=**}"`, when such a variable is expanded into a URL path, all - * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{+var}`. - * - * NOTE: While the single segment variable matches the semantics of - * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 - * Simple String Expansion, the multi segment variable **does not** match - * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion - * does not expand special characters like `?` and `#`, which would lead - * to invalid URLs. - * - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. - *- * - * Protobuf type {@code google.api.HttpRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder
- * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @return The selector.
- */
- 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;
- }
- }
- /**
- * - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @return The bytes for selector.
- */
- 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;
- }
- }
- /**
- * - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @param value The selector to set.
- * @return This builder for chaining.
- */
- public Builder setSelector(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- selector_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- * - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @return This builder for chaining.
- */
- public Builder clearSelector() {
- selector_ = getDefaultInstance().getSelector();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @param value The bytes for selector to set.
- * @return This builder for chaining.
- */
- public Builder setSelectorBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- selector_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return Whether the get field is set.
- */
- @java.lang.Override
- public boolean hasGet() {
- return patternCase_ == 2;
- }
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return The get.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return The bytes for get.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @param value The get to set.
- * @return This builder for chaining.
- */
- public Builder setGet(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- patternCase_ = 2;
- pattern_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return This builder for chaining.
- */
- public Builder clearGet() {
- if (patternCase_ == 2) {
- patternCase_ = 0;
- pattern_ = null;
- onChanged();
- }
- return this;
- }
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @param value The bytes for get to set.
- * @return This builder for chaining.
- */
- public Builder setGetBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- patternCase_ = 2;
- pattern_ = value;
- onChanged();
- return this;
- }
-
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return Whether the put field is set.
- */
- @java.lang.Override
- public boolean hasPut() {
- return patternCase_ == 3;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return The put.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return The bytes for put.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @param value The put to set.
- * @return This builder for chaining.
- */
- public Builder setPut(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- patternCase_ = 3;
- pattern_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return This builder for chaining.
- */
- public Builder clearPut() {
- if (patternCase_ == 3) {
- patternCase_ = 0;
- pattern_ = null;
- onChanged();
- }
- return this;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @param value The bytes for put to set.
- * @return This builder for chaining.
- */
- public Builder setPutBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- patternCase_ = 3;
- pattern_ = value;
- onChanged();
- return this;
- }
-
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return Whether the post field is set.
- */
- @java.lang.Override
- public boolean hasPost() {
- return patternCase_ == 4;
- }
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return The post.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return The bytes for post.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @param value The post to set.
- * @return This builder for chaining.
- */
- public Builder setPost(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- patternCase_ = 4;
- pattern_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return This builder for chaining.
- */
- public Builder clearPost() {
- if (patternCase_ == 4) {
- patternCase_ = 0;
- pattern_ = null;
- onChanged();
- }
- return this;
- }
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @param value The bytes for post to set.
- * @return This builder for chaining.
- */
- public Builder setPostBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- patternCase_ = 4;
- pattern_ = value;
- onChanged();
- return this;
- }
-
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return Whether the delete field is set.
- */
- @java.lang.Override
- public boolean hasDelete() {
- return patternCase_ == 5;
- }
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return The delete.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return The bytes for delete.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @param value The delete to set.
- * @return This builder for chaining.
- */
- public Builder setDelete(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- patternCase_ = 5;
- pattern_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return This builder for chaining.
- */
- public Builder clearDelete() {
- if (patternCase_ == 5) {
- patternCase_ = 0;
- pattern_ = null;
- onChanged();
- }
- return this;
- }
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @param value The bytes for delete to set.
- * @return This builder for chaining.
- */
- public Builder setDeleteBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- patternCase_ = 5;
- pattern_ = value;
- onChanged();
- return this;
- }
-
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return Whether the patch field is set.
- */
- @java.lang.Override
- public boolean hasPatch() {
- return patternCase_ == 6;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return The patch.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return The bytes for patch.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @param value The patch to set.
- * @return This builder for chaining.
- */
- public Builder setPatch(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- patternCase_ = 6;
- pattern_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return This builder for chaining.
- */
- public Builder clearPatch() {
- if (patternCase_ == 6) {
- patternCase_ = 0;
- pattern_ = null;
- onChanged();
- }
- return this;
- }
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @param value The bytes for patch to set.
- * @return This builder for chaining.
- */
- 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.SingleFieldBuilderV3<
- com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> customBuilder_;
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- * @return Whether the custom field is set.
- */
- @java.lang.Override
- public boolean hasCustom() {
- return patternCase_ == 8;
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- * @return The custom.
- */
- @java.lang.Override
- 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();
- }
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- 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;
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- 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;
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- 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);
- } else {
- customBuilder_.setMessage(value);
- }
- }
- patternCase_ = 8;
- return this;
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- 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;
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- public com.google.api.CustomHttpPattern.Builder getCustomBuilder() {
- return getCustomFieldBuilder().getBuilder();
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- @java.lang.Override
- 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();
- }
- }
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- 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.SingleFieldBuilderV3<
- 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_ = "";
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @return The body.
- */
- 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;
- }
- }
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @return The bytes for body.
- */
- 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;
- }
- }
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @param value The body to set.
- * @return This builder for chaining.
- */
- public Builder setBody(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- body_ = value;
- bitField0_ |= 0x00000080;
- onChanged();
- return this;
- }
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @return This builder for chaining.
- */
- public Builder clearBody() {
- body_ = getDefaultInstance().getBody();
- bitField0_ = (bitField0_ & ~0x00000080);
- onChanged();
- return this;
- }
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @param value The bytes for body to set.
- * @return This builder for chaining.
- */
- public Builder setBodyBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- body_ = value;
- bitField0_ |= 0x00000080;
- onChanged();
- return this;
- }
-
- private java.lang.Object responseBody_ = "";
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @return The responseBody.
- */
- public java.lang.String getResponseBody() {
- java.lang.Object ref = responseBody_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- responseBody_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @return The bytes for responseBody.
- */
- public com.google.protobuf.ByteString
- getResponseBodyBytes() {
- java.lang.Object ref = responseBody_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- responseBody_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @param value The responseBody to set.
- * @return This builder for chaining.
- */
- public Builder setResponseBody(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- responseBody_ = value;
- bitField0_ |= 0x00000100;
- onChanged();
- return this;
- }
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @return This builder for chaining.
- */
- public Builder clearResponseBody() {
- responseBody_ = getDefaultInstance().getResponseBody();
- bitField0_ = (bitField0_ & ~0x00000100);
- onChanged();
- return this;
- }
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @param value The bytes for responseBody to set.
- * @return This builder for chaining.
- */
- public Builder setResponseBodyBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- responseBody_ = value;
- bitField0_ |= 0x00000100;
- onChanged();
- return this;
- }
-
- private java.util.List- * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public java.util.List- * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public int getAdditionalBindingsCount() {
- if (additionalBindingsBuilder_ == null) {
- return additionalBindings_.size();
- } else {
- return additionalBindingsBuilder_.getCount();
- }
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public com.google.api.HttpRule getAdditionalBindings(int index) {
- if (additionalBindingsBuilder_ == null) {
- return additionalBindings_.get(index);
- } else {
- return additionalBindingsBuilder_.getMessage(index);
- }
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- 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;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- 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;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- 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;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- 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;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- 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;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- 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;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- 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;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public Builder clearAdditionalBindings() {
- if (additionalBindingsBuilder_ == null) {
- additionalBindings_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000200);
- onChanged();
- } else {
- additionalBindingsBuilder_.clear();
- }
- return this;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public Builder removeAdditionalBindings(int index) {
- if (additionalBindingsBuilder_ == null) {
- ensureAdditionalBindingsIsMutable();
- additionalBindings_.remove(index);
- onChanged();
- } else {
- additionalBindingsBuilder_.remove(index);
- }
- return this;
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public com.google.api.HttpRule.Builder getAdditionalBindingsBuilder(
- int index) {
- return getAdditionalBindingsFieldBuilder().getBuilder(index);
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(
- int index) {
- if (additionalBindingsBuilder_ == null) {
- return additionalBindings_.get(index); } else {
- return additionalBindingsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public java.util.List extends com.google.api.HttpRuleOrBuilder>
- getAdditionalBindingsOrBuilderList() {
- if (additionalBindingsBuilder_ != null) {
- return additionalBindingsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(additionalBindings_);
- }
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder() {
- return getAdditionalBindingsFieldBuilder().addBuilder(
- com.google.api.HttpRule.getDefaultInstance());
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder(
- int index) {
- return getAdditionalBindingsFieldBuilder().addBuilder(
- index, com.google.api.HttpRule.getDefaultInstance());
- }
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- public java.util.List- * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @return The selector.
- */
- java.lang.String getSelector();
- /**
- * - * Selects methods to which this rule applies. - * - * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - *- * - *
string selector = 1;
- * @return The bytes for selector.
- */
- com.google.protobuf.ByteString
- getSelectorBytes();
-
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return Whether the get field is set.
- */
- boolean hasGet();
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return The get.
- */
- java.lang.String getGet();
- /**
- * - * Used for listing and getting information about resources. - *- * - *
string get = 2;
- * @return The bytes for get.
- */
- com.google.protobuf.ByteString
- getGetBytes();
-
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return Whether the put field is set.
- */
- boolean hasPut();
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return The put.
- */
- java.lang.String getPut();
- /**
- * - * Used for updating a resource. - *- * - *
string put = 3;
- * @return The bytes for put.
- */
- com.google.protobuf.ByteString
- getPutBytes();
-
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return Whether the post field is set.
- */
- boolean hasPost();
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return The post.
- */
- java.lang.String getPost();
- /**
- * - * Used for creating a resource. - *- * - *
string post = 4;
- * @return The bytes for post.
- */
- com.google.protobuf.ByteString
- getPostBytes();
-
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return Whether the delete field is set.
- */
- boolean hasDelete();
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return The delete.
- */
- java.lang.String getDelete();
- /**
- * - * Used for deleting a resource. - *- * - *
string delete = 5;
- * @return The bytes for delete.
- */
- com.google.protobuf.ByteString
- getDeleteBytes();
-
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return Whether the patch field is set.
- */
- boolean hasPatch();
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return The patch.
- */
- java.lang.String getPatch();
- /**
- * - * Used for updating a resource. - *- * - *
string patch = 6;
- * @return The bytes for patch.
- */
- com.google.protobuf.ByteString
- getPatchBytes();
-
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- * @return Whether the custom field is set.
- */
- boolean hasCustom();
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- * @return The custom.
- */
- com.google.api.CustomHttpPattern getCustom();
- /**
- * - * The custom pattern is used for specifying an HTTP method that is not - * included in the `pattern` field, such as HEAD, or "*" to leave the - * HTTP method unspecified for this rule. The wild-card rule is useful - * for services that provide content to Web (HTML) clients. - *- * - *
.google.api.CustomHttpPattern custom = 8;
- */
- com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder();
-
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @return The body.
- */
- java.lang.String getBody();
- /**
- * - * 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 and must be - * present at the top-level of request message type. - *- * - *
string body = 7;
- * @return The bytes for body.
- */
- com.google.protobuf.ByteString
- getBodyBytes();
-
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @return The responseBody.
- */
- java.lang.String getResponseBody();
- /**
- * - * Optional. The name of the response field whose value is mapped to the HTTP - * body of response. Other response fields are ignored. When - * not set, the response message will be used as HTTP body of response. - *- * - *
string response_body = 12;
- * @return The bytes for responseBody.
- */
- com.google.protobuf.ByteString
- getResponseBodyBytes();
-
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- java.util.List- * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- com.google.api.HttpRule getAdditionalBindings(int index);
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- int getAdditionalBindingsCount();
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- java.util.List extends com.google.api.HttpRuleOrBuilder>
- getAdditionalBindingsOrBuilderList();
- /**
- * - * 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). - *- * - *
repeated .google.api.HttpRule additional_bindings = 11;
- */
- com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(
- int index);
-
- com.google.api.HttpRule.PatternCase getPatternCase();
-}
diff --git a/src/main/java/com/google/protobuf/Empty.java b/src/main/java/com/google/protobuf/Empty.java
deleted file mode 100644
index c6e2598..0000000
--- a/src/main/java/com/google/protobuf/Empty.java
+++ /dev/null
@@ -1,423 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/empty.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.protobuf;
-
-/**
- * - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - *- * - * Protobuf type {@code google.protobuf.Empty} - */ -public final class Empty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.protobuf.Empty) - EmptyOrBuilder { -private static final long serialVersionUID = 0L; - // Use Empty.newBuilder() to construct. - private Empty(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private Empty() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Empty(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.protobuf.Empty)) { - return super.equals(obj); - } - com.google.protobuf.Empty other = (com.google.protobuf.Empty) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protobuf.Empty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Empty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Empty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Empty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Empty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.protobuf.Empty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.protobuf.Empty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.protobuf.Empty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static com.google.protobuf.Empty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protobuf.Empty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.protobuf.Empty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.protobuf.Empty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.protobuf.Empty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
- * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - *- * - * Protobuf type {@code google.protobuf.Empty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder
- * Describes violations in a client request. This error type focuses on the - * syntactic aspects of the request. - *- * - * Protobuf type {@code google.rpc.BadRequest} - */ -public final class BadRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.rpc.BadRequest) - BadRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BadRequest.newBuilder() to construct. - private BadRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private BadRequest() { - fieldViolations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BadRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.BadRequest.class, com.google.rpc.BadRequest.Builder.class); - } - - public interface FieldViolationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.BadRequest.FieldViolation) - com.google.protobuf.MessageOrBuilder { - - /** - *
- * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @return The field.
- */
- java.lang.String getField();
- /**
- * - * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @return The bytes for field.
- */
- com.google.protobuf.ByteString
- getFieldBytes();
-
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @return The description.
- */
- java.lang.String getDescription();
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @return The bytes for description.
- */
- com.google.protobuf.ByteString
- getDescriptionBytes();
- }
- /**
- * - * A message type used to describe a single bad request field. - *- * - * Protobuf type {@code google.rpc.BadRequest.FieldViolation} - */ - public static final class FieldViolation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.rpc.BadRequest.FieldViolation) - FieldViolationOrBuilder { - private static final long serialVersionUID = 0L; - // Use FieldViolation.newBuilder() to construct. - private FieldViolation(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private FieldViolation() { - field_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FieldViolation(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.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; - @SuppressWarnings("serial") - private volatile java.lang.Object field_ = ""; - /** - *
- * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @return The field.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @return The bytes for field.
- */
- @java.lang.Override
- 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;
- @SuppressWarnings("serial")
- private volatile java.lang.Object description_ = "";
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @return The description.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @return The bytes for description.
- */
- @java.lang.Override
- 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;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.BadRequest.FieldViolation)) {
- return super.equals(obj);
- }
- com.google.rpc.BadRequest.FieldViolation other = (com.google.rpc.BadRequest.FieldViolation) obj;
-
- if (!getField()
- .equals(other.getField())) return false;
- if (!getDescription()
- .equals(other.getDescription())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + FIELD_FIELD_NUMBER;
- hash = (53 * hash) + getField().hashCode();
- hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
- hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.BadRequest.FieldViolation parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.BadRequest.FieldViolation parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- 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 com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.BadRequest.FieldViolation parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.BadRequest.FieldViolation parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.BadRequest.FieldViolation parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- 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);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * - * A message type used to describe a single bad request field. - *- * - * Protobuf type {@code google.rpc.BadRequest.FieldViolation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder
- * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @return The 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;
- }
- }
- /**
- * - * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @return The bytes for 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;
- }
- }
- /**
- * - * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @param value The field to set.
- * @return This builder for chaining.
- */
- public Builder setField(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- field_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- * - * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @return This builder for chaining.
- */
- public Builder clearField() {
- field_ = getDefaultInstance().getField();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * - * 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., "field_violations.field" would identify this field. - *- * - *
string field = 1;
- * @param value The bytes for field to set.
- * @return This builder for chaining.
- */
- public Builder setFieldBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- field_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object description_ = "";
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @return The description.
- */
- 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;
- }
- }
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @return The bytes for description.
- */
- 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;
- }
- }
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @param value The description to set.
- * @return This builder for chaining.
- */
- public Builder setDescription(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- description_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @return This builder for chaining.
- */
- public Builder clearDescription() {
- description_ = getDefaultInstance().getDescription();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- * - * A description of why the request element is bad. - *- * - *
string description = 2;
- * @param value The bytes for description to set.
- * @return This builder for chaining.
- */
- public Builder setDescriptionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- description_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@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- * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public java.util.List- * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.rpc.BadRequest.FieldViolationOrBuilder>
- getFieldViolationsOrBuilderList() {
- return fieldViolations_;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public int getFieldViolationsCount() {
- return fieldViolations_.size();
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index) {
- return fieldViolations_.get(index);
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder(
- int index) {
- return fieldViolations_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- 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));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- 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));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.BadRequest)) {
- return super.equals(obj);
- }
- com.google.rpc.BadRequest other = (com.google.rpc.BadRequest) obj;
-
- if (!getFieldViolationsList()
- .equals(other.getFieldViolationsList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getFieldViolationsCount() > 0) {
- hash = (37 * hash) + FIELD_VIOLATIONS_FIELD_NUMBER;
- hash = (53 * hash) + getFieldViolationsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.BadRequest parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.BadRequest parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- 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 com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.BadRequest parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.BadRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.BadRequest parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.BadRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.BadRequest parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- 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);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * - * Describes violations in a client request. This error type focuses on the - * syntactic aspects of the request. - *- * - * Protobuf type {@code google.rpc.BadRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder
- * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public java.util.List- * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public int getFieldViolationsCount() {
- if (fieldViolationsBuilder_ == null) {
- return fieldViolations_.size();
- } else {
- return fieldViolationsBuilder_.getCount();
- }
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index) {
- if (fieldViolationsBuilder_ == null) {
- return fieldViolations_.get(index);
- } else {
- return fieldViolationsBuilder_.getMessage(index);
- }
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- 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;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- 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;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- 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;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- 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;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- 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;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- 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;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- 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;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public Builder clearFieldViolations() {
- if (fieldViolationsBuilder_ == null) {
- fieldViolations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- fieldViolationsBuilder_.clear();
- }
- return this;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public Builder removeFieldViolations(int index) {
- if (fieldViolationsBuilder_ == null) {
- ensureFieldViolationsIsMutable();
- fieldViolations_.remove(index);
- onChanged();
- } else {
- fieldViolationsBuilder_.remove(index);
- }
- return this;
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public com.google.rpc.BadRequest.FieldViolation.Builder getFieldViolationsBuilder(
- int index) {
- return getFieldViolationsFieldBuilder().getBuilder(index);
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder(
- int index) {
- if (fieldViolationsBuilder_ == null) {
- return fieldViolations_.get(index); } else {
- return fieldViolationsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public java.util.List extends com.google.rpc.BadRequest.FieldViolationOrBuilder>
- getFieldViolationsOrBuilderList() {
- if (fieldViolationsBuilder_ != null) {
- return fieldViolationsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(fieldViolations_);
- }
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public com.google.rpc.BadRequest.FieldViolation.Builder addFieldViolationsBuilder() {
- return getFieldViolationsFieldBuilder().addBuilder(
- com.google.rpc.BadRequest.FieldViolation.getDefaultInstance());
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public com.google.rpc.BadRequest.FieldViolation.Builder addFieldViolationsBuilder(
- int index) {
- return getFieldViolationsFieldBuilder().addBuilder(
- index, com.google.rpc.BadRequest.FieldViolation.getDefaultInstance());
- }
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- public java.util.List- * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- java.util.List- * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index);
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- int getFieldViolationsCount();
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- java.util.List extends com.google.rpc.BadRequest.FieldViolationOrBuilder>
- getFieldViolationsOrBuilderList();
- /**
- * - * Describes all violations in a client request. - *- * - *
repeated .google.rpc.BadRequest.FieldViolation field_violations = 1;
- */
- com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder(
- int index);
-}
diff --git a/src/main/java/com/google/rpc/Code.java b/src/main/java/com/google/rpc/Code.java
deleted file mode 100644
index 35c454f..0000000
--- a/src/main/java/com/google/rpc/Code.java
+++ /dev/null
@@ -1,599 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/code.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- * - * The canonical error codes for Google APIs. - * - * - * Sometimes multiple error codes may apply. Services should return - * the most specific error code that applies. For example, prefer - * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. - * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. - *- * - * Protobuf enum {@code google.rpc.Code} - */ -public enum Code - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
- * Not an error; returned on success - * - * HTTP Mapping: 200 OK - *- * - *
OK = 0;
- */
- OK(0),
- /**
- * - * The operation was cancelled, typically by the caller. - * - * HTTP Mapping: 499 Client Closed Request - *- * - *
CANCELLED = 1;
- */
- CANCELLED(1),
- /**
- * - * Unknown error. For example, this error may be returned when - * a `Status` value received from another address space belongs to - * an error space that is not known in this address space. Also - * errors raised by APIs that do not return enough error information - * may be converted to this error. - * - * HTTP Mapping: 500 Internal Server Error - *- * - *
UNKNOWN = 2;
- */
- UNKNOWN(2),
- /**
- * - * The client specified an invalid argument. Note that this differs - * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - * that are problematic regardless of the state of the system - * (e.g., a malformed file name). - * - * HTTP Mapping: 400 Bad Request - *- * - *
INVALID_ARGUMENT = 3;
- */
- INVALID_ARGUMENT(3),
- /**
- * - * The deadline expired before the operation could complete. For operations - * that change the state of the system, this error may be returned - * even if the operation has completed successfully. For example, a - * successful response from a server could have been delayed long - * enough for the deadline to expire. - * - * HTTP Mapping: 504 Gateway Timeout - *- * - *
DEADLINE_EXCEEDED = 4;
- */
- DEADLINE_EXCEEDED(4),
- /**
- * - * Some requested entity (e.g., file or directory) was not found. - * - * Note to server developers: if a request is denied for an entire class - * of users, such as gradual feature rollout or undocumented whitelist, - * `NOT_FOUND` may be used. If a request is denied for some users within - * a class of users, such as user-based access control, `PERMISSION_DENIED` - * must be used. - * - * HTTP Mapping: 404 Not Found - *- * - *
NOT_FOUND = 5;
- */
- NOT_FOUND(5),
- /**
- * - * The entity that a client attempted to create (e.g., file or directory) - * already exists. - * - * HTTP Mapping: 409 Conflict - *- * - *
ALREADY_EXISTS = 6;
- */
- ALREADY_EXISTS(6),
- /**
- * - * The caller does not have permission to execute the specified - * operation. `PERMISSION_DENIED` must not be used for rejections - * caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - * instead for those errors). `PERMISSION_DENIED` must not be - * used if the caller can not be identified (use `UNAUTHENTICATED` - * instead for those errors). This error code does not imply the - * request is valid or the requested entity exists or satisfies - * other pre-conditions. - * - * HTTP Mapping: 403 Forbidden - *- * - *
PERMISSION_DENIED = 7;
- */
- PERMISSION_DENIED(7),
- /**
- * - * The request does not have valid authentication credentials for the - * operation. - * - * HTTP Mapping: 401 Unauthorized - *- * - *
UNAUTHENTICATED = 16;
- */
- UNAUTHENTICATED(16),
- /**
- * - * Some resource has been exhausted, perhaps a per-user quota, or - * perhaps the entire file system is out of space. - * - * HTTP Mapping: 429 Too Many Requests - *- * - *
RESOURCE_EXHAUSTED = 8;
- */
- RESOURCE_EXHAUSTED(8),
- /**
- * - * The operation was rejected because the system is not in a state - * required for the operation's execution. For example, the directory - * to be deleted is non-empty, an rmdir operation is applied to - * a non-directory, etc. - * - * Service implementors can use the following guidelines to decide - * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - * (a) Use `UNAVAILABLE` if the client can retry just the failing call. - * (b) Use `ABORTED` if the client should retry at a higher level - * (e.g., when a client-specified test-and-set fails, indicating the - * client should restart a read-modify-write sequence). - * (c) Use `FAILED_PRECONDITION` if the client should not retry until - * the system state has been explicitly fixed. E.g., if an "rmdir" - * fails because the directory is non-empty, `FAILED_PRECONDITION` - * should be returned since the client should not retry unless - * the files are deleted from the directory. - * - * HTTP Mapping: 400 Bad Request - *- * - *
FAILED_PRECONDITION = 9;
- */
- FAILED_PRECONDITION(9),
- /**
- * - * The operation was aborted, typically due to a concurrency issue such as - * a sequencer check failure or transaction abort. - * - * See the guidelines above for deciding between `FAILED_PRECONDITION`, - * `ABORTED`, and `UNAVAILABLE`. - * - * HTTP Mapping: 409 Conflict - *- * - *
ABORTED = 10;
- */
- ABORTED(10),
- /**
- * - * The operation was attempted past the valid range. E.g., seeking or - * reading past end-of-file. - * - * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - * be fixed if the system state changes. For example, a 32-bit file - * system will generate `INVALID_ARGUMENT` if asked to read at an - * offset that is not in the range [0,2^32-1], but it will generate - * `OUT_OF_RANGE` if asked to read from an offset past the current - * file size. - * - * There is a fair bit of overlap between `FAILED_PRECONDITION` and - * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - * error) when it applies so that callers who are iterating through - * a space can easily look for an `OUT_OF_RANGE` error to detect when - * they are done. - * - * HTTP Mapping: 400 Bad Request - *- * - *
OUT_OF_RANGE = 11;
- */
- OUT_OF_RANGE(11),
- /**
- * - * The operation is not implemented or is not supported/enabled in this - * service. - * - * HTTP Mapping: 501 Not Implemented - *- * - *
UNIMPLEMENTED = 12;
- */
- UNIMPLEMENTED(12),
- /**
- * - * Internal errors. This means that some invariants expected by the - * underlying system have been broken. This error code is reserved - * for serious errors. - * - * HTTP Mapping: 500 Internal Server Error - *- * - *
INTERNAL = 13;
- */
- INTERNAL(13),
- /**
- * - * The service is currently unavailable. This is most likely a - * transient condition, which can be corrected by retrying with - * a backoff. - * - * See the guidelines above for deciding between `FAILED_PRECONDITION`, - * `ABORTED`, and `UNAVAILABLE`. - * - * HTTP Mapping: 503 Service Unavailable - *- * - *
UNAVAILABLE = 14;
- */
- UNAVAILABLE(14),
- /**
- * - * Unrecoverable data loss or corruption. - * - * HTTP Mapping: 500 Internal Server Error - *- * - *
DATA_LOSS = 15;
- */
- DATA_LOSS(15),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * - * Not an error; returned on success - * - * HTTP Mapping: 200 OK - *- * - *
OK = 0;
- */
- public static final int OK_VALUE = 0;
- /**
- * - * The operation was cancelled, typically by the caller. - * - * HTTP Mapping: 499 Client Closed Request - *- * - *
CANCELLED = 1;
- */
- public static final int CANCELLED_VALUE = 1;
- /**
- * - * Unknown error. For example, this error may be returned when - * a `Status` value received from another address space belongs to - * an error space that is not known in this address space. Also - * errors raised by APIs that do not return enough error information - * may be converted to this error. - * - * HTTP Mapping: 500 Internal Server Error - *- * - *
UNKNOWN = 2;
- */
- public static final int UNKNOWN_VALUE = 2;
- /**
- * - * The client specified an invalid argument. Note that this differs - * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - * that are problematic regardless of the state of the system - * (e.g., a malformed file name). - * - * HTTP Mapping: 400 Bad Request - *- * - *
INVALID_ARGUMENT = 3;
- */
- public static final int INVALID_ARGUMENT_VALUE = 3;
- /**
- * - * The deadline expired before the operation could complete. For operations - * that change the state of the system, this error may be returned - * even if the operation has completed successfully. For example, a - * successful response from a server could have been delayed long - * enough for the deadline to expire. - * - * HTTP Mapping: 504 Gateway Timeout - *- * - *
DEADLINE_EXCEEDED = 4;
- */
- public static final int DEADLINE_EXCEEDED_VALUE = 4;
- /**
- * - * Some requested entity (e.g., file or directory) was not found. - * - * Note to server developers: if a request is denied for an entire class - * of users, such as gradual feature rollout or undocumented whitelist, - * `NOT_FOUND` may be used. If a request is denied for some users within - * a class of users, such as user-based access control, `PERMISSION_DENIED` - * must be used. - * - * HTTP Mapping: 404 Not Found - *- * - *
NOT_FOUND = 5;
- */
- public static final int NOT_FOUND_VALUE = 5;
- /**
- * - * The entity that a client attempted to create (e.g., file or directory) - * already exists. - * - * HTTP Mapping: 409 Conflict - *- * - *
ALREADY_EXISTS = 6;
- */
- public static final int ALREADY_EXISTS_VALUE = 6;
- /**
- * - * The caller does not have permission to execute the specified - * operation. `PERMISSION_DENIED` must not be used for rejections - * caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - * instead for those errors). `PERMISSION_DENIED` must not be - * used if the caller can not be identified (use `UNAUTHENTICATED` - * instead for those errors). This error code does not imply the - * request is valid or the requested entity exists or satisfies - * other pre-conditions. - * - * HTTP Mapping: 403 Forbidden - *- * - *
PERMISSION_DENIED = 7;
- */
- public static final int PERMISSION_DENIED_VALUE = 7;
- /**
- * - * The request does not have valid authentication credentials for the - * operation. - * - * HTTP Mapping: 401 Unauthorized - *- * - *
UNAUTHENTICATED = 16;
- */
- public static final int UNAUTHENTICATED_VALUE = 16;
- /**
- * - * Some resource has been exhausted, perhaps a per-user quota, or - * perhaps the entire file system is out of space. - * - * HTTP Mapping: 429 Too Many Requests - *- * - *
RESOURCE_EXHAUSTED = 8;
- */
- public static final int RESOURCE_EXHAUSTED_VALUE = 8;
- /**
- * - * The operation was rejected because the system is not in a state - * required for the operation's execution. For example, the directory - * to be deleted is non-empty, an rmdir operation is applied to - * a non-directory, etc. - * - * Service implementors can use the following guidelines to decide - * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - * (a) Use `UNAVAILABLE` if the client can retry just the failing call. - * (b) Use `ABORTED` if the client should retry at a higher level - * (e.g., when a client-specified test-and-set fails, indicating the - * client should restart a read-modify-write sequence). - * (c) Use `FAILED_PRECONDITION` if the client should not retry until - * the system state has been explicitly fixed. E.g., if an "rmdir" - * fails because the directory is non-empty, `FAILED_PRECONDITION` - * should be returned since the client should not retry unless - * the files are deleted from the directory. - * - * HTTP Mapping: 400 Bad Request - *- * - *
FAILED_PRECONDITION = 9;
- */
- public static final int FAILED_PRECONDITION_VALUE = 9;
- /**
- * - * The operation was aborted, typically due to a concurrency issue such as - * a sequencer check failure or transaction abort. - * - * See the guidelines above for deciding between `FAILED_PRECONDITION`, - * `ABORTED`, and `UNAVAILABLE`. - * - * HTTP Mapping: 409 Conflict - *- * - *
ABORTED = 10;
- */
- public static final int ABORTED_VALUE = 10;
- /**
- * - * The operation was attempted past the valid range. E.g., seeking or - * reading past end-of-file. - * - * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - * be fixed if the system state changes. For example, a 32-bit file - * system will generate `INVALID_ARGUMENT` if asked to read at an - * offset that is not in the range [0,2^32-1], but it will generate - * `OUT_OF_RANGE` if asked to read from an offset past the current - * file size. - * - * There is a fair bit of overlap between `FAILED_PRECONDITION` and - * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - * error) when it applies so that callers who are iterating through - * a space can easily look for an `OUT_OF_RANGE` error to detect when - * they are done. - * - * HTTP Mapping: 400 Bad Request - *- * - *
OUT_OF_RANGE = 11;
- */
- public static final int OUT_OF_RANGE_VALUE = 11;
- /**
- * - * The operation is not implemented or is not supported/enabled in this - * service. - * - * HTTP Mapping: 501 Not Implemented - *- * - *
UNIMPLEMENTED = 12;
- */
- public static final int UNIMPLEMENTED_VALUE = 12;
- /**
- * - * Internal errors. This means that some invariants expected by the - * underlying system have been broken. This error code is reserved - * for serious errors. - * - * HTTP Mapping: 500 Internal Server Error - *- * - *
INTERNAL = 13;
- */
- public static final int INTERNAL_VALUE = 13;
- /**
- * - * The service is currently unavailable. This is most likely a - * transient condition, which can be corrected by retrying with - * a backoff. - * - * See the guidelines above for deciding between `FAILED_PRECONDITION`, - * `ABORTED`, and `UNAVAILABLE`. - * - * HTTP Mapping: 503 Service Unavailable - *- * - *
UNAVAILABLE = 14;
- */
- public static final int UNAVAILABLE_VALUE = 14;
- /**
- * - * Unrecoverable data loss or corruption. - * - * HTTP Mapping: 500 Internal Server Error - *- * - *
DATA_LOSS = 15;
- */
- public static final int DATA_LOSS_VALUE = 15;
-
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static Code valueOf(int value) {
- return forNumber(value);
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- */
- public static Code forNumber(int value) {
- switch (value) {
- case 0: return OK;
- case 1: return CANCELLED;
- case 2: return UNKNOWN;
- case 3: return INVALID_ARGUMENT;
- case 4: return DEADLINE_EXCEEDED;
- case 5: return NOT_FOUND;
- case 6: return ALREADY_EXISTS;
- case 7: return PERMISSION_DENIED;
- case 16: return UNAUTHENTICATED;
- case 8: return RESOURCE_EXHAUSTED;
- case 9: return FAILED_PRECONDITION;
- case 10: return ABORTED;
- case 11: return OUT_OF_RANGE;
- case 12: return UNIMPLEMENTED;
- case 13: return INTERNAL;
- case 14: return UNAVAILABLE;
- case 15: return DATA_LOSS;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- Code> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public Code findValueByNumber(int number) {
- return Code.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalStateException(
- "Can't get the descriptor of an unrecognized enum value.");
- }
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.rpc.CodeProto.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Code[] VALUES = values();
-
- public static Code valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- if (desc.getIndex() == -1) {
- return UNRECOGNIZED;
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private Code(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.rpc.Code)
-}
-
diff --git a/src/main/java/com/google/rpc/CodeProto.java b/src/main/java/com/google/rpc/CodeProto.java
deleted file mode 100644
index da12243..0000000
--- a/src/main/java/com/google/rpc/CodeProto.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/code.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public final class CodeProto {
- private CodeProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\025google/rpc/code.proto\022\ngoogle.rpc*\267\002\n\004" +
- "Code\022\006\n\002OK\020\000\022\r\n\tCANCELLED\020\001\022\013\n\007UNKNOWN\020\002" +
- "\022\024\n\020INVALID_ARGUMENT\020\003\022\025\n\021DEADLINE_EXCEE" +
- "DED\020\004\022\r\n\tNOT_FOUND\020\005\022\022\n\016ALREADY_EXISTS\020\006" +
- "\022\025\n\021PERMISSION_DENIED\020\007\022\023\n\017UNAUTHENTICAT" +
- "ED\020\020\022\026\n\022RESOURCE_EXHAUSTED\020\010\022\027\n\023FAILED_P" +
- "RECONDITION\020\t\022\013\n\007ABORTED\020\n\022\020\n\014OUT_OF_RAN" +
- "GE\020\013\022\021\n\rUNIMPLEMENTED\020\014\022\014\n\010INTERNAL\020\r\022\017\n" +
- "\013UNAVAILABLE\020\016\022\r\n\tDATA_LOSS\020\017BX\n\016com.goo" +
- "gle.rpcB\tCodeProtoP\001Z3google.golang.org/" +
- "genproto/googleapis/rpc/code;code\242\002\003RPCb" +
- "\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/com/google/rpc/DebugInfo.java b/src/main/java/com/google/rpc/DebugInfo.java
deleted file mode 100644
index 35f516a..0000000
--- a/src/main/java/com/google/rpc/DebugInfo.java
+++ /dev/null
@@ -1,819 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Describes additional debugging info.
- *
- *
- * Protobuf type {@code google.rpc.DebugInfo}
- */
-public final class DebugInfo extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.DebugInfo)
- DebugInfoOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use DebugInfo.newBuilder() to construct.
- private DebugInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private DebugInfo() {
- stackEntries_ =
- com.google.protobuf.LazyStringArrayList.emptyList();
- detail_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new DebugInfo();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.DebugInfo.class, com.google.rpc.DebugInfo.Builder.class);
- }
-
- public static final int STACK_ENTRIES_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private com.google.protobuf.LazyStringArrayList stackEntries_ =
- com.google.protobuf.LazyStringArrayList.emptyList();
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @return A list containing the stackEntries.
- */
- public com.google.protobuf.ProtocolStringList
- getStackEntriesList() {
- return stackEntries_;
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @return The count of stackEntries.
- */
- public int getStackEntriesCount() {
- return stackEntries_.size();
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param index The index of the element to return.
- * @return The stackEntries at the given index.
- */
- public java.lang.String getStackEntries(int index) {
- return stackEntries_.get(index);
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param index The index of the value to return.
- * @return The bytes of the stackEntries at the given index.
- */
- public com.google.protobuf.ByteString
- getStackEntriesBytes(int index) {
- return stackEntries_.getByteString(index);
- }
-
- public static final int DETAIL_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object detail_ = "";
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @return The detail.
- */
- @java.lang.Override
- public java.lang.String getDetail() {
- java.lang.Object ref = detail_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- detail_ = s;
- return s;
- }
- }
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @return The bytes for detail.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getDetailBytes() {
- java.lang.Object ref = detail_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- detail_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < stackEntries_.size(); i++) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stackEntries_.getRaw(i));
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, detail_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int i = 0; i < stackEntries_.size(); i++) {
- dataSize += computeStringSizeNoTag(stackEntries_.getRaw(i));
- }
- size += dataSize;
- size += 1 * getStackEntriesList().size();
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, detail_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.DebugInfo)) {
- return super.equals(obj);
- }
- com.google.rpc.DebugInfo other = (com.google.rpc.DebugInfo) obj;
-
- if (!getStackEntriesList()
- .equals(other.getStackEntriesList())) return false;
- if (!getDetail()
- .equals(other.getDetail())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getStackEntriesCount() > 0) {
- hash = (37 * hash) + STACK_ENTRIES_FIELD_NUMBER;
- hash = (53 * hash) + getStackEntriesList().hashCode();
- }
- hash = (37 * hash) + DETAIL_FIELD_NUMBER;
- hash = (53 * hash) + getDetail().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.DebugInfo parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.DebugInfo parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.DebugInfo parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.DebugInfo parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.DebugInfo parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.DebugInfo parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.DebugInfo parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.DebugInfo parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.DebugInfo parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.DebugInfo parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.DebugInfo parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.DebugInfo parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.DebugInfo prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Describes additional debugging info.
- *
- *
- * Protobuf type {@code google.rpc.DebugInfo}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.DebugInfo)
- com.google.rpc.DebugInfoOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.DebugInfo.class, com.google.rpc.DebugInfo.Builder.class);
- }
-
- // Construct using com.google.rpc.DebugInfo.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- stackEntries_ =
- com.google.protobuf.LazyStringArrayList.emptyList();
- detail_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.DebugInfo getDefaultInstanceForType() {
- return com.google.rpc.DebugInfo.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.DebugInfo build() {
- com.google.rpc.DebugInfo result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.DebugInfo buildPartial() {
- com.google.rpc.DebugInfo result = new com.google.rpc.DebugInfo(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.DebugInfo result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- stackEntries_.makeImmutable();
- result.stackEntries_ = stackEntries_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.detail_ = detail_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.DebugInfo) {
- return mergeFrom((com.google.rpc.DebugInfo)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.DebugInfo other) {
- if (other == com.google.rpc.DebugInfo.getDefaultInstance()) return this;
- if (!other.stackEntries_.isEmpty()) {
- if (stackEntries_.isEmpty()) {
- stackEntries_ = other.stackEntries_;
- bitField0_ |= 0x00000001;
- } else {
- ensureStackEntriesIsMutable();
- stackEntries_.addAll(other.stackEntries_);
- }
- onChanged();
- }
- if (!other.getDetail().isEmpty()) {
- detail_ = other.detail_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
- ensureStackEntriesIsMutable();
- stackEntries_.add(s);
- break;
- } // case 10
- case 18: {
- detail_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private com.google.protobuf.LazyStringArrayList stackEntries_ =
- com.google.protobuf.LazyStringArrayList.emptyList();
- private void ensureStackEntriesIsMutable() {
- if (!stackEntries_.isModifiable()) {
- stackEntries_ = new com.google.protobuf.LazyStringArrayList(stackEntries_);
- }
- bitField0_ |= 0x00000001;
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @return A list containing the stackEntries.
- */
- public com.google.protobuf.ProtocolStringList
- getStackEntriesList() {
- stackEntries_.makeImmutable();
- return stackEntries_;
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @return The count of stackEntries.
- */
- public int getStackEntriesCount() {
- return stackEntries_.size();
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param index The index of the element to return.
- * @return The stackEntries at the given index.
- */
- public java.lang.String getStackEntries(int index) {
- return stackEntries_.get(index);
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param index The index of the value to return.
- * @return The bytes of the stackEntries at the given index.
- */
- public com.google.protobuf.ByteString
- getStackEntriesBytes(int index) {
- return stackEntries_.getByteString(index);
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param index The index to set the value at.
- * @param value The stackEntries to set.
- * @return This builder for chaining.
- */
- public Builder setStackEntries(
- int index, java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- ensureStackEntriesIsMutable();
- stackEntries_.set(index, value);
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param value The stackEntries to add.
- * @return This builder for chaining.
- */
- public Builder addStackEntries(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- ensureStackEntriesIsMutable();
- stackEntries_.add(value);
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param values The stackEntries to add.
- * @return This builder for chaining.
- */
- public Builder addAllStackEntries(
- java.lang.Iterable values) {
- ensureStackEntriesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, stackEntries_);
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @return This builder for chaining.
- */
- public Builder clearStackEntries() {
- stackEntries_ =
- com.google.protobuf.LazyStringArrayList.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);;
- onChanged();
- return this;
- }
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param value The bytes of the stackEntries to add.
- * @return This builder for chaining.
- */
- public Builder addStackEntriesBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- ensureStackEntriesIsMutable();
- stackEntries_.add(value);
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object detail_ = "";
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @return The detail.
- */
- public java.lang.String getDetail() {
- java.lang.Object ref = detail_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- detail_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @return The bytes for detail.
- */
- public com.google.protobuf.ByteString
- getDetailBytes() {
- java.lang.Object ref = detail_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- detail_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @param value The detail to set.
- * @return This builder for chaining.
- */
- public Builder setDetail(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- detail_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @return This builder for chaining.
- */
- public Builder clearDetail() {
- detail_ = getDefaultInstance().getDetail();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @param value The bytes for detail to set.
- * @return This builder for chaining.
- */
- public Builder setDetailBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- detail_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.DebugInfo)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.DebugInfo)
- private static final com.google.rpc.DebugInfo DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.DebugInfo();
- }
-
- public static com.google.rpc.DebugInfo getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public DebugInfo parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.DebugInfo getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/DebugInfoOrBuilder.java b/src/main/java/com/google/rpc/DebugInfoOrBuilder.java
deleted file mode 100644
index ceef4cf..0000000
--- a/src/main/java/com/google/rpc/DebugInfoOrBuilder.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface DebugInfoOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.DebugInfo)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @return A list containing the stackEntries.
- */
- java.util.List
- getStackEntriesList();
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @return The count of stackEntries.
- */
- int getStackEntriesCount();
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param index The index of the element to return.
- * @return The stackEntries at the given index.
- */
- java.lang.String getStackEntries(int index);
- /**
- *
- * The stack trace entries indicating where the error occurred.
- *
- *
- * repeated string stack_entries = 1;
- * @param index The index of the value to return.
- * @return The bytes of the stackEntries at the given index.
- */
- com.google.protobuf.ByteString
- getStackEntriesBytes(int index);
-
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @return The detail.
- */
- java.lang.String getDetail();
- /**
- *
- * Additional debugging information provided by the server.
- *
- *
- * string detail = 2;
- * @return The bytes for detail.
- */
- com.google.protobuf.ByteString
- getDetailBytes();
-}
diff --git a/src/main/java/com/google/rpc/ErrorDetailsProto.java b/src/main/java/com/google/rpc/ErrorDetailsProto.java
deleted file mode 100644
index e710185..0000000
--- a/src/main/java/com/google/rpc/ErrorDetailsProto.java
+++ /dev/null
@@ -1,206 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public final class ErrorDetailsProto {
- private ErrorDetailsProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_RetryInfo_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_RetryInfo_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_DebugInfo_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_DebugInfo_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_QuotaFailure_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_QuotaFailure_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_QuotaFailure_Violation_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_PreconditionFailure_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_PreconditionFailure_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_PreconditionFailure_Violation_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_PreconditionFailure_Violation_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_BadRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_BadRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_BadRequest_FieldViolation_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_RequestInfo_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_RequestInfo_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_ResourceInfo_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_ResourceInfo_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_Help_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_Help_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_Help_Link_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_Help_Link_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_LocalizedMessage_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_LocalizedMessage_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\036google/rpc/error_details.proto\022\ngoogle" +
- ".rpc\032\036google/protobuf/duration.proto\";\n\t" +
- "RetryInfo\022.\n\013retry_delay\030\001 \001(\0132\031.google." +
- "protobuf.Duration\"2\n\tDebugInfo\022\025\n\rstack_" +
- "entries\030\001 \003(\t\022\016\n\006detail\030\002 \001(\t\"y\n\014QuotaFa" +
- "ilure\0226\n\nviolations\030\001 \003(\0132\".google.rpc.Q" +
- "uotaFailure.Violation\0321\n\tViolation\022\017\n\007su" +
- "bject\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"\225\001\n\023Pre" +
- "conditionFailure\022=\n\nviolations\030\001 \003(\0132).g" +
- "oogle.rpc.PreconditionFailure.Violation\032" +
- "?\n\tViolation\022\014\n\004type\030\001 \001(\t\022\017\n\007subject\030\002 " +
- "\001(\t\022\023\n\013description\030\003 \001(\t\"\203\001\n\nBadRequest\022" +
- "?\n\020field_violations\030\001 \003(\0132%.google.rpc.B" +
- "adRequest.FieldViolation\0324\n\016FieldViolati" +
- "on\022\r\n\005field\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"7" +
- "\n\013RequestInfo\022\022\n\nrequest_id\030\001 \001(\t\022\024\n\014ser" +
- "ving_data\030\002 \001(\t\"`\n\014ResourceInfo\022\025\n\rresou" +
- "rce_type\030\001 \001(\t\022\025\n\rresource_name\030\002 \001(\t\022\r\n" +
- "\005owner\030\003 \001(\t\022\023\n\013description\030\004 \001(\t\"V\n\004Hel" +
- "p\022$\n\005links\030\001 \003(\0132\025.google.rpc.Help.Link\032" +
- "(\n\004Link\022\023\n\013description\030\001 \001(\t\022\013\n\003url\030\002 \001(" +
- "\t\"3\n\020LocalizedMessage\022\016\n\006locale\030\001 \001(\t\022\017\n" +
- "\007message\030\002 \001(\tBl\n\016com.google.rpcB\021ErrorD" +
- "etailsProtoP\001Z?google.golang.org/genprot" +
- "o/googleapis/rpc/errdetails;errdetails\242\002" +
- "\003RPCb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.DurationProto.getDescriptor(),
- });
- internal_static_google_rpc_RetryInfo_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_rpc_RetryInfo_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_RetryInfo_descriptor,
- new java.lang.String[] { "RetryDelay", });
- internal_static_google_rpc_DebugInfo_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_google_rpc_DebugInfo_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_DebugInfo_descriptor,
- new java.lang.String[] { "StackEntries", "Detail", });
- internal_static_google_rpc_QuotaFailure_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_google_rpc_QuotaFailure_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_QuotaFailure_descriptor,
- new java.lang.String[] { "Violations", });
- internal_static_google_rpc_QuotaFailure_Violation_descriptor =
- internal_static_google_rpc_QuotaFailure_descriptor.getNestedTypes().get(0);
- internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_QuotaFailure_Violation_descriptor,
- new java.lang.String[] { "Subject", "Description", });
- internal_static_google_rpc_PreconditionFailure_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_google_rpc_PreconditionFailure_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_PreconditionFailure_descriptor,
- new java.lang.String[] { "Violations", });
- internal_static_google_rpc_PreconditionFailure_Violation_descriptor =
- internal_static_google_rpc_PreconditionFailure_descriptor.getNestedTypes().get(0);
- internal_static_google_rpc_PreconditionFailure_Violation_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_PreconditionFailure_Violation_descriptor,
- new java.lang.String[] { "Type", "Subject", "Description", });
- internal_static_google_rpc_BadRequest_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_google_rpc_BadRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_BadRequest_descriptor,
- new java.lang.String[] { "FieldViolations", });
- internal_static_google_rpc_BadRequest_FieldViolation_descriptor =
- internal_static_google_rpc_BadRequest_descriptor.getNestedTypes().get(0);
- internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_BadRequest_FieldViolation_descriptor,
- new java.lang.String[] { "Field", "Description", });
- internal_static_google_rpc_RequestInfo_descriptor =
- getDescriptor().getMessageTypes().get(5);
- internal_static_google_rpc_RequestInfo_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_RequestInfo_descriptor,
- new java.lang.String[] { "RequestId", "ServingData", });
- internal_static_google_rpc_ResourceInfo_descriptor =
- getDescriptor().getMessageTypes().get(6);
- internal_static_google_rpc_ResourceInfo_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_ResourceInfo_descriptor,
- new java.lang.String[] { "ResourceType", "ResourceName", "Owner", "Description", });
- internal_static_google_rpc_Help_descriptor =
- getDescriptor().getMessageTypes().get(7);
- internal_static_google_rpc_Help_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_Help_descriptor,
- new java.lang.String[] { "Links", });
- internal_static_google_rpc_Help_Link_descriptor =
- internal_static_google_rpc_Help_descriptor.getNestedTypes().get(0);
- internal_static_google_rpc_Help_Link_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_Help_Link_descriptor,
- new java.lang.String[] { "Description", "Url", });
- internal_static_google_rpc_LocalizedMessage_descriptor =
- getDescriptor().getMessageTypes().get(8);
- internal_static_google_rpc_LocalizedMessage_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_LocalizedMessage_descriptor,
- new java.lang.String[] { "Locale", "Message", });
- com.google.protobuf.DurationProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/com/google/rpc/Help.java b/src/main/java/com/google/rpc/Help.java
deleted file mode 100644
index 43ab4a2..0000000
--- a/src/main/java/com/google/rpc/Help.java
+++ /dev/null
@@ -1,1648 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Provides links to documentation or for performing an out of band action.
- *
- * For example, if a quota check failed with an error indicating the calling
- * project hasn't enabled the accessed service, this can contain a URL pointing
- * directly to the right place in the developer console to flip the bit.
- *
- *
- * Protobuf type {@code google.rpc.Help}
- */
-public final class Help extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.Help)
- HelpOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use Help.newBuilder() to construct.
- private Help(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Help() {
- links_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Help();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.Help.class, com.google.rpc.Help.Builder.class);
- }
-
- public interface LinkOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.Help.Link)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @return The description.
- */
- java.lang.String getDescription();
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @return The bytes for description.
- */
- com.google.protobuf.ByteString
- getDescriptionBytes();
-
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @return The url.
- */
- java.lang.String getUrl();
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @return The bytes for url.
- */
- com.google.protobuf.ByteString
- getUrlBytes();
- }
- /**
- *
- * Describes a URL link.
- *
- *
- * Protobuf type {@code google.rpc.Help.Link}
- */
- public static final class Link extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.Help.Link)
- LinkOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Link.newBuilder() to construct.
- private Link(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Link() {
- description_ = "";
- url_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Link();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class);
- }
-
- public static final int DESCRIPTION_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object description_ = "";
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @return The description.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @return The bytes for description.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getDescriptionBytes() {
- java.lang.Object ref = description_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- description_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int URL_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object url_ = "";
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @return The url.
- */
- @java.lang.Override
- public java.lang.String getUrl() {
- java.lang.Object ref = url_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- url_ = s;
- return s;
- }
- }
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @return The bytes for url.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getUrlBytes() {
- java.lang.Object ref = url_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- url_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.Help.Link)) {
- return super.equals(obj);
- }
- com.google.rpc.Help.Link other = (com.google.rpc.Help.Link) obj;
-
- if (!getDescription()
- .equals(other.getDescription())) return false;
- if (!getUrl()
- .equals(other.getUrl())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
- hash = (53 * hash) + getDescription().hashCode();
- hash = (37 * hash) + URL_FIELD_NUMBER;
- hash = (53 * hash) + getUrl().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.Help.Link parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Help.Link parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Help.Link parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Help.Link parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Help.Link parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Help.Link parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Help.Link parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.Help.Link parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.Help.Link parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.Help.Link parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.Help.Link parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.Help.Link parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.Help.Link prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Describes a URL link.
- *
- *
- * Protobuf type {@code google.rpc.Help.Link}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.Help.Link)
- com.google.rpc.Help.LinkOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class);
- }
-
- // Construct using com.google.rpc.Help.Link.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- description_ = "";
- url_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.Help.Link getDefaultInstanceForType() {
- return com.google.rpc.Help.Link.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.Help.Link build() {
- com.google.rpc.Help.Link result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.Help.Link buildPartial() {
- com.google.rpc.Help.Link result = new com.google.rpc.Help.Link(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.Help.Link result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.description_ = description_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.url_ = url_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.Help.Link) {
- return mergeFrom((com.google.rpc.Help.Link)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.Help.Link other) {
- if (other == com.google.rpc.Help.Link.getDefaultInstance()) return this;
- if (!other.getDescription().isEmpty()) {
- description_ = other.description_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getUrl().isEmpty()) {
- url_ = other.url_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- description_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- url_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object description_ = "";
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @return The description.
- */
- 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;
- }
- }
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @return The bytes for description.
- */
- 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;
- }
- }
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @param value The description to set.
- * @return This builder for chaining.
- */
- public Builder setDescription(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- description_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @return This builder for chaining.
- */
- public Builder clearDescription() {
- description_ = getDefaultInstance().getDescription();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * Describes what the link offers.
- *
- *
- * string description = 1;
- * @param value The bytes for description to set.
- * @return This builder for chaining.
- */
- public Builder setDescriptionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- description_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object url_ = "";
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @return The url.
- */
- public java.lang.String getUrl() {
- java.lang.Object ref = url_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- url_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @return The bytes for url.
- */
- public com.google.protobuf.ByteString
- getUrlBytes() {
- java.lang.Object ref = url_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- url_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @param value The url to set.
- * @return This builder for chaining.
- */
- public Builder setUrl(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- url_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @return This builder for chaining.
- */
- public Builder clearUrl() {
- url_ = getDefaultInstance().getUrl();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * The URL of the link.
- *
- *
- * string url = 2;
- * @param value The bytes for url to set.
- * @return This builder for chaining.
- */
- public Builder setUrlBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- url_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.Help.Link)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.Help.Link)
- private static final com.google.rpc.Help.Link DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.Help.Link();
- }
-
- public static com.google.rpc.Help.Link getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Link parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.Help.Link getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public static final int LINKS_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private java.util.List links_;
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- @java.lang.Override
- public java.util.List getLinksList() {
- return links_;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.rpc.Help.LinkOrBuilder>
- getLinksOrBuilderList() {
- return links_;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- @java.lang.Override
- public int getLinksCount() {
- return links_.size();
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- @java.lang.Override
- public com.google.rpc.Help.Link getLinks(int index) {
- return links_.get(index);
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- @java.lang.Override
- public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder(
- int index) {
- return links_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < links_.size(); i++) {
- output.writeMessage(1, links_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < links_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, links_.get(i));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.Help)) {
- return super.equals(obj);
- }
- com.google.rpc.Help other = (com.google.rpc.Help) obj;
-
- if (!getLinksList()
- .equals(other.getLinksList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getLinksCount() > 0) {
- hash = (37 * hash) + LINKS_FIELD_NUMBER;
- hash = (53 * hash) + getLinksList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.Help parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Help parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Help parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Help parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Help parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Help parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Help parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.Help parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.Help parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.Help parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.Help parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.Help parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.Help prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Provides links to documentation or for performing an out of band action.
- *
- * For example, if a quota check failed with an error indicating the calling
- * project hasn't enabled the accessed service, this can contain a URL pointing
- * directly to the right place in the developer console to flip the bit.
- *
- *
- * Protobuf type {@code google.rpc.Help}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.Help)
- com.google.rpc.HelpOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.Help.class, com.google.rpc.Help.Builder.class);
- }
-
- // Construct using com.google.rpc.Help.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (linksBuilder_ == null) {
- links_ = java.util.Collections.emptyList();
- } else {
- links_ = null;
- linksBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.Help getDefaultInstanceForType() {
- return com.google.rpc.Help.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.Help build() {
- com.google.rpc.Help result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.Help buildPartial() {
- com.google.rpc.Help result = new com.google.rpc.Help(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.rpc.Help result) {
- if (linksBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- links_ = java.util.Collections.unmodifiableList(links_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.links_ = links_;
- } else {
- result.links_ = linksBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.rpc.Help result) {
- int from_bitField0_ = bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.Help) {
- return mergeFrom((com.google.rpc.Help)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.Help other) {
- if (other == com.google.rpc.Help.getDefaultInstance()) return this;
- if (linksBuilder_ == null) {
- if (!other.links_.isEmpty()) {
- if (links_.isEmpty()) {
- links_ = other.links_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureLinksIsMutable();
- links_.addAll(other.links_);
- }
- onChanged();
- }
- } else {
- if (!other.links_.isEmpty()) {
- if (linksBuilder_.isEmpty()) {
- linksBuilder_.dispose();
- linksBuilder_ = null;
- links_ = other.links_;
- bitField0_ = (bitField0_ & ~0x00000001);
- linksBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getLinksFieldBuilder() : null;
- } else {
- linksBuilder_.addAllMessages(other.links_);
- }
- }
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- com.google.rpc.Help.Link m =
- input.readMessage(
- com.google.rpc.Help.Link.parser(),
- extensionRegistry);
- if (linksBuilder_ == null) {
- ensureLinksIsMutable();
- links_.add(m);
- } else {
- linksBuilder_.addMessage(m);
- }
- break;
- } // case 10
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.util.List links_ =
- java.util.Collections.emptyList();
- private void ensureLinksIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- links_ = new java.util.ArrayList(links_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder> linksBuilder_;
-
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public java.util.List getLinksList() {
- if (linksBuilder_ == null) {
- return java.util.Collections.unmodifiableList(links_);
- } else {
- return linksBuilder_.getMessageList();
- }
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public int getLinksCount() {
- if (linksBuilder_ == null) {
- return links_.size();
- } else {
- return linksBuilder_.getCount();
- }
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public com.google.rpc.Help.Link getLinks(int index) {
- if (linksBuilder_ == null) {
- return links_.get(index);
- } else {
- return linksBuilder_.getMessage(index);
- }
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder setLinks(
- int index, com.google.rpc.Help.Link value) {
- if (linksBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLinksIsMutable();
- links_.set(index, value);
- onChanged();
- } else {
- linksBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder setLinks(
- int index, com.google.rpc.Help.Link.Builder builderForValue) {
- if (linksBuilder_ == null) {
- ensureLinksIsMutable();
- links_.set(index, builderForValue.build());
- onChanged();
- } else {
- linksBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder addLinks(com.google.rpc.Help.Link value) {
- if (linksBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLinksIsMutable();
- links_.add(value);
- onChanged();
- } else {
- linksBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder addLinks(
- int index, com.google.rpc.Help.Link value) {
- if (linksBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLinksIsMutable();
- links_.add(index, value);
- onChanged();
- } else {
- linksBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder addLinks(
- com.google.rpc.Help.Link.Builder builderForValue) {
- if (linksBuilder_ == null) {
- ensureLinksIsMutable();
- links_.add(builderForValue.build());
- onChanged();
- } else {
- linksBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder addLinks(
- int index, com.google.rpc.Help.Link.Builder builderForValue) {
- if (linksBuilder_ == null) {
- ensureLinksIsMutable();
- links_.add(index, builderForValue.build());
- onChanged();
- } else {
- linksBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder addAllLinks(
- java.lang.Iterable extends com.google.rpc.Help.Link> values) {
- if (linksBuilder_ == null) {
- ensureLinksIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, links_);
- onChanged();
- } else {
- linksBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder clearLinks() {
- if (linksBuilder_ == null) {
- links_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- linksBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public Builder removeLinks(int index) {
- if (linksBuilder_ == null) {
- ensureLinksIsMutable();
- links_.remove(index);
- onChanged();
- } else {
- linksBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public com.google.rpc.Help.Link.Builder getLinksBuilder(
- int index) {
- return getLinksFieldBuilder().getBuilder(index);
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder(
- int index) {
- if (linksBuilder_ == null) {
- return links_.get(index); } else {
- return linksBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public java.util.List extends com.google.rpc.Help.LinkOrBuilder>
- getLinksOrBuilderList() {
- if (linksBuilder_ != null) {
- return linksBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(links_);
- }
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public com.google.rpc.Help.Link.Builder addLinksBuilder() {
- return getLinksFieldBuilder().addBuilder(
- com.google.rpc.Help.Link.getDefaultInstance());
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public com.google.rpc.Help.Link.Builder addLinksBuilder(
- int index) {
- return getLinksFieldBuilder().addBuilder(
- index, com.google.rpc.Help.Link.getDefaultInstance());
- }
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- public java.util.List
- getLinksBuilderList() {
- return getLinksFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder>
- getLinksFieldBuilder() {
- if (linksBuilder_ == null) {
- linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder>(
- links_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- links_ = null;
- }
- return linksBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.Help)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.Help)
- private static final com.google.rpc.Help DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.Help();
- }
-
- public static com.google.rpc.Help getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Help parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.Help getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/HelpOrBuilder.java b/src/main/java/com/google/rpc/HelpOrBuilder.java
deleted file mode 100644
index 148ffca..0000000
--- a/src/main/java/com/google/rpc/HelpOrBuilder.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface HelpOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.Help)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- java.util.List
- getLinksList();
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- com.google.rpc.Help.Link getLinks(int index);
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- int getLinksCount();
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- java.util.List extends com.google.rpc.Help.LinkOrBuilder>
- getLinksOrBuilderList();
- /**
- *
- * URL(s) pointing to additional information on handling the current error.
- *
- *
- * repeated .google.rpc.Help.Link links = 1;
- */
- com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder(
- int index);
-}
diff --git a/src/main/java/com/google/rpc/LocalizedMessage.java b/src/main/java/com/google/rpc/LocalizedMessage.java
deleted file mode 100644
index 2810389..0000000
--- a/src/main/java/com/google/rpc/LocalizedMessage.java
+++ /dev/null
@@ -1,758 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Provides a localized error message that is safe to return to the user
- * which can be attached to an RPC error.
- *
- *
- * Protobuf type {@code google.rpc.LocalizedMessage}
- */
-public final class LocalizedMessage extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.LocalizedMessage)
- LocalizedMessageOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use LocalizedMessage.newBuilder() to construct.
- private LocalizedMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private LocalizedMessage() {
- locale_ = "";
- message_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new LocalizedMessage();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_LocalizedMessage_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_LocalizedMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.LocalizedMessage.class, com.google.rpc.LocalizedMessage.Builder.class);
- }
-
- public static final int LOCALE_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object locale_ = "";
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @return The locale.
- */
- @java.lang.Override
- public java.lang.String getLocale() {
- java.lang.Object ref = locale_;
- 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();
- locale_ = s;
- return s;
- }
- }
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @return The bytes for locale.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getLocaleBytes() {
- java.lang.Object ref = locale_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- locale_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int MESSAGE_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object message_ = "";
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @return The message.
- */
- @java.lang.Override
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- message_ = s;
- return s;
- }
- }
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @return The bytes for message.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- message_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, locale_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, locale_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.LocalizedMessage)) {
- return super.equals(obj);
- }
- com.google.rpc.LocalizedMessage other = (com.google.rpc.LocalizedMessage) obj;
-
- if (!getLocale()
- .equals(other.getLocale())) return false;
- if (!getMessage()
- .equals(other.getMessage())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + LOCALE_FIELD_NUMBER;
- hash = (53 * hash) + getLocale().hashCode();
- hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
- hash = (53 * hash) + getMessage().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.LocalizedMessage parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.LocalizedMessage parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.LocalizedMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.LocalizedMessage 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.LocalizedMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.LocalizedMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.LocalizedMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.LocalizedMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.LocalizedMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.LocalizedMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.LocalizedMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.LocalizedMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.LocalizedMessage prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Provides a localized error message that is safe to return to the user
- * which can be attached to an RPC error.
- *
- *
- * Protobuf type {@code google.rpc.LocalizedMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.LocalizedMessage)
- com.google.rpc.LocalizedMessageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_LocalizedMessage_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_LocalizedMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.LocalizedMessage.class, com.google.rpc.LocalizedMessage.Builder.class);
- }
-
- // Construct using com.google.rpc.LocalizedMessage.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- locale_ = "";
- message_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_LocalizedMessage_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.LocalizedMessage getDefaultInstanceForType() {
- return com.google.rpc.LocalizedMessage.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.LocalizedMessage build() {
- com.google.rpc.LocalizedMessage result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.LocalizedMessage buildPartial() {
- com.google.rpc.LocalizedMessage result = new com.google.rpc.LocalizedMessage(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.LocalizedMessage result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.locale_ = locale_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.message_ = message_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.LocalizedMessage) {
- return mergeFrom((com.google.rpc.LocalizedMessage)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.LocalizedMessage other) {
- if (other == com.google.rpc.LocalizedMessage.getDefaultInstance()) return this;
- if (!other.getLocale().isEmpty()) {
- locale_ = other.locale_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getMessage().isEmpty()) {
- message_ = other.message_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- locale_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- message_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object locale_ = "";
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @return The locale.
- */
- public java.lang.String getLocale() {
- java.lang.Object ref = locale_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- locale_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @return The bytes for locale.
- */
- public com.google.protobuf.ByteString
- getLocaleBytes() {
- java.lang.Object ref = locale_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- locale_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @param value The locale to set.
- * @return This builder for chaining.
- */
- public Builder setLocale(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- locale_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @return This builder for chaining.
- */
- public Builder clearLocale() {
- locale_ = getDefaultInstance().getLocale();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @param value The bytes for locale to set.
- * @return This builder for chaining.
- */
- public Builder setLocaleBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- locale_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object message_ = "";
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @return The message.
- */
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- message_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @return The bytes for message.
- */
- public com.google.protobuf.ByteString
- getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- message_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @param value The message to set.
- * @return This builder for chaining.
- */
- public Builder setMessage(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- message_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @return This builder for chaining.
- */
- public Builder clearMessage() {
- message_ = getDefaultInstance().getMessage();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @param value The bytes for message to set.
- * @return This builder for chaining.
- */
- public Builder setMessageBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- message_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.LocalizedMessage)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.LocalizedMessage)
- private static final com.google.rpc.LocalizedMessage DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.LocalizedMessage();
- }
-
- public static com.google.rpc.LocalizedMessage getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public LocalizedMessage parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.LocalizedMessage getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/LocalizedMessageOrBuilder.java b/src/main/java/com/google/rpc/LocalizedMessageOrBuilder.java
deleted file mode 100644
index 31417df..0000000
--- a/src/main/java/com/google/rpc/LocalizedMessageOrBuilder.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface LocalizedMessageOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.LocalizedMessage)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @return The locale.
- */
- java.lang.String getLocale();
- /**
- *
- * The locale used following the specification defined at
- * http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- * Examples are: "en-US", "fr-CH", "es-MX"
- *
- *
- * string locale = 1;
- * @return The bytes for locale.
- */
- com.google.protobuf.ByteString
- getLocaleBytes();
-
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @return The message.
- */
- java.lang.String getMessage();
- /**
- *
- * The localized error message in the above locale.
- *
- *
- * string message = 2;
- * @return The bytes for message.
- */
- com.google.protobuf.ByteString
- getMessageBytes();
-}
diff --git a/src/main/java/com/google/rpc/PreconditionFailure.java b/src/main/java/com/google/rpc/PreconditionFailure.java
deleted file mode 100644
index 234c50a..0000000
--- a/src/main/java/com/google/rpc/PreconditionFailure.java
+++ /dev/null
@@ -1,1895 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Describes what preconditions have failed.
- *
- * For example, if an RPC failed because it required the Terms of Service to be
- * acknowledged, it could list the terms of service violation in the
- * PreconditionFailure message.
- *
- *
- * Protobuf type {@code google.rpc.PreconditionFailure}
- */
-public final class PreconditionFailure extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.PreconditionFailure)
- PreconditionFailureOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use PreconditionFailure.newBuilder() to construct.
- private PreconditionFailure(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private PreconditionFailure() {
- violations_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new PreconditionFailure();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.PreconditionFailure.class, com.google.rpc.PreconditionFailure.Builder.class);
- }
-
- public interface ViolationOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.PreconditionFailure.Violation)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @return The type.
- */
- java.lang.String getType();
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @return The bytes for type.
- */
- com.google.protobuf.ByteString
- getTypeBytes();
-
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @return The subject.
- */
- java.lang.String getSubject();
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @return The bytes for subject.
- */
- com.google.protobuf.ByteString
- getSubjectBytes();
-
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @return The description.
- */
- java.lang.String getDescription();
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @return The bytes for description.
- */
- com.google.protobuf.ByteString
- getDescriptionBytes();
- }
- /**
- *
- * A message type used to describe a single precondition failure.
- *
- *
- * Protobuf type {@code google.rpc.PreconditionFailure.Violation}
- */
- public static final class Violation extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.PreconditionFailure.Violation)
- ViolationOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Violation.newBuilder() to construct.
- private Violation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Violation() {
- type_ = "";
- subject_ = "";
- description_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Violation();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_Violation_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_Violation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.PreconditionFailure.Violation.class, com.google.rpc.PreconditionFailure.Violation.Builder.class);
- }
-
- public static final int TYPE_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object type_ = "";
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @return The type.
- */
- @java.lang.Override
- public java.lang.String getType() {
- java.lang.Object ref = type_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- type_ = s;
- return s;
- }
- }
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @return The bytes for type.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getTypeBytes() {
- java.lang.Object ref = type_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- type_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SUBJECT_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object subject_ = "";
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @return The subject.
- */
- @java.lang.Override
- public java.lang.String getSubject() {
- java.lang.Object ref = subject_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- subject_ = s;
- return s;
- }
- }
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @return The bytes for subject.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getSubjectBytes() {
- java.lang.Object ref = subject_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- subject_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int DESCRIPTION_FIELD_NUMBER = 3;
- @SuppressWarnings("serial")
- private volatile java.lang.Object description_ = "";
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @return The description.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @return The bytes for description.
- */
- @java.lang.Override
- 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;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subject_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subject_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.PreconditionFailure.Violation)) {
- return super.equals(obj);
- }
- com.google.rpc.PreconditionFailure.Violation other = (com.google.rpc.PreconditionFailure.Violation) obj;
-
- if (!getType()
- .equals(other.getType())) return false;
- if (!getSubject()
- .equals(other.getSubject())) return false;
- if (!getDescription()
- .equals(other.getDescription())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + getType().hashCode();
- hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
- hash = (53 * hash) + getSubject().hashCode();
- hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
- hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.PreconditionFailure.Violation parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.PreconditionFailure.Violation parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.PreconditionFailure.Violation parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.PreconditionFailure.Violation prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * A message type used to describe a single precondition failure.
- *
- *
- * Protobuf type {@code google.rpc.PreconditionFailure.Violation}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.PreconditionFailure.Violation)
- com.google.rpc.PreconditionFailure.ViolationOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_Violation_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_Violation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.PreconditionFailure.Violation.class, com.google.rpc.PreconditionFailure.Violation.Builder.class);
- }
-
- // Construct using com.google.rpc.PreconditionFailure.Violation.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- type_ = "";
- subject_ = "";
- description_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_Violation_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure.Violation getDefaultInstanceForType() {
- return com.google.rpc.PreconditionFailure.Violation.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure.Violation build() {
- com.google.rpc.PreconditionFailure.Violation result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure.Violation buildPartial() {
- com.google.rpc.PreconditionFailure.Violation result = new com.google.rpc.PreconditionFailure.Violation(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.PreconditionFailure.Violation result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.type_ = type_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.subject_ = subject_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.description_ = description_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.PreconditionFailure.Violation) {
- return mergeFrom((com.google.rpc.PreconditionFailure.Violation)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.PreconditionFailure.Violation other) {
- if (other == com.google.rpc.PreconditionFailure.Violation.getDefaultInstance()) return this;
- if (!other.getType().isEmpty()) {
- type_ = other.type_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getSubject().isEmpty()) {
- subject_ = other.subject_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (!other.getDescription().isEmpty()) {
- description_ = other.description_;
- bitField0_ |= 0x00000004;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- type_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- subject_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26: {
- description_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object type_ = "";
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @return The type.
- */
- public java.lang.String getType() {
- java.lang.Object ref = type_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- type_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @return The bytes for type.
- */
- public com.google.protobuf.ByteString
- getTypeBytes() {
- java.lang.Object ref = type_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- type_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @param value The type to set.
- * @return This builder for chaining.
- */
- public Builder setType(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- type_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @return This builder for chaining.
- */
- public Builder clearType() {
- type_ = getDefaultInstance().getType();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * The type of PreconditionFailure. We recommend using a service-specific
- * enum type to define the supported precondition violation types. For
- * example, "TOS" for "Terms of Service violation".
- *
- *
- * string type = 1;
- * @param value The bytes for type to set.
- * @return This builder for chaining.
- */
- public Builder setTypeBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- type_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object subject_ = "";
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @return The subject.
- */
- public java.lang.String getSubject() {
- java.lang.Object ref = subject_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- subject_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @return The bytes for subject.
- */
- public com.google.protobuf.ByteString
- getSubjectBytes() {
- java.lang.Object ref = subject_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- subject_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @param value The subject to set.
- * @return This builder for chaining.
- */
- public Builder setSubject(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- subject_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @return This builder for chaining.
- */
- public Builder clearSubject() {
- subject_ = getDefaultInstance().getSubject();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * The subject, relative to the type, that failed.
- * For example, "google.com/cloud" relative to the "TOS" type would
- * indicate which terms of service is being referenced.
- *
- *
- * string subject = 2;
- * @param value The bytes for subject to set.
- * @return This builder for chaining.
- */
- public Builder setSubjectBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- subject_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private java.lang.Object description_ = "";
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @return The description.
- */
- 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;
- }
- }
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @return The bytes for description.
- */
- 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;
- }
- }
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @param value The description to set.
- * @return This builder for chaining.
- */
- public Builder setDescription(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- description_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @return This builder for chaining.
- */
- public Builder clearDescription() {
- description_ = getDefaultInstance().getDescription();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
- /**
- *
- * A description of how the precondition failed. Developers can use this
- * description to understand how to fix the failure.
- *
- * For example: "Terms of service not accepted".
- *
- *
- * string description = 3;
- * @param value The bytes for description to set.
- * @return This builder for chaining.
- */
- public Builder setDescriptionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- description_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.PreconditionFailure.Violation)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.PreconditionFailure.Violation)
- private static final com.google.rpc.PreconditionFailure.Violation DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.PreconditionFailure.Violation();
- }
-
- public static com.google.rpc.PreconditionFailure.Violation getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Violation parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure.Violation getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public static final int VIOLATIONS_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private java.util.List violations_;
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- @java.lang.Override
- public java.util.List getViolationsList() {
- return violations_;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.rpc.PreconditionFailure.ViolationOrBuilder>
- getViolationsOrBuilderList() {
- return violations_;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- @java.lang.Override
- public int getViolationsCount() {
- return violations_.size();
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- @java.lang.Override
- public com.google.rpc.PreconditionFailure.Violation getViolations(int index) {
- return violations_.get(index);
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- @java.lang.Override
- public com.google.rpc.PreconditionFailure.ViolationOrBuilder getViolationsOrBuilder(
- int index) {
- return violations_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < violations_.size(); i++) {
- output.writeMessage(1, violations_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < violations_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, violations_.get(i));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.PreconditionFailure)) {
- return super.equals(obj);
- }
- com.google.rpc.PreconditionFailure other = (com.google.rpc.PreconditionFailure) obj;
-
- if (!getViolationsList()
- .equals(other.getViolationsList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getViolationsCount() > 0) {
- hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER;
- hash = (53 * hash) + getViolationsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.PreconditionFailure parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.PreconditionFailure parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.PreconditionFailure parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.PreconditionFailure 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.PreconditionFailure parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.PreconditionFailure parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.PreconditionFailure parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.PreconditionFailure parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.PreconditionFailure parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.PreconditionFailure parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.PreconditionFailure parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.PreconditionFailure parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.PreconditionFailure prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Describes what preconditions have failed.
- *
- * For example, if an RPC failed because it required the Terms of Service to be
- * acknowledged, it could list the terms of service violation in the
- * PreconditionFailure message.
- *
- *
- * Protobuf type {@code google.rpc.PreconditionFailure}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.PreconditionFailure)
- com.google.rpc.PreconditionFailureOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.PreconditionFailure.class, com.google.rpc.PreconditionFailure.Builder.class);
- }
-
- // Construct using com.google.rpc.PreconditionFailure.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (violationsBuilder_ == null) {
- violations_ = java.util.Collections.emptyList();
- } else {
- violations_ = null;
- violationsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_PreconditionFailure_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure getDefaultInstanceForType() {
- return com.google.rpc.PreconditionFailure.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure build() {
- com.google.rpc.PreconditionFailure result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure buildPartial() {
- com.google.rpc.PreconditionFailure result = new com.google.rpc.PreconditionFailure(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.rpc.PreconditionFailure result) {
- if (violationsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- violations_ = java.util.Collections.unmodifiableList(violations_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.violations_ = violations_;
- } else {
- result.violations_ = violationsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.rpc.PreconditionFailure result) {
- int from_bitField0_ = bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.PreconditionFailure) {
- return mergeFrom((com.google.rpc.PreconditionFailure)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.PreconditionFailure other) {
- if (other == com.google.rpc.PreconditionFailure.getDefaultInstance()) return this;
- if (violationsBuilder_ == null) {
- if (!other.violations_.isEmpty()) {
- if (violations_.isEmpty()) {
- violations_ = other.violations_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureViolationsIsMutable();
- violations_.addAll(other.violations_);
- }
- onChanged();
- }
- } else {
- if (!other.violations_.isEmpty()) {
- if (violationsBuilder_.isEmpty()) {
- violationsBuilder_.dispose();
- violationsBuilder_ = null;
- violations_ = other.violations_;
- bitField0_ = (bitField0_ & ~0x00000001);
- violationsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getViolationsFieldBuilder() : null;
- } else {
- violationsBuilder_.addAllMessages(other.violations_);
- }
- }
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- com.google.rpc.PreconditionFailure.Violation m =
- input.readMessage(
- com.google.rpc.PreconditionFailure.Violation.parser(),
- extensionRegistry);
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.add(m);
- } else {
- violationsBuilder_.addMessage(m);
- }
- break;
- } // case 10
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.util.List violations_ =
- java.util.Collections.emptyList();
- private void ensureViolationsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- violations_ = new java.util.ArrayList(violations_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.PreconditionFailure.Violation, com.google.rpc.PreconditionFailure.Violation.Builder, com.google.rpc.PreconditionFailure.ViolationOrBuilder> violationsBuilder_;
-
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public java.util.List getViolationsList() {
- if (violationsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(violations_);
- } else {
- return violationsBuilder_.getMessageList();
- }
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public int getViolationsCount() {
- if (violationsBuilder_ == null) {
- return violations_.size();
- } else {
- return violationsBuilder_.getCount();
- }
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public com.google.rpc.PreconditionFailure.Violation getViolations(int index) {
- if (violationsBuilder_ == null) {
- return violations_.get(index);
- } else {
- return violationsBuilder_.getMessage(index);
- }
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder setViolations(
- int index, com.google.rpc.PreconditionFailure.Violation value) {
- if (violationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureViolationsIsMutable();
- violations_.set(index, value);
- onChanged();
- } else {
- violationsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder setViolations(
- int index, com.google.rpc.PreconditionFailure.Violation.Builder builderForValue) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.set(index, builderForValue.build());
- onChanged();
- } else {
- violationsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder addViolations(com.google.rpc.PreconditionFailure.Violation value) {
- if (violationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureViolationsIsMutable();
- violations_.add(value);
- onChanged();
- } else {
- violationsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder addViolations(
- int index, com.google.rpc.PreconditionFailure.Violation value) {
- if (violationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureViolationsIsMutable();
- violations_.add(index, value);
- onChanged();
- } else {
- violationsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder addViolations(
- com.google.rpc.PreconditionFailure.Violation.Builder builderForValue) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.add(builderForValue.build());
- onChanged();
- } else {
- violationsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder addViolations(
- int index, com.google.rpc.PreconditionFailure.Violation.Builder builderForValue) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.add(index, builderForValue.build());
- onChanged();
- } else {
- violationsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder addAllViolations(
- java.lang.Iterable extends com.google.rpc.PreconditionFailure.Violation> values) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, violations_);
- onChanged();
- } else {
- violationsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder clearViolations() {
- if (violationsBuilder_ == null) {
- violations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- violationsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public Builder removeViolations(int index) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.remove(index);
- onChanged();
- } else {
- violationsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public com.google.rpc.PreconditionFailure.Violation.Builder getViolationsBuilder(
- int index) {
- return getViolationsFieldBuilder().getBuilder(index);
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public com.google.rpc.PreconditionFailure.ViolationOrBuilder getViolationsOrBuilder(
- int index) {
- if (violationsBuilder_ == null) {
- return violations_.get(index); } else {
- return violationsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public java.util.List extends com.google.rpc.PreconditionFailure.ViolationOrBuilder>
- getViolationsOrBuilderList() {
- if (violationsBuilder_ != null) {
- return violationsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(violations_);
- }
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public com.google.rpc.PreconditionFailure.Violation.Builder addViolationsBuilder() {
- return getViolationsFieldBuilder().addBuilder(
- com.google.rpc.PreconditionFailure.Violation.getDefaultInstance());
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public com.google.rpc.PreconditionFailure.Violation.Builder addViolationsBuilder(
- int index) {
- return getViolationsFieldBuilder().addBuilder(
- index, com.google.rpc.PreconditionFailure.Violation.getDefaultInstance());
- }
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- public java.util.List
- getViolationsBuilderList() {
- return getViolationsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.PreconditionFailure.Violation, com.google.rpc.PreconditionFailure.Violation.Builder, com.google.rpc.PreconditionFailure.ViolationOrBuilder>
- getViolationsFieldBuilder() {
- if (violationsBuilder_ == null) {
- violationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.PreconditionFailure.Violation, com.google.rpc.PreconditionFailure.Violation.Builder, com.google.rpc.PreconditionFailure.ViolationOrBuilder>(
- violations_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- violations_ = null;
- }
- return violationsBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.PreconditionFailure)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.PreconditionFailure)
- private static final com.google.rpc.PreconditionFailure DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.PreconditionFailure();
- }
-
- public static com.google.rpc.PreconditionFailure getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public PreconditionFailure parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.PreconditionFailure getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/PreconditionFailureOrBuilder.java b/src/main/java/com/google/rpc/PreconditionFailureOrBuilder.java
deleted file mode 100644
index 368a0a3..0000000
--- a/src/main/java/com/google/rpc/PreconditionFailureOrBuilder.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface PreconditionFailureOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.PreconditionFailure)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- java.util.List
- getViolationsList();
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- com.google.rpc.PreconditionFailure.Violation getViolations(int index);
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- int getViolationsCount();
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- java.util.List extends com.google.rpc.PreconditionFailure.ViolationOrBuilder>
- getViolationsOrBuilderList();
- /**
- *
- * Describes all precondition violations.
- *
- *
- * repeated .google.rpc.PreconditionFailure.Violation violations = 1;
- */
- com.google.rpc.PreconditionFailure.ViolationOrBuilder getViolationsOrBuilder(
- int index);
-}
diff --git a/src/main/java/com/google/rpc/QuotaFailure.java b/src/main/java/com/google/rpc/QuotaFailure.java
deleted file mode 100644
index b0907b7..0000000
--- a/src/main/java/com/google/rpc/QuotaFailure.java
+++ /dev/null
@@ -1,1734 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Describes how a quota check failed.
- *
- * For example if a daily limit was exceeded for the calling project,
- * a service could respond with a QuotaFailure detail containing the project
- * id and the description of the quota limit that was exceeded. If the
- * calling project hasn't enabled the service in the developer console, then
- * a service could respond with the project id and set `service_disabled`
- * to true.
- *
- * Also see RetryDetail and Help types for other details about handling a
- * quota failure.
- *
- *
- * Protobuf type {@code google.rpc.QuotaFailure}
- */
-public final class QuotaFailure extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure)
- QuotaFailureOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use QuotaFailure.newBuilder() to construct.
- private QuotaFailure(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private QuotaFailure() {
- violations_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new QuotaFailure();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.QuotaFailure.class, com.google.rpc.QuotaFailure.Builder.class);
- }
-
- public interface ViolationOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.QuotaFailure.Violation)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @return The subject.
- */
- java.lang.String getSubject();
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @return The bytes for subject.
- */
- com.google.protobuf.ByteString
- getSubjectBytes();
-
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @return The description.
- */
- java.lang.String getDescription();
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @return The bytes for description.
- */
- com.google.protobuf.ByteString
- getDescriptionBytes();
- }
- /**
- *
- * A message type used to describe a single quota violation. For example, a
- * daily quota or a custom quota that was exceeded.
- *
- *
- * Protobuf type {@code google.rpc.QuotaFailure.Violation}
- */
- public static final class Violation extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure.Violation)
- ViolationOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Violation.newBuilder() to construct.
- private Violation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Violation() {
- subject_ = "";
- description_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Violation();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.QuotaFailure.Violation.class, com.google.rpc.QuotaFailure.Violation.Builder.class);
- }
-
- public static final int SUBJECT_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object subject_ = "";
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @return The subject.
- */
- @java.lang.Override
- public java.lang.String getSubject() {
- java.lang.Object ref = subject_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- subject_ = s;
- return s;
- }
- }
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @return The bytes for subject.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getSubjectBytes() {
- java.lang.Object ref = subject_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- subject_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int DESCRIPTION_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object description_ = "";
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @return The description.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @return The bytes for description.
- */
- @java.lang.Override
- 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;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subject_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subject_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.QuotaFailure.Violation)) {
- return super.equals(obj);
- }
- com.google.rpc.QuotaFailure.Violation other = (com.google.rpc.QuotaFailure.Violation) obj;
-
- if (!getSubject()
- .equals(other.getSubject())) return false;
- if (!getDescription()
- .equals(other.getDescription())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
- hash = (53 * hash) + getSubject().hashCode();
- hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
- hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.QuotaFailure.Violation parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.QuotaFailure.Violation prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * A message type used to describe a single quota violation. For example, a
- * daily quota or a custom quota that was exceeded.
- *
- *
- * Protobuf type {@code google.rpc.QuotaFailure.Violation}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure.Violation)
- com.google.rpc.QuotaFailure.ViolationOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.QuotaFailure.Violation.class, com.google.rpc.QuotaFailure.Violation.Builder.class);
- }
-
- // Construct using com.google.rpc.QuotaFailure.Violation.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- subject_ = "";
- description_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure.Violation getDefaultInstanceForType() {
- return com.google.rpc.QuotaFailure.Violation.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure.Violation build() {
- com.google.rpc.QuotaFailure.Violation result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure.Violation buildPartial() {
- com.google.rpc.QuotaFailure.Violation result = new com.google.rpc.QuotaFailure.Violation(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.QuotaFailure.Violation result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.subject_ = subject_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.description_ = description_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.QuotaFailure.Violation) {
- return mergeFrom((com.google.rpc.QuotaFailure.Violation)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.QuotaFailure.Violation other) {
- if (other == com.google.rpc.QuotaFailure.Violation.getDefaultInstance()) return this;
- if (!other.getSubject().isEmpty()) {
- subject_ = other.subject_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getDescription().isEmpty()) {
- description_ = other.description_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- subject_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- description_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object subject_ = "";
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @return The subject.
- */
- public java.lang.String getSubject() {
- java.lang.Object ref = subject_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- subject_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @return The bytes for subject.
- */
- public com.google.protobuf.ByteString
- getSubjectBytes() {
- java.lang.Object ref = subject_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- subject_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @param value The subject to set.
- * @return This builder for chaining.
- */
- public Builder setSubject(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- subject_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @return This builder for chaining.
- */
- public Builder clearSubject() {
- subject_ = getDefaultInstance().getSubject();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * The subject on which the quota check failed.
- * For example, "clientip:<ip address of client>" or "project:<Google
- * developer project id>".
- *
- *
- * string subject = 1;
- * @param value The bytes for subject to set.
- * @return This builder for chaining.
- */
- public Builder setSubjectBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- subject_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object description_ = "";
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @return The description.
- */
- 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;
- }
- }
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @return The bytes for description.
- */
- 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;
- }
- }
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @param value The description to set.
- * @return This builder for chaining.
- */
- public Builder setDescription(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- description_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @return This builder for chaining.
- */
- public Builder clearDescription() {
- description_ = getDefaultInstance().getDescription();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * A description of how the quota check failed. Clients can use this
- * description to find more about the quota configuration in the service's
- * public documentation, or find the relevant quota limit to adjust through
- * developer console.
- *
- * For example: "Service disabled" or "Daily Limit for read operations
- * exceeded".
- *
- *
- * string description = 2;
- * @param value The bytes for description to set.
- * @return This builder for chaining.
- */
- public Builder setDescriptionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- description_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.QuotaFailure.Violation)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure.Violation)
- private static final com.google.rpc.QuotaFailure.Violation DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.QuotaFailure.Violation();
- }
-
- public static com.google.rpc.QuotaFailure.Violation getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Violation parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure.Violation getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public static final int VIOLATIONS_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private java.util.List violations_;
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- @java.lang.Override
- public java.util.List getViolationsList() {
- return violations_;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.rpc.QuotaFailure.ViolationOrBuilder>
- getViolationsOrBuilderList() {
- return violations_;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- @java.lang.Override
- public int getViolationsCount() {
- return violations_.size();
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- @java.lang.Override
- public com.google.rpc.QuotaFailure.Violation getViolations(int index) {
- return violations_.get(index);
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- @java.lang.Override
- public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder(
- int index) {
- return violations_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < violations_.size(); i++) {
- output.writeMessage(1, violations_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < violations_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, violations_.get(i));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.QuotaFailure)) {
- return super.equals(obj);
- }
- com.google.rpc.QuotaFailure other = (com.google.rpc.QuotaFailure) obj;
-
- if (!getViolationsList()
- .equals(other.getViolationsList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getViolationsCount() > 0) {
- hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER;
- hash = (53 * hash) + getViolationsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.QuotaFailure parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.QuotaFailure parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.QuotaFailure parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.QuotaFailure parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.QuotaFailure parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.QuotaFailure parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.QuotaFailure parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.QuotaFailure parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.QuotaFailure parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.QuotaFailure prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Describes how a quota check failed.
- *
- * For example if a daily limit was exceeded for the calling project,
- * a service could respond with a QuotaFailure detail containing the project
- * id and the description of the quota limit that was exceeded. If the
- * calling project hasn't enabled the service in the developer console, then
- * a service could respond with the project id and set `service_disabled`
- * to true.
- *
- * Also see RetryDetail and Help types for other details about handling a
- * quota failure.
- *
- *
- * Protobuf type {@code google.rpc.QuotaFailure}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure)
- com.google.rpc.QuotaFailureOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.QuotaFailure.class, com.google.rpc.QuotaFailure.Builder.class);
- }
-
- // Construct using com.google.rpc.QuotaFailure.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (violationsBuilder_ == null) {
- violations_ = java.util.Collections.emptyList();
- } else {
- violations_ = null;
- violationsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure getDefaultInstanceForType() {
- return com.google.rpc.QuotaFailure.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure build() {
- com.google.rpc.QuotaFailure result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure buildPartial() {
- com.google.rpc.QuotaFailure result = new com.google.rpc.QuotaFailure(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.rpc.QuotaFailure result) {
- if (violationsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- violations_ = java.util.Collections.unmodifiableList(violations_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.violations_ = violations_;
- } else {
- result.violations_ = violationsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.rpc.QuotaFailure result) {
- int from_bitField0_ = bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.QuotaFailure) {
- return mergeFrom((com.google.rpc.QuotaFailure)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.QuotaFailure other) {
- if (other == com.google.rpc.QuotaFailure.getDefaultInstance()) return this;
- if (violationsBuilder_ == null) {
- if (!other.violations_.isEmpty()) {
- if (violations_.isEmpty()) {
- violations_ = other.violations_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureViolationsIsMutable();
- violations_.addAll(other.violations_);
- }
- onChanged();
- }
- } else {
- if (!other.violations_.isEmpty()) {
- if (violationsBuilder_.isEmpty()) {
- violationsBuilder_.dispose();
- violationsBuilder_ = null;
- violations_ = other.violations_;
- bitField0_ = (bitField0_ & ~0x00000001);
- violationsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getViolationsFieldBuilder() : null;
- } else {
- violationsBuilder_.addAllMessages(other.violations_);
- }
- }
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- com.google.rpc.QuotaFailure.Violation m =
- input.readMessage(
- com.google.rpc.QuotaFailure.Violation.parser(),
- extensionRegistry);
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.add(m);
- } else {
- violationsBuilder_.addMessage(m);
- }
- break;
- } // case 10
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.util.List violations_ =
- java.util.Collections.emptyList();
- private void ensureViolationsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- violations_ = new java.util.ArrayList(violations_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder> violationsBuilder_;
-
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public java.util.List getViolationsList() {
- if (violationsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(violations_);
- } else {
- return violationsBuilder_.getMessageList();
- }
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public int getViolationsCount() {
- if (violationsBuilder_ == null) {
- return violations_.size();
- } else {
- return violationsBuilder_.getCount();
- }
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public com.google.rpc.QuotaFailure.Violation getViolations(int index) {
- if (violationsBuilder_ == null) {
- return violations_.get(index);
- } else {
- return violationsBuilder_.getMessage(index);
- }
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder setViolations(
- int index, com.google.rpc.QuotaFailure.Violation value) {
- if (violationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureViolationsIsMutable();
- violations_.set(index, value);
- onChanged();
- } else {
- violationsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder setViolations(
- int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.set(index, builderForValue.build());
- onChanged();
- } else {
- violationsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder addViolations(com.google.rpc.QuotaFailure.Violation value) {
- if (violationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureViolationsIsMutable();
- violations_.add(value);
- onChanged();
- } else {
- violationsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder addViolations(
- int index, com.google.rpc.QuotaFailure.Violation value) {
- if (violationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureViolationsIsMutable();
- violations_.add(index, value);
- onChanged();
- } else {
- violationsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder addViolations(
- com.google.rpc.QuotaFailure.Violation.Builder builderForValue) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.add(builderForValue.build());
- onChanged();
- } else {
- violationsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder addViolations(
- int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.add(index, builderForValue.build());
- onChanged();
- } else {
- violationsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder addAllViolations(
- java.lang.Iterable extends com.google.rpc.QuotaFailure.Violation> values) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, violations_);
- onChanged();
- } else {
- violationsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder clearViolations() {
- if (violationsBuilder_ == null) {
- violations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- violationsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public Builder removeViolations(int index) {
- if (violationsBuilder_ == null) {
- ensureViolationsIsMutable();
- violations_.remove(index);
- onChanged();
- } else {
- violationsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public com.google.rpc.QuotaFailure.Violation.Builder getViolationsBuilder(
- int index) {
- return getViolationsFieldBuilder().getBuilder(index);
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder(
- int index) {
- if (violationsBuilder_ == null) {
- return violations_.get(index); } else {
- return violationsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public java.util.List extends com.google.rpc.QuotaFailure.ViolationOrBuilder>
- getViolationsOrBuilderList() {
- if (violationsBuilder_ != null) {
- return violationsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(violations_);
- }
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder() {
- return getViolationsFieldBuilder().addBuilder(
- com.google.rpc.QuotaFailure.Violation.getDefaultInstance());
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder(
- int index) {
- return getViolationsFieldBuilder().addBuilder(
- index, com.google.rpc.QuotaFailure.Violation.getDefaultInstance());
- }
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- public java.util.List
- getViolationsBuilderList() {
- return getViolationsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder>
- getViolationsFieldBuilder() {
- if (violationsBuilder_ == null) {
- violationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder>(
- violations_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- violations_ = null;
- }
- return violationsBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.QuotaFailure)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure)
- private static final com.google.rpc.QuotaFailure DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.QuotaFailure();
- }
-
- public static com.google.rpc.QuotaFailure getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public QuotaFailure parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.QuotaFailure getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java b/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java
deleted file mode 100644
index 2f0ea20..0000000
--- a/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface QuotaFailureOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.QuotaFailure)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- java.util.List
- getViolationsList();
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- com.google.rpc.QuotaFailure.Violation getViolations(int index);
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- int getViolationsCount();
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- java.util.List extends com.google.rpc.QuotaFailure.ViolationOrBuilder>
- getViolationsOrBuilderList();
- /**
- *
- * Describes all quota violations.
- *
- *
- * repeated .google.rpc.QuotaFailure.Violation violations = 1;
- */
- com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder(
- int index);
-}
diff --git a/src/main/java/com/google/rpc/RequestInfo.java b/src/main/java/com/google/rpc/RequestInfo.java
deleted file mode 100644
index 723a4ec..0000000
--- a/src/main/java/com/google/rpc/RequestInfo.java
+++ /dev/null
@@ -1,758 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Contains metadata about the request that clients can attach when filing a bug
- * or providing other forms of feedback.
- *
- *
- * Protobuf type {@code google.rpc.RequestInfo}
- */
-public final class RequestInfo extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.RequestInfo)
- RequestInfoOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use RequestInfo.newBuilder() to construct.
- private RequestInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private RequestInfo() {
- requestId_ = "";
- servingData_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new RequestInfo();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.RequestInfo.class, com.google.rpc.RequestInfo.Builder.class);
- }
-
- public static final int REQUEST_ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object requestId_ = "";
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @return The requestId.
- */
- @java.lang.Override
- public java.lang.String getRequestId() {
- java.lang.Object ref = requestId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- requestId_ = s;
- return s;
- }
- }
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @return The bytes for requestId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getRequestIdBytes() {
- java.lang.Object ref = requestId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- requestId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SERVING_DATA_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object servingData_ = "";
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @return The servingData.
- */
- @java.lang.Override
- public java.lang.String getServingData() {
- java.lang.Object ref = servingData_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- servingData_ = s;
- return s;
- }
- }
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @return The bytes for servingData.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getServingDataBytes() {
- java.lang.Object ref = servingData_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- servingData_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requestId_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingData_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, servingData_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requestId_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingData_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, servingData_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.RequestInfo)) {
- return super.equals(obj);
- }
- com.google.rpc.RequestInfo other = (com.google.rpc.RequestInfo) obj;
-
- if (!getRequestId()
- .equals(other.getRequestId())) return false;
- if (!getServingData()
- .equals(other.getServingData())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER;
- hash = (53 * hash) + getRequestId().hashCode();
- hash = (37 * hash) + SERVING_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getServingData().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.RequestInfo parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.RequestInfo parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.RequestInfo parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.RequestInfo parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.RequestInfo parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.RequestInfo parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.RequestInfo parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.RequestInfo parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.RequestInfo parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.RequestInfo parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.RequestInfo parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.RequestInfo parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.RequestInfo prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Contains metadata about the request that clients can attach when filing a bug
- * or providing other forms of feedback.
- *
- *
- * Protobuf type {@code google.rpc.RequestInfo}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.RequestInfo)
- com.google.rpc.RequestInfoOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.RequestInfo.class, com.google.rpc.RequestInfo.Builder.class);
- }
-
- // Construct using com.google.rpc.RequestInfo.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- requestId_ = "";
- servingData_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.RequestInfo getDefaultInstanceForType() {
- return com.google.rpc.RequestInfo.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.RequestInfo build() {
- com.google.rpc.RequestInfo result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.RequestInfo buildPartial() {
- com.google.rpc.RequestInfo result = new com.google.rpc.RequestInfo(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.RequestInfo result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.requestId_ = requestId_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.servingData_ = servingData_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.RequestInfo) {
- return mergeFrom((com.google.rpc.RequestInfo)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.RequestInfo other) {
- if (other == com.google.rpc.RequestInfo.getDefaultInstance()) return this;
- if (!other.getRequestId().isEmpty()) {
- requestId_ = other.requestId_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getServingData().isEmpty()) {
- servingData_ = other.servingData_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- requestId_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- servingData_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object requestId_ = "";
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @return The requestId.
- */
- public java.lang.String getRequestId() {
- java.lang.Object ref = requestId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- requestId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @return The bytes for requestId.
- */
- public com.google.protobuf.ByteString
- getRequestIdBytes() {
- java.lang.Object ref = requestId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- requestId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @param value The requestId to set.
- * @return This builder for chaining.
- */
- public Builder setRequestId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- requestId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @return This builder for chaining.
- */
- public Builder clearRequestId() {
- requestId_ = getDefaultInstance().getRequestId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @param value The bytes for requestId to set.
- * @return This builder for chaining.
- */
- public Builder setRequestIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- requestId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object servingData_ = "";
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @return The servingData.
- */
- public java.lang.String getServingData() {
- java.lang.Object ref = servingData_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- servingData_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @return The bytes for servingData.
- */
- public com.google.protobuf.ByteString
- getServingDataBytes() {
- java.lang.Object ref = servingData_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- servingData_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @param value The servingData to set.
- * @return This builder for chaining.
- */
- public Builder setServingData(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- servingData_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @return This builder for chaining.
- */
- public Builder clearServingData() {
- servingData_ = getDefaultInstance().getServingData();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @param value The bytes for servingData to set.
- * @return This builder for chaining.
- */
- public Builder setServingDataBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- servingData_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.RequestInfo)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.RequestInfo)
- private static final com.google.rpc.RequestInfo DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.RequestInfo();
- }
-
- public static com.google.rpc.RequestInfo getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public RequestInfo parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.RequestInfo getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/RequestInfoOrBuilder.java b/src/main/java/com/google/rpc/RequestInfoOrBuilder.java
deleted file mode 100644
index 5879361..0000000
--- a/src/main/java/com/google/rpc/RequestInfoOrBuilder.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface RequestInfoOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.RequestInfo)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @return The requestId.
- */
- java.lang.String getRequestId();
- /**
- *
- * An opaque string that should only be interpreted by the service generating
- * it. For example, it can be used to identify requests in the service's logs.
- *
- *
- * string request_id = 1;
- * @return The bytes for requestId.
- */
- com.google.protobuf.ByteString
- getRequestIdBytes();
-
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @return The servingData.
- */
- java.lang.String getServingData();
- /**
- *
- * Any data that was used to serve this request. For example, an encrypted
- * stack trace that can be sent back to the service provider for debugging.
- *
- *
- * string serving_data = 2;
- * @return The bytes for servingData.
- */
- com.google.protobuf.ByteString
- getServingDataBytes();
-}
diff --git a/src/main/java/com/google/rpc/ResourceInfo.java b/src/main/java/com/google/rpc/ResourceInfo.java
deleted file mode 100644
index 798ab3f..0000000
--- a/src/main/java/com/google/rpc/ResourceInfo.java
+++ /dev/null
@@ -1,1126 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Describes the resource that is being accessed.
- *
- *
- * Protobuf type {@code google.rpc.ResourceInfo}
- */
-public final class ResourceInfo extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.ResourceInfo)
- ResourceInfoOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use ResourceInfo.newBuilder() to construct.
- private ResourceInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ResourceInfo() {
- resourceType_ = "";
- resourceName_ = "";
- owner_ = "";
- description_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new ResourceInfo();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.ResourceInfo.class, com.google.rpc.ResourceInfo.Builder.class);
- }
-
- public static final int RESOURCE_TYPE_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object resourceType_ = "";
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @return The resourceType.
- */
- @java.lang.Override
- public java.lang.String getResourceType() {
- java.lang.Object ref = resourceType_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- resourceType_ = s;
- return s;
- }
- }
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @return The bytes for resourceType.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getResourceTypeBytes() {
- java.lang.Object ref = resourceType_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- resourceType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int RESOURCE_NAME_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object resourceName_ = "";
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @return The resourceName.
- */
- @java.lang.Override
- public java.lang.String getResourceName() {
- java.lang.Object ref = resourceName_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- resourceName_ = s;
- return s;
- }
- }
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @return The bytes for resourceName.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getResourceNameBytes() {
- java.lang.Object ref = resourceName_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- resourceName_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int OWNER_FIELD_NUMBER = 3;
- @SuppressWarnings("serial")
- private volatile java.lang.Object owner_ = "";
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @return The owner.
- */
- @java.lang.Override
- public java.lang.String getOwner() {
- java.lang.Object ref = owner_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- owner_ = s;
- return s;
- }
- }
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @return The bytes for owner.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getOwnerBytes() {
- java.lang.Object ref = owner_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- owner_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int DESCRIPTION_FIELD_NUMBER = 4;
- @SuppressWarnings("serial")
- private volatile java.lang.Object description_ = "";
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @return The description.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @return The bytes for description.
- */
- @java.lang.Override
- 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;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceType_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceName_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owner_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceType_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceName_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, owner_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.ResourceInfo)) {
- return super.equals(obj);
- }
- com.google.rpc.ResourceInfo other = (com.google.rpc.ResourceInfo) obj;
-
- if (!getResourceType()
- .equals(other.getResourceType())) return false;
- if (!getResourceName()
- .equals(other.getResourceName())) return false;
- if (!getOwner()
- .equals(other.getOwner())) return false;
- if (!getDescription()
- .equals(other.getDescription())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + getResourceType().hashCode();
- hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER;
- hash = (53 * hash) + getResourceName().hashCode();
- hash = (37 * hash) + OWNER_FIELD_NUMBER;
- hash = (53 * hash) + getOwner().hashCode();
- hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
- hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.ResourceInfo parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.ResourceInfo parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.ResourceInfo parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.ResourceInfo parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.ResourceInfo parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.ResourceInfo parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.ResourceInfo parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.ResourceInfo parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.ResourceInfo parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.ResourceInfo parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.ResourceInfo parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.ResourceInfo parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.ResourceInfo prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Describes the resource that is being accessed.
- *
- *
- * Protobuf type {@code google.rpc.ResourceInfo}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.ResourceInfo)
- com.google.rpc.ResourceInfoOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.ResourceInfo.class, com.google.rpc.ResourceInfo.Builder.class);
- }
-
- // Construct using com.google.rpc.ResourceInfo.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- resourceType_ = "";
- resourceName_ = "";
- owner_ = "";
- description_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.ResourceInfo getDefaultInstanceForType() {
- return com.google.rpc.ResourceInfo.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.ResourceInfo build() {
- com.google.rpc.ResourceInfo result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.ResourceInfo buildPartial() {
- com.google.rpc.ResourceInfo result = new com.google.rpc.ResourceInfo(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.ResourceInfo result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.resourceType_ = resourceType_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.resourceName_ = resourceName_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.owner_ = owner_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.description_ = description_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.ResourceInfo) {
- return mergeFrom((com.google.rpc.ResourceInfo)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.ResourceInfo other) {
- if (other == com.google.rpc.ResourceInfo.getDefaultInstance()) return this;
- if (!other.getResourceType().isEmpty()) {
- resourceType_ = other.resourceType_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getResourceName().isEmpty()) {
- resourceName_ = other.resourceName_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (!other.getOwner().isEmpty()) {
- owner_ = other.owner_;
- bitField0_ |= 0x00000004;
- onChanged();
- }
- if (!other.getDescription().isEmpty()) {
- description_ = other.description_;
- bitField0_ |= 0x00000008;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- resourceType_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- resourceName_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26: {
- owner_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 34: {
- description_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object resourceType_ = "";
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @return The resourceType.
- */
- public java.lang.String getResourceType() {
- java.lang.Object ref = resourceType_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- resourceType_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @return The bytes for resourceType.
- */
- public com.google.protobuf.ByteString
- getResourceTypeBytes() {
- java.lang.Object ref = resourceType_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- resourceType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @param value The resourceType to set.
- * @return This builder for chaining.
- */
- public Builder setResourceType(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- resourceType_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @return This builder for chaining.
- */
- public Builder clearResourceType() {
- resourceType_ = getDefaultInstance().getResourceType();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @param value The bytes for resourceType to set.
- * @return This builder for chaining.
- */
- public Builder setResourceTypeBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- resourceType_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object resourceName_ = "";
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @return The resourceName.
- */
- public java.lang.String getResourceName() {
- java.lang.Object ref = resourceName_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- resourceName_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @return The bytes for resourceName.
- */
- public com.google.protobuf.ByteString
- getResourceNameBytes() {
- java.lang.Object ref = resourceName_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- resourceName_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @param value The resourceName to set.
- * @return This builder for chaining.
- */
- public Builder setResourceName(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- resourceName_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @return This builder for chaining.
- */
- public Builder clearResourceName() {
- resourceName_ = getDefaultInstance().getResourceName();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @param value The bytes for resourceName to set.
- * @return This builder for chaining.
- */
- public Builder setResourceNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- resourceName_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private java.lang.Object owner_ = "";
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @return The owner.
- */
- public java.lang.String getOwner() {
- java.lang.Object ref = owner_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- owner_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @return The bytes for owner.
- */
- public com.google.protobuf.ByteString
- getOwnerBytes() {
- java.lang.Object ref = owner_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- owner_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @param value The owner to set.
- * @return This builder for chaining.
- */
- public Builder setOwner(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- owner_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @return This builder for chaining.
- */
- public Builder clearOwner() {
- owner_ = getDefaultInstance().getOwner();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @param value The bytes for owner to set.
- * @return This builder for chaining.
- */
- public Builder setOwnerBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- owner_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
-
- private java.lang.Object description_ = "";
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @return The description.
- */
- 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;
- }
- }
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @return The bytes for description.
- */
- 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;
- }
- }
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @param value The description to set.
- * @return This builder for chaining.
- */
- public Builder setDescription(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- description_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @return This builder for chaining.
- */
- public Builder clearDescription() {
- description_ = getDefaultInstance().getDescription();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
- }
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @param value The bytes for description to set.
- * @return This builder for chaining.
- */
- public Builder setDescriptionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- description_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.ResourceInfo)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.ResourceInfo)
- private static final com.google.rpc.ResourceInfo DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.ResourceInfo();
- }
-
- public static com.google.rpc.ResourceInfo getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public ResourceInfo parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.ResourceInfo getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java b/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java
deleted file mode 100644
index a59cd86..0000000
--- a/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java
+++ /dev/null
@@ -1,106 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface ResourceInfoOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.ResourceInfo)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @return The resourceType.
- */
- java.lang.String getResourceType();
- /**
- *
- * A name for the type of resource being accessed, e.g. "sql table",
- * "cloud storage bucket", "file", "Google calendar"; or the type URL
- * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
- *
- *
- * string resource_type = 1;
- * @return The bytes for resourceType.
- */
- com.google.protobuf.ByteString
- getResourceTypeBytes();
-
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @return The resourceName.
- */
- java.lang.String getResourceName();
- /**
- *
- * The name of the resource being accessed. For example, a shared calendar
- * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
- * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
- *
- *
- * string resource_name = 2;
- * @return The bytes for resourceName.
- */
- com.google.protobuf.ByteString
- getResourceNameBytes();
-
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @return The owner.
- */
- java.lang.String getOwner();
- /**
- *
- * The owner of the resource (optional).
- * For example, "user:<owner email>" or "project:<Google developer project
- * id>".
- *
- *
- * string owner = 3;
- * @return The bytes for owner.
- */
- com.google.protobuf.ByteString
- getOwnerBytes();
-
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @return The description.
- */
- java.lang.String getDescription();
- /**
- *
- * Describes what error is encountered when accessing this resource.
- * For example, updating a cloud project may require the `writer` permission
- * on the developer console project.
- *
- *
- * string description = 4;
- * @return The bytes for description.
- */
- com.google.protobuf.ByteString
- getDescriptionBytes();
-}
diff --git a/src/main/java/com/google/rpc/RetryInfo.java b/src/main/java/com/google/rpc/RetryInfo.java
deleted file mode 100644
index 77a957e..0000000
--- a/src/main/java/com/google/rpc/RetryInfo.java
+++ /dev/null
@@ -1,679 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * Describes when the clients can retry a failed request. Clients could ignore
- * the recommendation here or retry when this information is missing from error
- * responses.
- *
- * It's always recommended that clients should use exponential backoff when
- * retrying.
- *
- * Clients should wait until `retry_delay` amount of time has passed since
- * receiving the error response before retrying. If retrying requests also
- * fail, clients should use an exponential backoff scheme to gradually increase
- * the delay between retries based on `retry_delay`, until either a maximum
- * number of retires have been reached or a maximum retry delay cap has been
- * reached.
- *
- *
- * Protobuf type {@code google.rpc.RetryInfo}
- */
-public final class RetryInfo extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.RetryInfo)
- RetryInfoOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use RetryInfo.newBuilder() to construct.
- private RetryInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private RetryInfo() {
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new RetryInfo();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.RetryInfo.class, com.google.rpc.RetryInfo.Builder.class);
- }
-
- private int bitField0_;
- public static final int RETRY_DELAY_FIELD_NUMBER = 1;
- private com.google.protobuf.Duration retryDelay_;
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- * @return Whether the retryDelay field is set.
- */
- @java.lang.Override
- public boolean hasRetryDelay() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- * @return The retryDelay.
- */
- @java.lang.Override
- public com.google.protobuf.Duration getRetryDelay() {
- return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_;
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- @java.lang.Override
- public com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder() {
- return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_;
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(1, getRetryDelay());
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getRetryDelay());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.RetryInfo)) {
- return super.equals(obj);
- }
- com.google.rpc.RetryInfo other = (com.google.rpc.RetryInfo) obj;
-
- if (hasRetryDelay() != other.hasRetryDelay()) return false;
- if (hasRetryDelay()) {
- if (!getRetryDelay()
- .equals(other.getRetryDelay())) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasRetryDelay()) {
- hash = (37 * hash) + RETRY_DELAY_FIELD_NUMBER;
- hash = (53 * hash) + getRetryDelay().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.RetryInfo parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.RetryInfo parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.RetryInfo parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.RetryInfo parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.RetryInfo parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.RetryInfo parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.RetryInfo parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.RetryInfo parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.RetryInfo parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.RetryInfo parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.RetryInfo parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.RetryInfo parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.RetryInfo prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Describes when the clients can retry a failed request. Clients could ignore
- * the recommendation here or retry when this information is missing from error
- * responses.
- *
- * It's always recommended that clients should use exponential backoff when
- * retrying.
- *
- * Clients should wait until `retry_delay` amount of time has passed since
- * receiving the error response before retrying. If retrying requests also
- * fail, clients should use an exponential backoff scheme to gradually increase
- * the delay between retries based on `retry_delay`, until either a maximum
- * number of retires have been reached or a maximum retry delay cap has been
- * reached.
- *
- *
- * Protobuf type {@code google.rpc.RetryInfo}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.RetryInfo)
- com.google.rpc.RetryInfoOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.RetryInfo.class, com.google.rpc.RetryInfo.Builder.class);
- }
-
- // Construct using com.google.rpc.RetryInfo.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getRetryDelayFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- retryDelay_ = null;
- if (retryDelayBuilder_ != null) {
- retryDelayBuilder_.dispose();
- retryDelayBuilder_ = null;
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.RetryInfo getDefaultInstanceForType() {
- return com.google.rpc.RetryInfo.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.RetryInfo build() {
- com.google.rpc.RetryInfo result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.RetryInfo buildPartial() {
- com.google.rpc.RetryInfo result = new com.google.rpc.RetryInfo(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.rpc.RetryInfo result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.retryDelay_ = retryDelayBuilder_ == null
- ? retryDelay_
- : retryDelayBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.RetryInfo) {
- return mergeFrom((com.google.rpc.RetryInfo)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.RetryInfo other) {
- if (other == com.google.rpc.RetryInfo.getDefaultInstance()) return this;
- if (other.hasRetryDelay()) {
- mergeRetryDelay(other.getRetryDelay());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- input.readMessage(
- getRetryDelayFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private com.google.protobuf.Duration retryDelay_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retryDelayBuilder_;
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- * @return Whether the retryDelay field is set.
- */
- public boolean hasRetryDelay() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- * @return The retryDelay.
- */
- public com.google.protobuf.Duration getRetryDelay() {
- if (retryDelayBuilder_ == null) {
- return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_;
- } else {
- return retryDelayBuilder_.getMessage();
- }
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- public Builder setRetryDelay(com.google.protobuf.Duration value) {
- if (retryDelayBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- retryDelay_ = value;
- } else {
- retryDelayBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- public Builder setRetryDelay(
- com.google.protobuf.Duration.Builder builderForValue) {
- if (retryDelayBuilder_ == null) {
- retryDelay_ = builderForValue.build();
- } else {
- retryDelayBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- public Builder mergeRetryDelay(com.google.protobuf.Duration value) {
- if (retryDelayBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0) &&
- retryDelay_ != null &&
- retryDelay_ != com.google.protobuf.Duration.getDefaultInstance()) {
- getRetryDelayBuilder().mergeFrom(value);
- } else {
- retryDelay_ = value;
- }
- } else {
- retryDelayBuilder_.mergeFrom(value);
- }
- if (retryDelay_ != null) {
- bitField0_ |= 0x00000001;
- onChanged();
- }
- return this;
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- public Builder clearRetryDelay() {
- bitField0_ = (bitField0_ & ~0x00000001);
- retryDelay_ = null;
- if (retryDelayBuilder_ != null) {
- retryDelayBuilder_.dispose();
- retryDelayBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- public com.google.protobuf.Duration.Builder getRetryDelayBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getRetryDelayFieldBuilder().getBuilder();
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- public com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder() {
- if (retryDelayBuilder_ != null) {
- return retryDelayBuilder_.getMessageOrBuilder();
- } else {
- return retryDelay_ == null ?
- com.google.protobuf.Duration.getDefaultInstance() : retryDelay_;
- }
- }
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
- getRetryDelayFieldBuilder() {
- if (retryDelayBuilder_ == null) {
- retryDelayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
- getRetryDelay(),
- getParentForChildren(),
- isClean());
- retryDelay_ = null;
- }
- return retryDelayBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.RetryInfo)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.RetryInfo)
- private static final com.google.rpc.RetryInfo DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.RetryInfo();
- }
-
- public static com.google.rpc.RetryInfo getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public RetryInfo parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.RetryInfo getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/RetryInfoOrBuilder.java b/src/main/java/com/google/rpc/RetryInfoOrBuilder.java
deleted file mode 100644
index e2a21d9..0000000
--- a/src/main/java/com/google/rpc/RetryInfoOrBuilder.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface RetryInfoOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.RetryInfo)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- * @return Whether the retryDelay field is set.
- */
- boolean hasRetryDelay();
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- * @return The retryDelay.
- */
- com.google.protobuf.Duration getRetryDelay();
- /**
- *
- * Clients should wait at least this long between retrying the same request.
- *
- *
- * .google.protobuf.Duration retry_delay = 1;
- */
- com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder();
-}
diff --git a/src/main/java/com/google/rpc/Status.java b/src/main/java/com/google/rpc/Status.java
deleted file mode 100644
index f82a09e..0000000
--- a/src/main/java/com/google/rpc/Status.java
+++ /dev/null
@@ -1,1245 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/status.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-/**
- *
- * The `Status` type defines a logical error model that is suitable for different
- * programming environments, including REST APIs and RPC APIs. It is used by
- * [gRPC](https://github.com/grpc). The error model is designed to be:
- *
- * - Simple to use and understand for most users
- * - Flexible enough to meet unexpected needs
- *
- * # Overview
- *
- * The `Status` message contains three pieces of data: error code, error message,
- * and error details. The error code should be an enum value of
- * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
- * error message should be a developer-facing English message that helps
- * developers *understand* and *resolve* the error. If a localized user-facing
- * error message is needed, put the localized message in the error details or
- * localize it in the client. The optional error details may contain arbitrary
- * information about the error. There is a predefined set of error detail types
- * in the package `google.rpc` that can be used for common error conditions.
- *
- * # Language mapping
- *
- * The `Status` message is the logical representation of the error model, but it
- * is not necessarily the actual wire format. When the `Status` message is
- * exposed in different client libraries and different wire protocols, it can be
- * mapped differently. For example, it will likely be mapped to some exceptions
- * in Java, but more likely mapped to some error codes in C.
- *
- * # Other uses
- *
- * The error model and the `Status` message can be used in a variety of
- * environments, either with or without APIs, to provide a
- * consistent developer experience across different environments.
- *
- * Example uses of this error model include:
- *
- * - Partial errors. If a service needs to return partial errors to the client,
- * it may embed the `Status` in the normal response to indicate the partial
- * errors.
- *
- * - Workflow errors. A typical workflow has multiple steps. Each step may
- * have a `Status` message for error reporting.
- *
- * - Batch operations. If a client uses batch request and batch response, the
- * `Status` message should be used directly inside batch response, one for
- * each error sub-response.
- *
- * - Asynchronous operations. If an API call embeds asynchronous operation
- * results in its response, the status of those operations should be
- * represented directly using the `Status` message.
- *
- * - Logging. If some API errors are stored in logs, the message `Status` could
- * be used directly after any stripping needed for security/privacy reasons.
- *
- *
- * Protobuf type {@code google.rpc.Status}
- */
-public final class Status extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:google.rpc.Status)
- StatusOrBuilder {
-private static final long serialVersionUID = 0L;
- // Use Status.newBuilder() to construct.
- private Status(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Status() {
- message_ = "";
- details_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Status();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.StatusProto.internal_static_google_rpc_Status_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.Status.class, com.google.rpc.Status.Builder.class);
- }
-
- public static final int CODE_FIELD_NUMBER = 1;
- private int code_ = 0;
- /**
- *
- * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- *
- *
- * int32 code = 1;
- * @return The code.
- */
- @java.lang.Override
- public int getCode() {
- return code_;
- }
-
- public static final int MESSAGE_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object message_ = "";
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @return The message.
- */
- @java.lang.Override
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- message_ = s;
- return s;
- }
- }
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @return The bytes for message.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- message_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int DETAILS_FIELD_NUMBER = 3;
- @SuppressWarnings("serial")
- private java.util.List details_;
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- @java.lang.Override
- public java.util.List getDetailsList() {
- return details_;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- @java.lang.Override
- public java.util.List extends com.google.protobuf.AnyOrBuilder>
- getDetailsOrBuilderList() {
- return details_;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- @java.lang.Override
- public int getDetailsCount() {
- return details_.size();
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- @java.lang.Override
- public com.google.protobuf.Any getDetails(int index) {
- return details_.get(index);
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- @java.lang.Override
- public com.google.protobuf.AnyOrBuilder getDetailsOrBuilder(
- int index) {
- return details_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (code_ != 0) {
- output.writeInt32(1, code_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
- }
- for (int i = 0; i < details_.size(); i++) {
- output.writeMessage(3, details_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (code_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, code_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
- }
- for (int i = 0; i < details_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, details_.get(i));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.rpc.Status)) {
- return super.equals(obj);
- }
- com.google.rpc.Status other = (com.google.rpc.Status) obj;
-
- if (getCode()
- != other.getCode()) return false;
- if (!getMessage()
- .equals(other.getMessage())) return false;
- if (!getDetailsList()
- .equals(other.getDetailsList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + CODE_FIELD_NUMBER;
- hash = (53 * hash) + getCode();
- hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
- hash = (53 * hash) + getMessage().hashCode();
- if (getDetailsCount() > 0) {
- hash = (37 * hash) + DETAILS_FIELD_NUMBER;
- hash = (53 * hash) + getDetailsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.rpc.Status parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Status parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Status parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Status parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Status parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.rpc.Status parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.rpc.Status parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.Status parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.rpc.Status parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.rpc.Status parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.rpc.Status parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.rpc.Status parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.rpc.Status prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * The `Status` type defines a logical error model that is suitable for different
- * programming environments, including REST APIs and RPC APIs. It is used by
- * [gRPC](https://github.com/grpc). The error model is designed to be:
- *
- * - Simple to use and understand for most users
- * - Flexible enough to meet unexpected needs
- *
- * # Overview
- *
- * The `Status` message contains three pieces of data: error code, error message,
- * and error details. The error code should be an enum value of
- * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
- * error message should be a developer-facing English message that helps
- * developers *understand* and *resolve* the error. If a localized user-facing
- * error message is needed, put the localized message in the error details or
- * localize it in the client. The optional error details may contain arbitrary
- * information about the error. There is a predefined set of error detail types
- * in the package `google.rpc` that can be used for common error conditions.
- *
- * # Language mapping
- *
- * The `Status` message is the logical representation of the error model, but it
- * is not necessarily the actual wire format. When the `Status` message is
- * exposed in different client libraries and different wire protocols, it can be
- * mapped differently. For example, it will likely be mapped to some exceptions
- * in Java, but more likely mapped to some error codes in C.
- *
- * # Other uses
- *
- * The error model and the `Status` message can be used in a variety of
- * environments, either with or without APIs, to provide a
- * consistent developer experience across different environments.
- *
- * Example uses of this error model include:
- *
- * - Partial errors. If a service needs to return partial errors to the client,
- * it may embed the `Status` in the normal response to indicate the partial
- * errors.
- *
- * - Workflow errors. A typical workflow has multiple steps. Each step may
- * have a `Status` message for error reporting.
- *
- * - Batch operations. If a client uses batch request and batch response, the
- * `Status` message should be used directly inside batch response, one for
- * each error sub-response.
- *
- * - Asynchronous operations. If an API call embeds asynchronous operation
- * results in its response, the status of those operations should be
- * represented directly using the `Status` message.
- *
- * - Logging. If some API errors are stored in logs, the message `Status` could
- * be used directly after any stripping needed for security/privacy reasons.
- *
- *
- * Protobuf type {@code google.rpc.Status}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:google.rpc.Status)
- com.google.rpc.StatusOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.rpc.StatusProto.internal_static_google_rpc_Status_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.rpc.Status.class, com.google.rpc.Status.Builder.class);
- }
-
- // Construct using com.google.rpc.Status.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- code_ = 0;
- message_ = "";
- if (detailsBuilder_ == null) {
- details_ = java.util.Collections.emptyList();
- } else {
- details_ = null;
- detailsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000004);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor;
- }
-
- @java.lang.Override
- public com.google.rpc.Status getDefaultInstanceForType() {
- return com.google.rpc.Status.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.rpc.Status build() {
- com.google.rpc.Status result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.rpc.Status buildPartial() {
- com.google.rpc.Status result = new com.google.rpc.Status(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.rpc.Status result) {
- if (detailsBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0)) {
- details_ = java.util.Collections.unmodifiableList(details_);
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.details_ = details_;
- } else {
- result.details_ = detailsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.rpc.Status result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.code_ = code_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.message_ = message_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.rpc.Status) {
- return mergeFrom((com.google.rpc.Status)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.rpc.Status other) {
- if (other == com.google.rpc.Status.getDefaultInstance()) return this;
- if (other.getCode() != 0) {
- setCode(other.getCode());
- }
- if (!other.getMessage().isEmpty()) {
- message_ = other.message_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (detailsBuilder_ == null) {
- if (!other.details_.isEmpty()) {
- if (details_.isEmpty()) {
- details_ = other.details_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureDetailsIsMutable();
- details_.addAll(other.details_);
- }
- onChanged();
- }
- } else {
- if (!other.details_.isEmpty()) {
- if (detailsBuilder_.isEmpty()) {
- detailsBuilder_.dispose();
- detailsBuilder_ = null;
- details_ = other.details_;
- bitField0_ = (bitField0_ & ~0x00000004);
- detailsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getDetailsFieldBuilder() : null;
- } else {
- detailsBuilder_.addAllMessages(other.details_);
- }
- }
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- code_ = input.readInt32();
- bitField0_ |= 0x00000001;
- break;
- } // case 8
- case 18: {
- message_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26: {
- com.google.protobuf.Any m =
- input.readMessage(
- com.google.protobuf.Any.parser(),
- extensionRegistry);
- if (detailsBuilder_ == null) {
- ensureDetailsIsMutable();
- details_.add(m);
- } else {
- detailsBuilder_.addMessage(m);
- }
- break;
- } // case 26
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private int code_ ;
- /**
- *
- * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- *
- *
- * int32 code = 1;
- * @return The code.
- */
- @java.lang.Override
- public int getCode() {
- return code_;
- }
- /**
- *
- * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- *
- *
- * int32 code = 1;
- * @param value The code to set.
- * @return This builder for chaining.
- */
- public Builder setCode(int value) {
-
- code_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- *
- *
- * int32 code = 1;
- * @return This builder for chaining.
- */
- public Builder clearCode() {
- bitField0_ = (bitField0_ & ~0x00000001);
- code_ = 0;
- onChanged();
- return this;
- }
-
- private java.lang.Object message_ = "";
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @return The message.
- */
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- message_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @return The bytes for message.
- */
- public com.google.protobuf.ByteString
- getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- message_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @param value The message to set.
- * @return This builder for chaining.
- */
- public Builder setMessage(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- message_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @return This builder for chaining.
- */
- public Builder clearMessage() {
- message_ = getDefaultInstance().getMessage();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @param value The bytes for message to set.
- * @return This builder for chaining.
- */
- public Builder setMessageBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- message_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private java.util.List details_ =
- java.util.Collections.emptyList();
- private void ensureDetailsIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- details_ = new java.util.ArrayList(details_);
- bitField0_ |= 0x00000004;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> detailsBuilder_;
-
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public java.util.List getDetailsList() {
- if (detailsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(details_);
- } else {
- return detailsBuilder_.getMessageList();
- }
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public int getDetailsCount() {
- if (detailsBuilder_ == null) {
- return details_.size();
- } else {
- return detailsBuilder_.getCount();
- }
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public com.google.protobuf.Any getDetails(int index) {
- if (detailsBuilder_ == null) {
- return details_.get(index);
- } else {
- return detailsBuilder_.getMessage(index);
- }
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder setDetails(
- int index, com.google.protobuf.Any value) {
- if (detailsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureDetailsIsMutable();
- details_.set(index, value);
- onChanged();
- } else {
- detailsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder setDetails(
- int index, com.google.protobuf.Any.Builder builderForValue) {
- if (detailsBuilder_ == null) {
- ensureDetailsIsMutable();
- details_.set(index, builderForValue.build());
- onChanged();
- } else {
- detailsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder addDetails(com.google.protobuf.Any value) {
- if (detailsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureDetailsIsMutable();
- details_.add(value);
- onChanged();
- } else {
- detailsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder addDetails(
- int index, com.google.protobuf.Any value) {
- if (detailsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureDetailsIsMutable();
- details_.add(index, value);
- onChanged();
- } else {
- detailsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder addDetails(
- com.google.protobuf.Any.Builder builderForValue) {
- if (detailsBuilder_ == null) {
- ensureDetailsIsMutable();
- details_.add(builderForValue.build());
- onChanged();
- } else {
- detailsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder addDetails(
- int index, com.google.protobuf.Any.Builder builderForValue) {
- if (detailsBuilder_ == null) {
- ensureDetailsIsMutable();
- details_.add(index, builderForValue.build());
- onChanged();
- } else {
- detailsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder addAllDetails(
- java.lang.Iterable extends com.google.protobuf.Any> values) {
- if (detailsBuilder_ == null) {
- ensureDetailsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, details_);
- onChanged();
- } else {
- detailsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder clearDetails() {
- if (detailsBuilder_ == null) {
- details_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- detailsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public Builder removeDetails(int index) {
- if (detailsBuilder_ == null) {
- ensureDetailsIsMutable();
- details_.remove(index);
- onChanged();
- } else {
- detailsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public com.google.protobuf.Any.Builder getDetailsBuilder(
- int index) {
- return getDetailsFieldBuilder().getBuilder(index);
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public com.google.protobuf.AnyOrBuilder getDetailsOrBuilder(
- int index) {
- if (detailsBuilder_ == null) {
- return details_.get(index); } else {
- return detailsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public java.util.List extends com.google.protobuf.AnyOrBuilder>
- getDetailsOrBuilderList() {
- if (detailsBuilder_ != null) {
- return detailsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(details_);
- }
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public com.google.protobuf.Any.Builder addDetailsBuilder() {
- return getDetailsFieldBuilder().addBuilder(
- com.google.protobuf.Any.getDefaultInstance());
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public com.google.protobuf.Any.Builder addDetailsBuilder(
- int index) {
- return getDetailsFieldBuilder().addBuilder(
- index, com.google.protobuf.Any.getDefaultInstance());
- }
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- public java.util.List
- getDetailsBuilderList() {
- return getDetailsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
- getDetailsFieldBuilder() {
- if (detailsBuilder_ == null) {
- detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
- details_,
- ((bitField0_ & 0x00000004) != 0),
- getParentForChildren(),
- isClean());
- details_ = null;
- }
- return detailsBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:google.rpc.Status)
- }
-
- // @@protoc_insertion_point(class_scope:google.rpc.Status)
- private static final com.google.rpc.Status DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.rpc.Status();
- }
-
- public static com.google.rpc.Status getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Status parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.rpc.Status getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
-}
-
diff --git a/src/main/java/com/google/rpc/StatusOrBuilder.java b/src/main/java/com/google/rpc/StatusOrBuilder.java
deleted file mode 100644
index 38b076f..0000000
--- a/src/main/java/com/google/rpc/StatusOrBuilder.java
+++ /dev/null
@@ -1,93 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/status.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public interface StatusOrBuilder extends
- // @@protoc_insertion_point(interface_extends:google.rpc.Status)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- *
- *
- * int32 code = 1;
- * @return The code.
- */
- int getCode();
-
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @return The message.
- */
- java.lang.String getMessage();
- /**
- *
- * A developer-facing error message, which should be in English. Any
- * user-facing error message should be localized and sent in the
- * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- *
- *
- * string message = 2;
- * @return The bytes for message.
- */
- com.google.protobuf.ByteString
- getMessageBytes();
-
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- java.util.List
- getDetailsList();
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- com.google.protobuf.Any getDetails(int index);
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- int getDetailsCount();
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- java.util.List extends com.google.protobuf.AnyOrBuilder>
- getDetailsOrBuilderList();
- /**
- *
- * A list of messages that carry the error details. There is a common set of
- * message types for APIs to use.
- *
- *
- * repeated .google.protobuf.Any details = 3;
- */
- com.google.protobuf.AnyOrBuilder getDetailsOrBuilder(
- int index);
-}
diff --git a/src/main/java/com/google/rpc/StatusProto.java b/src/main/java/com/google/rpc/StatusProto.java
deleted file mode 100644
index 6b8eaa6..0000000
--- a/src/main/java/com/google/rpc/StatusProto.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/rpc/status.proto
-
-// Protobuf Java Version: 3.25.6
-package com.google.rpc;
-
-public final class StatusProto {
- private StatusProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_rpc_Status_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_rpc_Status_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\027google/rpc/status.proto\022\ngoogle.rpc\032\031g" +
- "oogle/protobuf/any.proto\"N\n\006Status\022\014\n\004co" +
- "de\030\001 \001(\005\022\017\n\007message\030\002 \001(\t\022%\n\007details\030\003 \003" +
- "(\0132\024.google.protobuf.AnyB^\n\016com.google.r" +
- "pcB\013StatusProtoP\001Z7google.golang.org/gen" +
- "proto/googleapis/rpc/status;status\242\002\003RPC" +
- "b\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.AnyProto.getDescriptor(),
- });
- internal_static_google_rpc_Status_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_rpc_Status_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_rpc_Status_descriptor,
- new java.lang.String[] { "Code", "Message", "Details", });
- com.google.protobuf.AnyProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/Client.java b/src/main/java/org/bdware/bdledger/api/grpc/Client.java
deleted file mode 100644
index c1bf3c5..0000000
--- a/src/main/java/org/bdware/bdledger/api/grpc/Client.java
+++ /dev/null
@@ -1,752 +0,0 @@
-package org.bdware.bdledger.api.grpc;
-
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.protobuf.ByteString;
-import com.google.protobuf.Empty;
-import io.grpc.ManagedChannel;
-import io.grpc.ManagedChannelBuilder;
-import io.grpc.Metadata;
-import io.grpc.StatusRuntimeException;
-import io.grpc.stub.MetadataUtils;
-import org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType;
-import org.bdware.bdledger.api.grpc.pb.LedgerGrpc;
-import org.bdware.bdledger.api.grpc.pb.LedgerProto.*;
-import org.bdware.bdledger.api.grpc.pb.NodeGrpc;
-import org.bdware.bdledger.api.grpc.pb.NodeProto.ClientVersionResponse;
-import org.bdware.bdledger.api.grpc.pb.QueryGrpc;
-import org.bdware.bdledger.api.grpc.pb.QueryProto.*;
-
-import java.time.ZonedDateTime;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * 事务账本客户端
- *
- * 如有更灵活的需求可直接使用{@link org.bdware.bdledger.api.grpc.pb.LedgerGrpc}类。
- *
- * @author nex
- * @see 事务账本API
- */
-public class Client {
-
- private static final Logger logger = Logger.getLogger(Client.class.getName());
-
- private ManagedChannel channel;
- private NodeGrpc.NodeFutureStub nodeFutureStub;
- private NodeGrpc.NodeBlockingStub nodeBlockingStub;
- private LedgerGrpc.LedgerFutureStub ledgerFutureStub;
- private LedgerGrpc.LedgerBlockingStub ledgerBlockingStub;
- private QueryGrpc.QueryFutureStub queryFutureStub;
- private QueryGrpc.QueryBlockingStub queryBlockingStub;
-// private final ManagedChannel channel;
-// private final NodeGrpc.NodeFutureStub nodeFutureStub;
-// private final NodeGrpc.NodeBlockingStub nodeBlockingStub;
-// private final LedgerGrpc.LedgerFutureStub ledgerFutureStub;
-// private final LedgerGrpc.LedgerBlockingStub ledgerBlockingStub;
-// private final QueryGrpc.QueryFutureStub queryFutureStub;
-// private final QueryGrpc.QueryBlockingStub queryBlockingStub;
-
- /**
- * 构造客户端来向{@code host:port} BDLedger节点发请求。
- */
- public Client(String host, int port) {
- this(ManagedChannelBuilder.forAddress(host, port).usePlaintext(), null);
- }
-
- /**
- * 构造客户端,使用{@code token}作access token来向{@code host:port} BDLedger节点发请求。
- */
- public Client(String host, int port, String token) {
- this(ManagedChannelBuilder.forAddress(host, port).usePlaintext(), token);
- }
-
- /**
- * 用已有的{@link io.grpc.Channel}对象构造客户端来向BDLedger节点发请求。
- */
- public Client(ManagedChannelBuilder> channelBuilder, String token) {
- channel = channelBuilder.build();
-
- nodeFutureStub = NodeGrpc.newFutureStub(channel);
- nodeBlockingStub = NodeGrpc.newBlockingStub(channel);
- ledgerFutureStub = LedgerGrpc.newFutureStub(channel);
- ledgerBlockingStub = LedgerGrpc.newBlockingStub(channel);
- queryFutureStub = QueryGrpc.newFutureStub(channel);
- queryBlockingStub = QueryGrpc.newBlockingStub(channel);
-
- if (token != null) {
- Metadata fixedHeaders = new Metadata();
- fixedHeaders.put(Metadata.Key.of("authorization", Metadata.ASCII_STRING_MARSHALLER), "bearer " + token);
- nodeFutureStub = MetadataUtils.attachHeaders(nodeFutureStub, fixedHeaders);
- nodeBlockingStub = MetadataUtils.attachHeaders(nodeBlockingStub, fixedHeaders);
- ledgerFutureStub = MetadataUtils.attachHeaders(ledgerFutureStub, fixedHeaders);
- ledgerBlockingStub = MetadataUtils.attachHeaders(ledgerBlockingStub, fixedHeaders);
- queryFutureStub = MetadataUtils.attachHeaders(queryFutureStub, fixedHeaders);
- queryBlockingStub = MetadataUtils.attachHeaders(queryBlockingStub, fixedHeaders);
- }
- }
-
- /**
- * 关闭客户端的网络连接。
- */
- public void shutdown() throws InterruptedException {
- channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
- }
-
- /**
- * 查询BDLedger节点版本
- * (非阻塞)
- */
- public ListenableFuture clientVersion() {
-
- info("*** clientVersion");
-
- try {
- return nodeFutureStub.clientVersion(Empty.getDefaultInstance());
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 查询BDLedger节点版本
- * (阻塞)
- */
- public ClientVersionResponse clientVersionSync() {
-
- info("*** clientVersionSync");
-
- try {
- return nodeBlockingStub.clientVersion(Empty.getDefaultInstance());
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- /**
- * 创建账本
- * (非阻塞)
- */
- public ListenableFuture createLedger(String name) {
-
- info("*** createLedger: name={0}", name);
-
- try {
- return ledgerFutureStub.createLedger(createLedgerRequest(name));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 创建账本
- * (阻塞)
- */
- public CreateLedgerResponse createLedgerSync(String name) {
-
- info("*** createLedgerSync: name={0}", name);
-
- try {
- return ledgerBlockingStub.createLedger(createLedgerRequest(name));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private CreateLedgerRequest createLedgerRequest(String name) {
- return CreateLedgerRequest.newBuilder().setName(name).build();
- }
-
- /**
- * 返回账本列表
- * (非阻塞)
- */
- public ListenableFuture getLedgers() {
-
- info("*** getLedgers");
-
- try {
- return ledgerFutureStub.getLedgers(Empty.getDefaultInstance());
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回账本列表
- * (阻塞)
- */
- public GetLedgersResponse getLedgersSync() {
-
- info("*** getLedgersSync");
-
- try {
- return ledgerBlockingStub.getLedgers(Empty.getDefaultInstance());
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- /**
- * 发送新事务
- * (非阻塞)
- */
- public ListenableFuture sendTransaction(
- String ledger, TransactionType type, String from, long nonce, String to, byte[] data) {
-
- info(
- "*** sendTransaction: ledger={0} type={1} from={2} to={3} data={4}",
- ledger, type, from, to, data);
-
- try {
- return ledgerFutureStub.sendTransaction(SendTransactionRequest(ledger, type, from, nonce, to, data));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 发送新事务
- * (阻塞)
- */
- public SendTransactionResponse sendTransactionSync(
- String ledger, TransactionType type, String from, long nonce, String to, byte[] data) {
-
- info(
- "*** sendTransactionSync: ledger={0} type={1} from={2} to={3} data={4}",
- ledger, type, from, to, data);
-
- try {
- return ledgerBlockingStub.sendTransaction(SendTransactionRequest(ledger, type, from, nonce, to, data));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private SendTransactionRequest SendTransactionRequest(
- String ledger, TransactionType type, String from, long nonce, String to, byte[] data) {
-
- SendTransactionRequest.Transaction.Builder txBuilder =
- SendTransactionRequest.Transaction.newBuilder().setType(type);
- if (from != null) {
- txBuilder.setFrom(ByteString.copyFrom(Utils.hexStringToByteArray(from)));
- }
- txBuilder.setNonce(nonce);
- if (to != null) {
- txBuilder.setTo(ByteString.copyFrom(Utils.hexStringToByteArray(to)));
- }
- if (data != null) {
- txBuilder.setData(ByteString.copyFrom(data));
- }
-
- return SendTransactionRequest.newBuilder().setLedger(ledger).setTransaction(txBuilder).build();
- }
-
- /**
- * 返回哈希所指定的区块
- * (非阻塞)
- */
- public ListenableFuture getBlockByHash(
- String ledger, String hash, boolean fullTransactions) {
-
- info(
- "*** getBlockByHash: ledger={0} hash={1} fullTransactions={2}",
- ledger, hash, fullTransactions);
-
- try {
- return queryFutureStub.getBlockByHash(getBlockByHashRequest(ledger, hash, fullTransactions));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回哈希所指定的区块
- * (阻塞)
- */
- public GetBlockByHashResponse getBlockByHashSync(String ledger, String hash, boolean fullTransactions) {
-
- info(
- "*** getBlockByHashSync: ledger={0} hash={1} fullTransactions={2}",
- ledger, hash, fullTransactions);
-
- try {
- return queryBlockingStub.getBlockByHash(getBlockByHashRequest(ledger, hash, fullTransactions));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private GetBlockByHashRequest getBlockByHashRequest(
- String ledger, String hash, boolean fullTransactions) {
-
- GetBlockByHashRequest.Builder reqBuilder =
- GetBlockByHashRequest.newBuilder().setLedger(ledger).setFullTransactions(fullTransactions);
- if (hash != null) {
- reqBuilder.setHash(ByteString.copyFrom(Utils.hexStringToByteArray(hash)));
- }
-
- return reqBuilder.build();
- }
-
- /**
- * 返回时间范围内的区块
- * (非阻塞)
- */
- public ListenableFuture getBlocks(String ledger, ZonedDateTime startDateTime, IncludeTransactions includeTransactions) {
- return getBlocks(ledger, startDateTime.toEpochSecond(), includeTransactions);
- }
-
- /**
- * 返回时间范围内的区块
- * (非阻塞)
- */
- public ListenableFuture getBlocks(String ledger, ZonedDateTime startDateTime, ZonedDateTime endDateTime, IncludeTransactions includeTransactions) {
- return getBlocks(ledger, startDateTime.toEpochSecond(), endDateTime.toEpochSecond(), includeTransactions);
- }
-
- /**
- * 返回时间范围内的区块
- * (阻塞)
- */
- public GetBlocksResponse getBlocksSync(String ledger, ZonedDateTime startDateTime, IncludeTransactions includeTransactions) {
- return getBlocksSync(ledger, startDateTime.toEpochSecond(), includeTransactions);
- }
-
- /**
- * 返回时间范围内的区块
- * (阻塞)
- */
- public GetBlocksResponse getBlocksSync(String ledger, ZonedDateTime startDateTime, ZonedDateTime endDateTime, IncludeTransactions includeTransactions) {
- return getBlocksSync(ledger, startDateTime.toEpochSecond(), endDateTime.toEpochSecond(), includeTransactions);
- }
-
- /**
- * 返回时间范围内的区块
- * (非阻塞)
- */
- public ListenableFuture getBlocks(String ledger, long startUnixTime, IncludeTransactions includeTransactions) {
- return getBlocks(ledger, startUnixTime, -1, includeTransactions);
- }
-
- /**
- * 返回时间范围内的区块
- * (非阻塞)
- */
- public ListenableFuture getBlocks(String ledger, long startUnixTime, long endUnixTime, IncludeTransactions includeTransactions) {
-
- info(
- "*** getBlocks: ledger={0} startUnixTime={1} endUnixTime={2}",
- ledger, startUnixTime, endUnixTime);
-
- try {
- return queryFutureStub.getBlocks(blocksRequest(ledger, startUnixTime, endUnixTime, includeTransactions));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回时间范围内的区块
- * (阻塞)
- */
- public GetBlocksResponse getBlocksSync(String ledger, long startUnixTime, IncludeTransactions includeTransactions) {
- return getBlocksSync(ledger, startUnixTime, -1, includeTransactions);
- }
-
- /**
- * 返回时间范围内的区块
- * (阻塞)
- */
- public GetBlocksResponse getBlocksSync(String ledger, long startUnixTime, long endUnixTime, IncludeTransactions includeTransactions) {
-
- info(
- "*** getBlocksSync: ledger={0} startUnixTime={1} endUnixTime={2}",
- ledger, startUnixTime, endUnixTime);
-
- try {
- return queryBlockingStub.getBlocks(blocksRequest(ledger, startUnixTime, endUnixTime, includeTransactions));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- /**
- * 返回账本中的区块数量
- * (非阻塞)
- */
- public ListenableFuture countBlocks(String ledger) {
-
- info("*** blockNumber: ledger={0}", ledger);
-
- try {
- return queryFutureStub.countBlocks(blocksRequest(ledger, -1, -1, null));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回账本中的区块数量
- * (阻塞)
- */
- public CountBlocksResponse countBlocksSync(String ledger) {
-
- info("*** blockNumberSync: ledger={0}", ledger);
-
- try {
- return queryBlockingStub.countBlocks(blocksRequest(ledger, -1, -1, null));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private BlocksRequest blocksRequest(String ledger, long startTimestamp, long endTimestamp, IncludeTransactions includeTransactions) {
-
- BlocksRequest.Builder reqBuilder =
- BlocksRequest.newBuilder().setLedger(ledger);
- if (startTimestamp != -1) {
- reqBuilder.setStartTimestamp(startTimestamp);
- }
- if (endTimestamp != -1) {
- reqBuilder.setEndTimestamp(endTimestamp);
- }
- if (includeTransactions == null) {
- includeTransactions = IncludeTransactions.NONE;
- }
- reqBuilder.setIncludeTransactions(includeTransactions);
-
- return reqBuilder.build();
- }
-
- /**
- * 返回时间戳最新的若干区块
- * (非阻塞)
- */
- public ListenableFuture getRecentBlocks(String ledger, int count, IncludeTransactions includeTransactions) {
-
- info(
- "*** getRecentBlocks: ledger={0} count={1} includeTransactions={2}",
- ledger, count, includeTransactions);
-
- try {
- return queryFutureStub.getRecentBlocks(getRecentBlocksRequest(ledger, count, includeTransactions));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回时间戳最新的若干区块
- * (阻塞)
- */
- public GetBlocksResponse getRecentBlocksSync(String ledger, int count, IncludeTransactions includeTransactions) {
-
- info(
- "*** getRecentBlocksSync: ledger={0} count={1} includeTransactions={2}",
- ledger, count, includeTransactions);
-
- try {
- return queryBlockingStub.getRecentBlocks(getRecentBlocksRequest(ledger, count, includeTransactions));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private RecentBlocksRequest getRecentBlocksRequest(String ledger, int count, IncludeTransactions includeTransactions) {
-
- RecentBlocksRequest.Builder reqBuilder =
- RecentBlocksRequest.newBuilder()
- .setLedger(ledger)
- .setCount(count);
- if (includeTransactions == null) {
- includeTransactions = IncludeTransactions.NONE;
- }
- reqBuilder.setIncludeTransactions(includeTransactions);
-
- return reqBuilder.build();
- }
-
- /**
- * 返回哈希所指定的事务
- * (非阻塞)
- */
- public ListenableFuture getTransactionByHash(String ledger, String hash) {
-
- info("*** getTransactionByHash: ledger={0} hash={1}", ledger, hash);
-
- try {
- return queryFutureStub.getTransactionByHash(getTransactionByHashRequest(ledger, hash));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回哈希所指定的事务
- * (阻塞)
- */
- public GetTransactionByHashResponse getTransactionByHashSync(String ledger, String hash) {
-
- info("*** getTransactionByHashSync: ledger={0} hash={1}", ledger, hash);
-
- try {
- return queryBlockingStub.getTransactionByHash(getTransactionByHashRequest(ledger, hash));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private GetTransactionByHashRequest getTransactionByHashRequest(String ledger, String hash) {
-
- GetTransactionByHashRequest.Builder reqBuilder =
- GetTransactionByHashRequest.newBuilder().setLedger(ledger);
- if (hash != null) {
- reqBuilder.setHash(ByteString.copyFrom(Utils.hexStringToByteArray(hash)));
- }
-
- return reqBuilder.build();
- }
-
- /**
- * 返回区块的哈希与事务的index所指定的事务
- * (非阻塞)
- */
- public ListenableFuture getTransactionByBlockHashAndIndex(
- String ledger, String blockHash, int index) {
-
- info(
- "*** getTransactionByBlockHashAndIndex: ledger={0} blockHash={1} index={2}",
- ledger, blockHash, index);
-
- try {
- return queryFutureStub.getTransactionByBlockHashAndIndex(
- getTransactionByBlockHashAndIndexRequest(ledger, blockHash, index));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回区块的哈希与事务的index所指定的事务
- * (阻塞)
- */
- public GetTransactionByBlockHashAndIndexResponse getTransactionByBlockHashAndIndexSync(
- String ledger, String blockHash, int index) {
-
- info(
- "*** getTransactionByBlockHashAndIndexSync: ledger={0} blockHash={1} index={2}",
- ledger, blockHash, index);
-
- try {
- return queryBlockingStub.getTransactionByBlockHashAndIndex(
- getTransactionByBlockHashAndIndexRequest(ledger, blockHash, index));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private GetTransactionByBlockHashAndIndexRequest getTransactionByBlockHashAndIndexRequest(
- String ledger, String blockHash, int index) {
-
- GetTransactionByBlockHashAndIndexRequest.Builder reqBuilder =
- GetTransactionByBlockHashAndIndexRequest.newBuilder().setLedger(ledger).setIndex(index);
-
- if (blockHash != null) {
- reqBuilder.setBlockHash(ByteString.copyFrom(Utils.hexStringToByteArray(blockHash)));
- }
-
- return reqBuilder.build();
- }
-
- /**
- * 返回时间范围内的事务
- * (非阻塞)
- */
- public ListenableFuture getTransactions(String ledger, ZonedDateTime startDateTime) {
- return getTransactions(ledger, startDateTime.toEpochSecond());
- }
-
- /**
- * 返回时间范围内的事务
- * (非阻塞)
- */
- public ListenableFuture getTransactions(String ledger, ZonedDateTime startDateTime, ZonedDateTime endDateTime) {
- return getTransactions(ledger, startDateTime.toEpochSecond(), endDateTime.toEpochSecond());
- }
-
- /**
- * 返回时间范围内的事务
- * (阻塞)
- */
- public GetTransactionsResponse getTransactionsSync(String ledger, ZonedDateTime startDateTime) {
- return getTransactionsSync(ledger, startDateTime.toEpochSecond());
- }
-
- /**
- * 返回时间范围内的事务
- * (阻塞)
- */
- public GetTransactionsResponse getTransactionsSync(String ledger, ZonedDateTime startDateTime, ZonedDateTime endDateTime) {
- return getTransactionsSync(ledger, startDateTime.toEpochSecond(), endDateTime.toEpochSecond());
- }
-
- /**
- * 返回时间范围内的事务
- * (非阻塞)
- */
- public ListenableFuture getTransactions(String ledger, long startUnixTime) {
- return getTransactions(ledger, startUnixTime, -1);
- }
-
- /**
- * 返回时间范围内的事务
- * (非阻塞)
- */
- public ListenableFuture getTransactions(String ledger, long startUnixTime, long endUnixTime) {
-
- info(
- "*** getTransactions: ledger={0} startUnixTime={1} endUnixTime={2}",
- ledger, startUnixTime, endUnixTime);
-
- try {
- return queryFutureStub.getTransactions(transactionsRequest(ledger, startUnixTime, endUnixTime));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回时间范围内的事务
- * (阻塞)
- */
- public GetTransactionsResponse getTransactionsSync(String ledger, long startUnixTime) {
- return getTransactionsSync(ledger, startUnixTime, -1);
- }
-
- /**
- * 返回时间范围内的事务
- * (阻塞)
- */
- public GetTransactionsResponse getTransactionsSync(String ledger, long startUnixTime, long endUnixTime) {
-
- info(
- "*** getTransactionsSync: ledger={0} startUnixTime={1} endUnixTime={2}",
- ledger, startUnixTime, endUnixTime);
-
- try {
- return queryBlockingStub.getTransactions(transactionsRequest(ledger, startUnixTime, endUnixTime));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- /**
- * 返回账本中的事务数量
- * (非阻塞)
- */
- public ListenableFuture countTransactions(String ledger) {
-
- info("*** blockNumber: ledger={0}", ledger);
-
- try {
- return queryFutureStub.countTransactions(transactionsRequest(ledger, -1, -1));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- return null;
- }
- }
-
- /**
- * 返回账本中的事务数量
- * (阻塞)
- */
- public CountTransactionsResponse countTransactionsSync(String ledger) {
-
- info("*** blockNumberSync: ledger={0}", ledger);
-
- try {
- return queryBlockingStub.countTransactions(transactionsRequest(ledger, -1, -1));
- } catch (StatusRuntimeException e) {
- warning("RPC failed: {0}", e.getStatus());
- throw e;
- }
- }
-
- private TransactionsRequest transactionsRequest(String ledger, long startTimestamp, long endTimestamp) {
-
- TransactionsRequest.Builder reqBuilder =
- TransactionsRequest.newBuilder().setLedger(ledger);
- if (startTimestamp != -1) {
- reqBuilder.setStartTimestamp(startTimestamp);
- }
- if (endTimestamp != -1) {
- reqBuilder.setEndTimestamp(endTimestamp);
- }
-
- return reqBuilder.build();
- }
-
- private void info(String msg, Object... params) {
- logger.log(Level.INFO, msg, params);
- }
-
- private void warning(String msg, Object... params) {
- logger.log(Level.WARNING, msg, params);
- }
-}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/Utils.java b/src/main/java/org/bdware/bdledger/api/grpc/Utils.java
deleted file mode 100644
index 04cd518..0000000
--- a/src/main/java/org/bdware/bdledger/api/grpc/Utils.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.bdware.bdledger.api.grpc;
-
-public class Utils {
-
- public static byte[] hexStringToByteArray(String s) {
- if (s.startsWith("0x")) {
- s = s.substring(2);
- }
- int l = s.length();
- byte[] data = new byte[l / 2];
- for (int i = 0; i < l; i += 2) {
- data[i / 2] =
- (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i + 1), 16));
- }
- return data;
- }
-
- public static String byteArrayToHexString(byte[] bs) {
- StringBuilder data = new StringBuilder();
- for (byte b : bs) {
- data.append(Integer.toHexString((b >> 4) & 0xf));
- data.append(Integer.toHexString(b & 0xf));
- }
- return data.toString();
- }
-}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/pb/CommonProto.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/CommonProto.java
deleted file mode 100644
index c8d8dd8..0000000
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/CommonProto.java
+++ /dev/null
@@ -1,5615 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: bdware/bdledger/api/common.proto
-
-// Protobuf Java Version: 3.25.6
-package org.bdware.bdledger.api.grpc.pb;
-
-public final class CommonProto {
- private CommonProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- /**
- *
- * 事务类型
- *
- *
- * Protobuf enum {@code bdware.bdledger.api.TransactionType}
- */
- public enum TransactionType
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- * 通用数据记录
- *
- *
- * RECORD = 0;
- */
- RECORD(0),
- /**
- *
- * 消息
- *
- *
- * MESSAGE = 1;
- */
- MESSAGE(1),
- /**
- *
- * 合约创建
- *
- *
- * CONTRACT_CREATION = 2;
- */
- CONTRACT_CREATION(2),
- /**
- *
- * 合约调用
- *
- *
- * CONTRACT_INVOCATION = 3;
- */
- CONTRACT_INVOCATION(3),
- /**
- *
- * 合约状态
- *
- *
- * CONTRACT_STATUS = 4;
- */
- CONTRACT_STATUS(4),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- * 通用数据记录
- *
- *
- * RECORD = 0;
- */
- public static final int RECORD_VALUE = 0;
- /**
- *
- * 消息
- *
- *
- * MESSAGE = 1;
- */
- public static final int MESSAGE_VALUE = 1;
- /**
- *
- * 合约创建
- *
- *
- * CONTRACT_CREATION = 2;
- */
- public static final int CONTRACT_CREATION_VALUE = 2;
- /**
- *
- * 合约调用
- *
- *
- * CONTRACT_INVOCATION = 3;
- */
- public static final int CONTRACT_INVOCATION_VALUE = 3;
- /**
- *
- * 合约状态
- *
- *
- * CONTRACT_STATUS = 4;
- */
- public static final int CONTRACT_STATUS_VALUE = 4;
-
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static TransactionType valueOf(int value) {
- return forNumber(value);
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- */
- public static TransactionType forNumber(int value) {
- switch (value) {
- case 0: return RECORD;
- case 1: return MESSAGE;
- case 2: return CONTRACT_CREATION;
- case 3: return CONTRACT_INVOCATION;
- case 4: return CONTRACT_STATUS;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- TransactionType> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public TransactionType findValueByNumber(int number) {
- return TransactionType.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalStateException(
- "Can't get the descriptor of an unrecognized enum value.");
- }
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final TransactionType[] VALUES = values();
-
- public static TransactionType valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- if (desc.getIndex() == -1) {
- return UNRECOGNIZED;
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private TransactionType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:bdware.bdledger.api.TransactionType)
- }
-
- public interface TransactionOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdware.bdledger.api.Transaction)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
- *
- *
- * bytes block_hash = 1;
- * @return The blockHash.
- */
- com.google.protobuf.ByteString getBlockHash();
-
- /**
- *
- * 事务所在的区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 block_timestamp = 2;
- * @return The blockTimestamp.
- */
- long getBlockTimestamp();
-
- /**
- *
- * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
- *
- *
- * uint32 index = 3;
- * @return The index.
- */
- int getIndex();
-
- /**
- *
- * 事务的哈希
- *
- *
- * bytes hash = 4;
- * @return The hash.
- */
- com.google.protobuf.ByteString getHash();
-
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @return The enum numeric value on the wire for type.
- */
- int getTypeValue();
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @return The type.
- */
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType getType();
-
- /**
- *
- * 发送账户地址
- *
- *
- * bytes from = 6;
- * @return The from.
- */
- com.google.protobuf.ByteString getFrom();
-
- /**
- *
- * 这条事务之前发送者所发送的事务数量
- *
- *
- * uint64 nonce = 7;
- * @return The nonce.
- */
- long getNonce();
-
- /**
- *
- * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
- *
- *
- * bytes to = 8;
- * @return The to.
- */
- com.google.protobuf.ByteString getTo();
-
- /**
- *
- * 数据或合约代码
- *
- *
- * bytes data = 9;
- * @return The data.
- */
- com.google.protobuf.ByteString getData();
-
- /**
- *
- * ECDSA recovery id
- *
- *
- * bytes v = 10;
- * @return The v.
- */
- com.google.protobuf.ByteString getV();
-
- /**
- *
- * ECDSA signature r
- *
- *
- * bytes r = 11;
- * @return The r.
- */
- com.google.protobuf.ByteString getR();
-
- /**
- *
- * ECDSA signature s
- *
- *
- * bytes s = 12;
- * @return The s.
- */
- com.google.protobuf.ByteString getS();
- }
- /**
- * Protobuf type {@code bdware.bdledger.api.Transaction}
- */
- public static final class Transaction extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdware.bdledger.api.Transaction)
- TransactionOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Transaction.newBuilder() to construct.
- private Transaction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Transaction() {
- blockHash_ = com.google.protobuf.ByteString.EMPTY;
- hash_ = com.google.protobuf.ByteString.EMPTY;
- type_ = 0;
- from_ = com.google.protobuf.ByteString.EMPTY;
- to_ = com.google.protobuf.ByteString.EMPTY;
- data_ = com.google.protobuf.ByteString.EMPTY;
- v_ = com.google.protobuf.ByteString.EMPTY;
- r_ = com.google.protobuf.ByteString.EMPTY;
- s_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Transaction();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Transaction_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Transaction_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.class, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder.class);
- }
-
- public static final int BLOCK_HASH_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
- *
- *
- * bytes block_hash = 1;
- * @return The blockHash.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getBlockHash() {
- return blockHash_;
- }
-
- public static final int BLOCK_TIMESTAMP_FIELD_NUMBER = 2;
- private long blockTimestamp_ = 0L;
- /**
- *
- * 事务所在的区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 block_timestamp = 2;
- * @return The blockTimestamp.
- */
- @java.lang.Override
- public long getBlockTimestamp() {
- return blockTimestamp_;
- }
-
- public static final int INDEX_FIELD_NUMBER = 3;
- private int index_ = 0;
- /**
- *
- * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
- *
- *
- * uint32 index = 3;
- * @return The index.
- */
- @java.lang.Override
- public int getIndex() {
- return index_;
- }
-
- public static final int HASH_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 事务的哈希
- *
- *
- * bytes hash = 4;
- * @return The hash.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getHash() {
- return hash_;
- }
-
- public static final int TYPE_FIELD_NUMBER = 5;
- private int type_ = 0;
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override public int getTypeValue() {
- return type_;
- }
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @return The type.
- */
- @java.lang.Override public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType getType() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.forNumber(type_);
- return result == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.UNRECOGNIZED : result;
- }
-
- public static final int FROM_FIELD_NUMBER = 6;
- private com.google.protobuf.ByteString from_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 发送账户地址
- *
- *
- * bytes from = 6;
- * @return The from.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getFrom() {
- return from_;
- }
-
- public static final int NONCE_FIELD_NUMBER = 7;
- private long nonce_ = 0L;
- /**
- *
- * 这条事务之前发送者所发送的事务数量
- *
- *
- * uint64 nonce = 7;
- * @return The nonce.
- */
- @java.lang.Override
- public long getNonce() {
- return nonce_;
- }
-
- public static final int TO_FIELD_NUMBER = 8;
- private com.google.protobuf.ByteString to_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
- *
- *
- * bytes to = 8;
- * @return The to.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTo() {
- return to_;
- }
-
- public static final int DATA_FIELD_NUMBER = 9;
- private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 数据或合约代码
- *
- *
- * bytes data = 9;
- * @return The data.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getData() {
- return data_;
- }
-
- public static final int V_FIELD_NUMBER = 10;
- private com.google.protobuf.ByteString v_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * ECDSA recovery id
- *
- *
- * bytes v = 10;
- * @return The v.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getV() {
- return v_;
- }
-
- public static final int R_FIELD_NUMBER = 11;
- private com.google.protobuf.ByteString r_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * ECDSA signature r
- *
- *
- * bytes r = 11;
- * @return The r.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getR() {
- return r_;
- }
-
- public static final int S_FIELD_NUMBER = 12;
- private com.google.protobuf.ByteString s_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * ECDSA signature s
- *
- *
- * bytes s = 12;
- * @return The s.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getS() {
- return s_;
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!blockHash_.isEmpty()) {
- output.writeBytes(1, blockHash_);
- }
- if (blockTimestamp_ != 0L) {
- output.writeInt64(2, blockTimestamp_);
- }
- if (index_ != 0) {
- output.writeUInt32(3, index_);
- }
- if (!hash_.isEmpty()) {
- output.writeBytes(4, hash_);
- }
- if (type_ != org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.RECORD.getNumber()) {
- output.writeEnum(5, type_);
- }
- if (!from_.isEmpty()) {
- output.writeBytes(6, from_);
- }
- if (nonce_ != 0L) {
- output.writeUInt64(7, nonce_);
- }
- if (!to_.isEmpty()) {
- output.writeBytes(8, to_);
- }
- if (!data_.isEmpty()) {
- output.writeBytes(9, data_);
- }
- if (!v_.isEmpty()) {
- output.writeBytes(10, v_);
- }
- if (!r_.isEmpty()) {
- output.writeBytes(11, r_);
- }
- if (!s_.isEmpty()) {
- output.writeBytes(12, s_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!blockHash_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, blockHash_);
- }
- if (blockTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(2, blockTimestamp_);
- }
- if (index_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(3, index_);
- }
- if (!hash_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, hash_);
- }
- if (type_ != org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.RECORD.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(5, type_);
- }
- if (!from_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(6, from_);
- }
- if (nonce_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(7, nonce_);
- }
- if (!to_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(8, to_);
- }
- if (!data_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(9, data_);
- }
- if (!v_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(10, v_);
- }
- if (!r_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(11, r_);
- }
- if (!s_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(12, s_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction)) {
- return super.equals(obj);
- }
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction other = (org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction) obj;
-
- if (!getBlockHash()
- .equals(other.getBlockHash())) return false;
- if (getBlockTimestamp()
- != other.getBlockTimestamp()) return false;
- if (getIndex()
- != other.getIndex()) return false;
- if (!getHash()
- .equals(other.getHash())) return false;
- if (type_ != other.type_) return false;
- if (!getFrom()
- .equals(other.getFrom())) return false;
- if (getNonce()
- != other.getNonce()) return false;
- if (!getTo()
- .equals(other.getTo())) return false;
- if (!getData()
- .equals(other.getData())) return false;
- if (!getV()
- .equals(other.getV())) return false;
- if (!getR()
- .equals(other.getR())) return false;
- if (!getS()
- .equals(other.getS())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + BLOCK_HASH_FIELD_NUMBER;
- hash = (53 * hash) + getBlockHash().hashCode();
- hash = (37 * hash) + BLOCK_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getBlockTimestamp());
- hash = (37 * hash) + INDEX_FIELD_NUMBER;
- hash = (53 * hash) + getIndex();
- hash = (37 * hash) + HASH_FIELD_NUMBER;
- hash = (53 * hash) + getHash().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + type_;
- hash = (37 * hash) + FROM_FIELD_NUMBER;
- hash = (53 * hash) + getFrom().hashCode();
- hash = (37 * hash) + NONCE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getNonce());
- hash = (37 * hash) + TO_FIELD_NUMBER;
- hash = (53 * hash) + getTo().hashCode();
- hash = (37 * hash) + DATA_FIELD_NUMBER;
- hash = (53 * hash) + getData().hashCode();
- hash = (37 * hash) + V_FIELD_NUMBER;
- hash = (53 * hash) + getV().hashCode();
- hash = (37 * hash) + R_FIELD_NUMBER;
- hash = (53 * hash) + getR().hashCode();
- hash = (37 * hash) + S_FIELD_NUMBER;
- hash = (53 * hash) + getS().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code bdware.bdledger.api.Transaction}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdware.bdledger.api.Transaction)
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Transaction_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Transaction_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.class, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder.class);
- }
-
- // Construct using org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- blockHash_ = com.google.protobuf.ByteString.EMPTY;
- blockTimestamp_ = 0L;
- index_ = 0;
- hash_ = com.google.protobuf.ByteString.EMPTY;
- type_ = 0;
- from_ = com.google.protobuf.ByteString.EMPTY;
- nonce_ = 0L;
- to_ = com.google.protobuf.ByteString.EMPTY;
- data_ = com.google.protobuf.ByteString.EMPTY;
- v_ = com.google.protobuf.ByteString.EMPTY;
- r_ = com.google.protobuf.ByteString.EMPTY;
- s_ = com.google.protobuf.ByteString.EMPTY;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Transaction_descriptor;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction getDefaultInstanceForType() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction build() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction buildPartial() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction result = new org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.blockHash_ = blockHash_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.blockTimestamp_ = blockTimestamp_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.index_ = index_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.hash_ = hash_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.type_ = type_;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.from_ = from_;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.nonce_ = nonce_;
- }
- if (((from_bitField0_ & 0x00000080) != 0)) {
- result.to_ = to_;
- }
- if (((from_bitField0_ & 0x00000100) != 0)) {
- result.data_ = data_;
- }
- if (((from_bitField0_ & 0x00000200) != 0)) {
- result.v_ = v_;
- }
- if (((from_bitField0_ & 0x00000400) != 0)) {
- result.r_ = r_;
- }
- if (((from_bitField0_ & 0x00000800) != 0)) {
- result.s_ = s_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction) {
- return mergeFrom((org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction other) {
- if (other == org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance()) return this;
- if (other.getBlockHash() != com.google.protobuf.ByteString.EMPTY) {
- setBlockHash(other.getBlockHash());
- }
- if (other.getBlockTimestamp() != 0L) {
- setBlockTimestamp(other.getBlockTimestamp());
- }
- if (other.getIndex() != 0) {
- setIndex(other.getIndex());
- }
- if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
- setHash(other.getHash());
- }
- if (other.type_ != 0) {
- setTypeValue(other.getTypeValue());
- }
- if (other.getFrom() != com.google.protobuf.ByteString.EMPTY) {
- setFrom(other.getFrom());
- }
- if (other.getNonce() != 0L) {
- setNonce(other.getNonce());
- }
- if (other.getTo() != com.google.protobuf.ByteString.EMPTY) {
- setTo(other.getTo());
- }
- if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
- setData(other.getData());
- }
- if (other.getV() != com.google.protobuf.ByteString.EMPTY) {
- setV(other.getV());
- }
- if (other.getR() != com.google.protobuf.ByteString.EMPTY) {
- setR(other.getR());
- }
- if (other.getS() != com.google.protobuf.ByteString.EMPTY) {
- setS(other.getS());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- blockHash_ = input.readBytes();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 16: {
- blockTimestamp_ = input.readInt64();
- bitField0_ |= 0x00000002;
- break;
- } // case 16
- case 24: {
- index_ = input.readUInt32();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 34: {
- hash_ = input.readBytes();
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 40: {
- type_ = input.readEnum();
- bitField0_ |= 0x00000010;
- break;
- } // case 40
- case 50: {
- from_ = input.readBytes();
- bitField0_ |= 0x00000020;
- break;
- } // case 50
- case 56: {
- nonce_ = input.readUInt64();
- bitField0_ |= 0x00000040;
- break;
- } // case 56
- case 66: {
- to_ = input.readBytes();
- bitField0_ |= 0x00000080;
- break;
- } // case 66
- case 74: {
- data_ = input.readBytes();
- bitField0_ |= 0x00000100;
- break;
- } // case 74
- case 82: {
- v_ = input.readBytes();
- bitField0_ |= 0x00000200;
- break;
- } // case 82
- case 90: {
- r_ = input.readBytes();
- bitField0_ |= 0x00000400;
- break;
- } // case 90
- case 98: {
- s_ = input.readBytes();
- bitField0_ |= 0x00000800;
- break;
- } // case 98
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
- *
- *
- * bytes block_hash = 1;
- * @return The blockHash.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getBlockHash() {
- return blockHash_;
- }
- /**
- *
- * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
- *
- *
- * bytes block_hash = 1;
- * @param value The blockHash to set.
- * @return This builder for chaining.
- */
- public Builder setBlockHash(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- blockHash_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
- *
- *
- * bytes block_hash = 1;
- * @return This builder for chaining.
- */
- public Builder clearBlockHash() {
- bitField0_ = (bitField0_ & ~0x00000001);
- blockHash_ = getDefaultInstance().getBlockHash();
- onChanged();
- return this;
- }
-
- private long blockTimestamp_ ;
- /**
- *
- * 事务所在的区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 block_timestamp = 2;
- * @return The blockTimestamp.
- */
- @java.lang.Override
- public long getBlockTimestamp() {
- return blockTimestamp_;
- }
- /**
- *
- * 事务所在的区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 block_timestamp = 2;
- * @param value The blockTimestamp to set.
- * @return This builder for chaining.
- */
- public Builder setBlockTimestamp(long value) {
-
- blockTimestamp_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * 事务所在的区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 block_timestamp = 2;
- * @return This builder for chaining.
- */
- public Builder clearBlockTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000002);
- blockTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private int index_ ;
- /**
- *
- * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
- *
- *
- * uint32 index = 3;
- * @return The index.
- */
- @java.lang.Override
- public int getIndex() {
- return index_;
- }
- /**
- *
- * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
- *
- *
- * uint32 index = 3;
- * @param value The index to set.
- * @return This builder for chaining.
- */
- public Builder setIndex(int value) {
-
- index_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
- *
- *
- * uint32 index = 3;
- * @return This builder for chaining.
- */
- public Builder clearIndex() {
- bitField0_ = (bitField0_ & ~0x00000004);
- index_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 事务的哈希
- *
- *
- * bytes hash = 4;
- * @return The hash.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getHash() {
- return hash_;
- }
- /**
- *
- * 事务的哈希
- *
- *
- * bytes hash = 4;
- * @param value The hash to set.
- * @return This builder for chaining.
- */
- public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- hash_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * 事务的哈希
- *
- *
- * bytes hash = 4;
- * @return This builder for chaining.
- */
- public Builder clearHash() {
- bitField0_ = (bitField0_ & ~0x00000008);
- hash_ = getDefaultInstance().getHash();
- onChanged();
- return this;
- }
-
- private int type_ = 0;
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override public int getTypeValue() {
- return type_;
- }
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @param value The enum numeric value on the wire for type to set.
- * @return This builder for chaining.
- */
- public Builder setTypeValue(int value) {
- type_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @return The type.
- */
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType getType() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType result = org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.forNumber(type_);
- return result == null ? org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType.UNRECOGNIZED : result;
- }
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @param value The type to set.
- * @return This builder for chaining.
- */
- public Builder setType(org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- type_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- * 事务类型
- *
- *
- * .bdware.bdledger.api.TransactionType type = 5;
- * @return This builder for chaining.
- */
- public Builder clearType() {
- bitField0_ = (bitField0_ & ~0x00000010);
- type_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString from_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 发送账户地址
- *
- *
- * bytes from = 6;
- * @return The from.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getFrom() {
- return from_;
- }
- /**
- *
- * 发送账户地址
- *
- *
- * bytes from = 6;
- * @param value The from to set.
- * @return This builder for chaining.
- */
- public Builder setFrom(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- from_ = value;
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- * 发送账户地址
- *
- *
- * bytes from = 6;
- * @return This builder for chaining.
- */
- public Builder clearFrom() {
- bitField0_ = (bitField0_ & ~0x00000020);
- from_ = getDefaultInstance().getFrom();
- onChanged();
- return this;
- }
-
- private long nonce_ ;
- /**
- *
- * 这条事务之前发送者所发送的事务数量
- *
- *
- * uint64 nonce = 7;
- * @return The nonce.
- */
- @java.lang.Override
- public long getNonce() {
- return nonce_;
- }
- /**
- *
- * 这条事务之前发送者所发送的事务数量
- *
- *
- * uint64 nonce = 7;
- * @param value The nonce to set.
- * @return This builder for chaining.
- */
- public Builder setNonce(long value) {
-
- nonce_ = value;
- bitField0_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- * 这条事务之前发送者所发送的事务数量
- *
- *
- * uint64 nonce = 7;
- * @return This builder for chaining.
- */
- public Builder clearNonce() {
- bitField0_ = (bitField0_ & ~0x00000040);
- nonce_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString to_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
- *
- *
- * bytes to = 8;
- * @return The to.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTo() {
- return to_;
- }
- /**
- *
- * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
- *
- *
- * bytes to = 8;
- * @param value The to to set.
- * @return This builder for chaining.
- */
- public Builder setTo(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- to_ = value;
- bitField0_ |= 0x00000080;
- onChanged();
- return this;
- }
- /**
- *
- * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
- *
- *
- * bytes to = 8;
- * @return This builder for chaining.
- */
- public Builder clearTo() {
- bitField0_ = (bitField0_ & ~0x00000080);
- to_ = getDefaultInstance().getTo();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 数据或合约代码
- *
- *
- * bytes data = 9;
- * @return The data.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getData() {
- return data_;
- }
- /**
- *
- * 数据或合约代码
- *
- *
- * bytes data = 9;
- * @param value The data to set.
- * @return This builder for chaining.
- */
- public Builder setData(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- data_ = value;
- bitField0_ |= 0x00000100;
- onChanged();
- return this;
- }
- /**
- *
- * 数据或合约代码
- *
- *
- * bytes data = 9;
- * @return This builder for chaining.
- */
- public Builder clearData() {
- bitField0_ = (bitField0_ & ~0x00000100);
- data_ = getDefaultInstance().getData();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString v_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * ECDSA recovery id
- *
- *
- * bytes v = 10;
- * @return The v.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getV() {
- return v_;
- }
- /**
- *
- * ECDSA recovery id
- *
- *
- * bytes v = 10;
- * @param value The v to set.
- * @return This builder for chaining.
- */
- public Builder setV(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- v_ = value;
- bitField0_ |= 0x00000200;
- onChanged();
- return this;
- }
- /**
- *
- * ECDSA recovery id
- *
- *
- * bytes v = 10;
- * @return This builder for chaining.
- */
- public Builder clearV() {
- bitField0_ = (bitField0_ & ~0x00000200);
- v_ = getDefaultInstance().getV();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString r_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * ECDSA signature r
- *
- *
- * bytes r = 11;
- * @return The r.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getR() {
- return r_;
- }
- /**
- *
- * ECDSA signature r
- *
- *
- * bytes r = 11;
- * @param value The r to set.
- * @return This builder for chaining.
- */
- public Builder setR(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- r_ = value;
- bitField0_ |= 0x00000400;
- onChanged();
- return this;
- }
- /**
- *
- * ECDSA signature r
- *
- *
- * bytes r = 11;
- * @return This builder for chaining.
- */
- public Builder clearR() {
- bitField0_ = (bitField0_ & ~0x00000400);
- r_ = getDefaultInstance().getR();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString s_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * ECDSA signature s
- *
- *
- * bytes s = 12;
- * @return The s.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getS() {
- return s_;
- }
- /**
- *
- * ECDSA signature s
- *
- *
- * bytes s = 12;
- * @param value The s to set.
- * @return This builder for chaining.
- */
- public Builder setS(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- s_ = value;
- bitField0_ |= 0x00000800;
- onChanged();
- return this;
- }
- /**
- *
- * ECDSA signature s
- *
- *
- * bytes s = 12;
- * @return This builder for chaining.
- */
- public Builder clearS() {
- bitField0_ = (bitField0_ & ~0x00000800);
- s_ = getDefaultInstance().getS();
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:bdware.bdledger.api.Transaction)
- }
-
- // @@protoc_insertion_point(class_scope:bdware.bdledger.api.Transaction)
- private static final org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction();
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Transaction parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface BlockOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdware.bdledger.api.Block)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * 区块的哈希,当区块处于待确认状态时为`null`
- *
- *
- * bytes hash = 1;
- * @return The hash.
- */
- com.google.protobuf.ByteString getHash();
-
- /**
- *
- * 产块者账户地址
- *
- *
- * bytes creator = 2;
- * @return The creator.
- */
- com.google.protobuf.ByteString getCreator();
-
- /**
- *
- * 这个区块之前产块者产生的区块数量
- *
- *
- * uint64 nonce = 3;
- * @return The nonce.
- */
- long getNonce();
-
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @return A list containing the parentHashes.
- */
- java.util.List getParentHashesList();
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @return The count of parentHashes.
- */
- int getParentHashesCount();
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @param index The index of the element to return.
- * @return The parentHashes at the given index.
- */
- com.google.protobuf.ByteString getParentHashes(int index);
-
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @return A list containing the witnesses.
- */
- java.util.List getWitnessesList();
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @return The count of witnesses.
- */
- int getWitnessesCount();
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @param index The index of the element to return.
- * @return The witnesses at the given index.
- */
- com.google.protobuf.ByteString getWitnesses(int index);
-
- /**
- *
- * 区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 timestamp = 6;
- * @return The timestamp.
- */
- long getTimestamp();
-
- /**
- *
- * 区块大小的字节数
- *
- *
- * uint64 size = 7;
- * @return The size.
- */
- long getSize();
-
- /**
- *
- * 区块包含的事务数量
- *
- *
- * uint32 transaction_count = 8;
- * @return The transactionCount.
- */
- int getTransactionCount();
-
- /**
- *
- * 区块的事务默克尔树根
- *
- *
- * bytes transactions_root = 9;
- * @return The transactionsRoot.
- */
- com.google.protobuf.ByteString getTransactionsRoot();
-
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- java.util.List
- getTransactionsList();
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction getTransactions(int index);
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- int getTransactionsCount();
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- java.util.List extends org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder>
- getTransactionsOrBuilderList();
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder getTransactionsOrBuilder(
- int index);
-
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @return A list containing the transactionHashes.
- */
- java.util.List getTransactionHashesList();
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @return The count of transactionHashes.
- */
- int getTransactionHashesCount();
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @param index The index of the element to return.
- * @return The transactionHashes at the given index.
- */
- com.google.protobuf.ByteString getTransactionHashes(int index);
-
- /**
- *
- * 产块者签名
- *
- *
- * bytes creator_signature = 12;
- * @return The creatorSignature.
- */
- com.google.protobuf.ByteString getCreatorSignature();
-
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @return A list containing the witnessSignatures.
- */
- java.util.List getWitnessSignaturesList();
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @return The count of witnessSignatures.
- */
- int getWitnessSignaturesCount();
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @param index The index of the element to return.
- * @return The witnessSignatures at the given index.
- */
- com.google.protobuf.ByteString getWitnessSignatures(int index);
- }
- /**
- * Protobuf type {@code bdware.bdledger.api.Block}
- */
- public static final class Block extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdware.bdledger.api.Block)
- BlockOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Block.newBuilder() to construct.
- private Block(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Block() {
- hash_ = com.google.protobuf.ByteString.EMPTY;
- creator_ = com.google.protobuf.ByteString.EMPTY;
- parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
- witnesses_ = emptyList(com.google.protobuf.ByteString.class);
- transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
- transactions_ = java.util.Collections.emptyList();
- transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
- creatorSignature_ = com.google.protobuf.ByteString.EMPTY;
- witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Block();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Block_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Block_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block.class, org.bdware.bdledger.api.grpc.pb.CommonProto.Block.Builder.class);
- }
-
- public static final int HASH_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 区块的哈希,当区块处于待确认状态时为`null`
- *
- *
- * bytes hash = 1;
- * @return The hash.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getHash() {
- return hash_;
- }
-
- public static final int CREATOR_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString creator_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 产块者账户地址
- *
- *
- * bytes creator = 2;
- * @return The creator.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getCreator() {
- return creator_;
- }
-
- public static final int NONCE_FIELD_NUMBER = 3;
- private long nonce_ = 0L;
- /**
- *
- * 这个区块之前产块者产生的区块数量
- *
- *
- * uint64 nonce = 3;
- * @return The nonce.
- */
- @java.lang.Override
- public long getNonce() {
- return nonce_;
- }
-
- public static final int PARENT_HASHES_FIELD_NUMBER = 4;
- @SuppressWarnings("serial")
- private com.google.protobuf.Internal.ProtobufList parentHashes_ =
- emptyList(com.google.protobuf.ByteString.class);
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @return A list containing the parentHashes.
- */
- @java.lang.Override
- public java.util.List
- getParentHashesList() {
- return parentHashes_;
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @return The count of parentHashes.
- */
- public int getParentHashesCount() {
- return parentHashes_.size();
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @param index The index of the element to return.
- * @return The parentHashes at the given index.
- */
- public com.google.protobuf.ByteString getParentHashes(int index) {
- return parentHashes_.get(index);
- }
-
- public static final int WITNESSES_FIELD_NUMBER = 5;
- @SuppressWarnings("serial")
- private com.google.protobuf.Internal.ProtobufList witnesses_ =
- emptyList(com.google.protobuf.ByteString.class);
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @return A list containing the witnesses.
- */
- @java.lang.Override
- public java.util.List
- getWitnessesList() {
- return witnesses_;
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @return The count of witnesses.
- */
- public int getWitnessesCount() {
- return witnesses_.size();
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @param index The index of the element to return.
- * @return The witnesses at the given index.
- */
- public com.google.protobuf.ByteString getWitnesses(int index) {
- return witnesses_.get(index);
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 6;
- private long timestamp_ = 0L;
- /**
- *
- * 区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 timestamp = 6;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
-
- public static final int SIZE_FIELD_NUMBER = 7;
- private long size_ = 0L;
- /**
- *
- * 区块大小的字节数
- *
- *
- * uint64 size = 7;
- * @return The size.
- */
- @java.lang.Override
- public long getSize() {
- return size_;
- }
-
- public static final int TRANSACTION_COUNT_FIELD_NUMBER = 8;
- private int transactionCount_ = 0;
- /**
- *
- * 区块包含的事务数量
- *
- *
- * uint32 transaction_count = 8;
- * @return The transactionCount.
- */
- @java.lang.Override
- public int getTransactionCount() {
- return transactionCount_;
- }
-
- public static final int TRANSACTIONS_ROOT_FIELD_NUMBER = 9;
- private com.google.protobuf.ByteString transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 区块的事务默克尔树根
- *
- *
- * bytes transactions_root = 9;
- * @return The transactionsRoot.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTransactionsRoot() {
- return transactionsRoot_;
- }
-
- public static final int TRANSACTIONS_FIELD_NUMBER = 10;
- @SuppressWarnings("serial")
- private java.util.List transactions_;
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- @java.lang.Override
- public java.util.List getTransactionsList() {
- return transactions_;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- @java.lang.Override
- public java.util.List extends org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder>
- getTransactionsOrBuilderList() {
- return transactions_;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- @java.lang.Override
- public int getTransactionsCount() {
- return transactions_.size();
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction getTransactions(int index) {
- return transactions_.get(index);
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder getTransactionsOrBuilder(
- int index) {
- return transactions_.get(index);
- }
-
- public static final int TRANSACTION_HASHES_FIELD_NUMBER = 11;
- @SuppressWarnings("serial")
- private com.google.protobuf.Internal.ProtobufList transactionHashes_ =
- emptyList(com.google.protobuf.ByteString.class);
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @return A list containing the transactionHashes.
- */
- @java.lang.Override
- public java.util.List
- getTransactionHashesList() {
- return transactionHashes_;
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @return The count of transactionHashes.
- */
- public int getTransactionHashesCount() {
- return transactionHashes_.size();
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @param index The index of the element to return.
- * @return The transactionHashes at the given index.
- */
- public com.google.protobuf.ByteString getTransactionHashes(int index) {
- return transactionHashes_.get(index);
- }
-
- public static final int CREATOR_SIGNATURE_FIELD_NUMBER = 12;
- private com.google.protobuf.ByteString creatorSignature_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 产块者签名
- *
- *
- * bytes creator_signature = 12;
- * @return The creatorSignature.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getCreatorSignature() {
- return creatorSignature_;
- }
-
- public static final int WITNESS_SIGNATURES_FIELD_NUMBER = 13;
- @SuppressWarnings("serial")
- private com.google.protobuf.Internal.ProtobufList witnessSignatures_ =
- emptyList(com.google.protobuf.ByteString.class);
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @return A list containing the witnessSignatures.
- */
- @java.lang.Override
- public java.util.List
- getWitnessSignaturesList() {
- return witnessSignatures_;
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @return The count of witnessSignatures.
- */
- public int getWitnessSignaturesCount() {
- return witnessSignatures_.size();
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @param index The index of the element to return.
- * @return The witnessSignatures at the given index.
- */
- public com.google.protobuf.ByteString getWitnessSignatures(int index) {
- return witnessSignatures_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!hash_.isEmpty()) {
- output.writeBytes(1, hash_);
- }
- if (!creator_.isEmpty()) {
- output.writeBytes(2, creator_);
- }
- if (nonce_ != 0L) {
- output.writeUInt64(3, nonce_);
- }
- for (int i = 0; i < parentHashes_.size(); i++) {
- output.writeBytes(4, parentHashes_.get(i));
- }
- for (int i = 0; i < witnesses_.size(); i++) {
- output.writeBytes(5, witnesses_.get(i));
- }
- if (timestamp_ != 0L) {
- output.writeInt64(6, timestamp_);
- }
- if (size_ != 0L) {
- output.writeUInt64(7, size_);
- }
- if (transactionCount_ != 0) {
- output.writeUInt32(8, transactionCount_);
- }
- if (!transactionsRoot_.isEmpty()) {
- output.writeBytes(9, transactionsRoot_);
- }
- for (int i = 0; i < transactions_.size(); i++) {
- output.writeMessage(10, transactions_.get(i));
- }
- for (int i = 0; i < transactionHashes_.size(); i++) {
- output.writeBytes(11, transactionHashes_.get(i));
- }
- if (!creatorSignature_.isEmpty()) {
- output.writeBytes(12, creatorSignature_);
- }
- for (int i = 0; i < witnessSignatures_.size(); i++) {
- output.writeBytes(13, witnessSignatures_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!hash_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, hash_);
- }
- if (!creator_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, creator_);
- }
- if (nonce_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(3, nonce_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < parentHashes_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(parentHashes_.get(i));
- }
- size += dataSize;
- size += 1 * getParentHashesList().size();
- }
- {
- int dataSize = 0;
- for (int i = 0; i < witnesses_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(witnesses_.get(i));
- }
- size += dataSize;
- size += 1 * getWitnessesList().size();
- }
- if (timestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(6, timestamp_);
- }
- if (size_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(7, size_);
- }
- if (transactionCount_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(8, transactionCount_);
- }
- if (!transactionsRoot_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(9, transactionsRoot_);
- }
- for (int i = 0; i < transactions_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(10, transactions_.get(i));
- }
- {
- int dataSize = 0;
- for (int i = 0; i < transactionHashes_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(transactionHashes_.get(i));
- }
- size += dataSize;
- size += 1 * getTransactionHashesList().size();
- }
- if (!creatorSignature_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(12, creatorSignature_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < witnessSignatures_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(witnessSignatures_.get(i));
- }
- size += dataSize;
- size += 1 * getWitnessSignaturesList().size();
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.CommonProto.Block)) {
- return super.equals(obj);
- }
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block other = (org.bdware.bdledger.api.grpc.pb.CommonProto.Block) obj;
-
- if (!getHash()
- .equals(other.getHash())) return false;
- if (!getCreator()
- .equals(other.getCreator())) return false;
- if (getNonce()
- != other.getNonce()) return false;
- if (!getParentHashesList()
- .equals(other.getParentHashesList())) return false;
- if (!getWitnessesList()
- .equals(other.getWitnessesList())) return false;
- if (getTimestamp()
- != other.getTimestamp()) return false;
- if (getSize()
- != other.getSize()) return false;
- if (getTransactionCount()
- != other.getTransactionCount()) return false;
- if (!getTransactionsRoot()
- .equals(other.getTransactionsRoot())) return false;
- if (!getTransactionsList()
- .equals(other.getTransactionsList())) return false;
- if (!getTransactionHashesList()
- .equals(other.getTransactionHashesList())) return false;
- if (!getCreatorSignature()
- .equals(other.getCreatorSignature())) return false;
- if (!getWitnessSignaturesList()
- .equals(other.getWitnessSignaturesList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + HASH_FIELD_NUMBER;
- hash = (53 * hash) + getHash().hashCode();
- hash = (37 * hash) + CREATOR_FIELD_NUMBER;
- hash = (53 * hash) + getCreator().hashCode();
- hash = (37 * hash) + NONCE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getNonce());
- if (getParentHashesCount() > 0) {
- hash = (37 * hash) + PARENT_HASHES_FIELD_NUMBER;
- hash = (53 * hash) + getParentHashesList().hashCode();
- }
- if (getWitnessesCount() > 0) {
- hash = (37 * hash) + WITNESSES_FIELD_NUMBER;
- hash = (53 * hash) + getWitnessesList().hashCode();
- }
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTimestamp());
- hash = (37 * hash) + SIZE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getSize());
- hash = (37 * hash) + TRANSACTION_COUNT_FIELD_NUMBER;
- hash = (53 * hash) + getTransactionCount();
- hash = (37 * hash) + TRANSACTIONS_ROOT_FIELD_NUMBER;
- hash = (53 * hash) + getTransactionsRoot().hashCode();
- if (getTransactionsCount() > 0) {
- hash = (37 * hash) + TRANSACTIONS_FIELD_NUMBER;
- hash = (53 * hash) + getTransactionsList().hashCode();
- }
- if (getTransactionHashesCount() > 0) {
- hash = (37 * hash) + TRANSACTION_HASHES_FIELD_NUMBER;
- hash = (53 * hash) + getTransactionHashesList().hashCode();
- }
- hash = (37 * hash) + CREATOR_SIGNATURE_FIELD_NUMBER;
- hash = (53 * hash) + getCreatorSignature().hashCode();
- if (getWitnessSignaturesCount() > 0) {
- hash = (37 * hash) + WITNESS_SIGNATURES_FIELD_NUMBER;
- hash = (53 * hash) + getWitnessSignaturesList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.CommonProto.Block prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code bdware.bdledger.api.Block}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdware.bdledger.api.Block)
- org.bdware.bdledger.api.grpc.pb.CommonProto.BlockOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Block_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Block_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block.class, org.bdware.bdledger.api.grpc.pb.CommonProto.Block.Builder.class);
- }
-
- // Construct using org.bdware.bdledger.api.grpc.pb.CommonProto.Block.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- hash_ = com.google.protobuf.ByteString.EMPTY;
- creator_ = com.google.protobuf.ByteString.EMPTY;
- nonce_ = 0L;
- parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
- witnesses_ = emptyList(com.google.protobuf.ByteString.class);
- timestamp_ = 0L;
- size_ = 0L;
- transactionCount_ = 0;
- transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
- if (transactionsBuilder_ == null) {
- transactions_ = java.util.Collections.emptyList();
- } else {
- transactions_ = null;
- transactionsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000200);
- transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
- creatorSignature_ = com.google.protobuf.ByteString.EMPTY;
- witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Block_descriptor;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Block getDefaultInstanceForType() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.Block.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Block build() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Block buildPartial() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Block result = new org.bdware.bdledger.api.grpc.pb.CommonProto.Block(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.CommonProto.Block result) {
- if (transactionsBuilder_ == null) {
- if (((bitField0_ & 0x00000200) != 0)) {
- transactions_ = java.util.Collections.unmodifiableList(transactions_);
- bitField0_ = (bitField0_ & ~0x00000200);
- }
- result.transactions_ = transactions_;
- } else {
- result.transactions_ = transactionsBuilder_.build();
- }
- }
-
- private void buildPartial0(org.bdware.bdledger.api.grpc.pb.CommonProto.Block result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.hash_ = hash_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.creator_ = creator_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.nonce_ = nonce_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- parentHashes_.makeImmutable();
- result.parentHashes_ = parentHashes_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- witnesses_.makeImmutable();
- result.witnesses_ = witnesses_;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.timestamp_ = timestamp_;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.size_ = size_;
- }
- if (((from_bitField0_ & 0x00000080) != 0)) {
- result.transactionCount_ = transactionCount_;
- }
- if (((from_bitField0_ & 0x00000100) != 0)) {
- result.transactionsRoot_ = transactionsRoot_;
- }
- if (((from_bitField0_ & 0x00000400) != 0)) {
- transactionHashes_.makeImmutable();
- result.transactionHashes_ = transactionHashes_;
- }
- if (((from_bitField0_ & 0x00000800) != 0)) {
- result.creatorSignature_ = creatorSignature_;
- }
- if (((from_bitField0_ & 0x00001000) != 0)) {
- witnessSignatures_.makeImmutable();
- result.witnessSignatures_ = witnessSignatures_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.bdware.bdledger.api.grpc.pb.CommonProto.Block) {
- return mergeFrom((org.bdware.bdledger.api.grpc.pb.CommonProto.Block)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.CommonProto.Block other) {
- if (other == org.bdware.bdledger.api.grpc.pb.CommonProto.Block.getDefaultInstance()) return this;
- if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
- setHash(other.getHash());
- }
- if (other.getCreator() != com.google.protobuf.ByteString.EMPTY) {
- setCreator(other.getCreator());
- }
- if (other.getNonce() != 0L) {
- setNonce(other.getNonce());
- }
- if (!other.parentHashes_.isEmpty()) {
- if (parentHashes_.isEmpty()) {
- parentHashes_ = other.parentHashes_;
- parentHashes_.makeImmutable();
- bitField0_ |= 0x00000008;
- } else {
- ensureParentHashesIsMutable();
- parentHashes_.addAll(other.parentHashes_);
- }
- onChanged();
- }
- if (!other.witnesses_.isEmpty()) {
- if (witnesses_.isEmpty()) {
- witnesses_ = other.witnesses_;
- witnesses_.makeImmutable();
- bitField0_ |= 0x00000010;
- } else {
- ensureWitnessesIsMutable();
- witnesses_.addAll(other.witnesses_);
- }
- onChanged();
- }
- if (other.getTimestamp() != 0L) {
- setTimestamp(other.getTimestamp());
- }
- if (other.getSize() != 0L) {
- setSize(other.getSize());
- }
- if (other.getTransactionCount() != 0) {
- setTransactionCount(other.getTransactionCount());
- }
- if (other.getTransactionsRoot() != com.google.protobuf.ByteString.EMPTY) {
- setTransactionsRoot(other.getTransactionsRoot());
- }
- if (transactionsBuilder_ == null) {
- if (!other.transactions_.isEmpty()) {
- if (transactions_.isEmpty()) {
- transactions_ = other.transactions_;
- bitField0_ = (bitField0_ & ~0x00000200);
- } else {
- ensureTransactionsIsMutable();
- transactions_.addAll(other.transactions_);
- }
- onChanged();
- }
- } else {
- if (!other.transactions_.isEmpty()) {
- if (transactionsBuilder_.isEmpty()) {
- transactionsBuilder_.dispose();
- transactionsBuilder_ = null;
- transactions_ = other.transactions_;
- bitField0_ = (bitField0_ & ~0x00000200);
- transactionsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getTransactionsFieldBuilder() : null;
- } else {
- transactionsBuilder_.addAllMessages(other.transactions_);
- }
- }
- }
- if (!other.transactionHashes_.isEmpty()) {
- if (transactionHashes_.isEmpty()) {
- transactionHashes_ = other.transactionHashes_;
- transactionHashes_.makeImmutable();
- bitField0_ |= 0x00000400;
- } else {
- ensureTransactionHashesIsMutable();
- transactionHashes_.addAll(other.transactionHashes_);
- }
- onChanged();
- }
- if (other.getCreatorSignature() != com.google.protobuf.ByteString.EMPTY) {
- setCreatorSignature(other.getCreatorSignature());
- }
- if (!other.witnessSignatures_.isEmpty()) {
- if (witnessSignatures_.isEmpty()) {
- witnessSignatures_ = other.witnessSignatures_;
- witnessSignatures_.makeImmutable();
- bitField0_ |= 0x00001000;
- } else {
- ensureWitnessSignaturesIsMutable();
- witnessSignatures_.addAll(other.witnessSignatures_);
- }
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- hash_ = input.readBytes();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- creator_ = input.readBytes();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 24: {
- nonce_ = input.readUInt64();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 34: {
- com.google.protobuf.ByteString v = input.readBytes();
- ensureParentHashesIsMutable();
- parentHashes_.add(v);
- break;
- } // case 34
- case 42: {
- com.google.protobuf.ByteString v = input.readBytes();
- ensureWitnessesIsMutable();
- witnesses_.add(v);
- break;
- } // case 42
- case 48: {
- timestamp_ = input.readInt64();
- bitField0_ |= 0x00000020;
- break;
- } // case 48
- case 56: {
- size_ = input.readUInt64();
- bitField0_ |= 0x00000040;
- break;
- } // case 56
- case 64: {
- transactionCount_ = input.readUInt32();
- bitField0_ |= 0x00000080;
- break;
- } // case 64
- case 74: {
- transactionsRoot_ = input.readBytes();
- bitField0_ |= 0x00000100;
- break;
- } // case 74
- case 82: {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction m =
- input.readMessage(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.parser(),
- extensionRegistry);
- if (transactionsBuilder_ == null) {
- ensureTransactionsIsMutable();
- transactions_.add(m);
- } else {
- transactionsBuilder_.addMessage(m);
- }
- break;
- } // case 82
- case 90: {
- com.google.protobuf.ByteString v = input.readBytes();
- ensureTransactionHashesIsMutable();
- transactionHashes_.add(v);
- break;
- } // case 90
- case 98: {
- creatorSignature_ = input.readBytes();
- bitField0_ |= 0x00000800;
- break;
- } // case 98
- case 106: {
- com.google.protobuf.ByteString v = input.readBytes();
- ensureWitnessSignaturesIsMutable();
- witnessSignatures_.add(v);
- break;
- } // case 106
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 区块的哈希,当区块处于待确认状态时为`null`
- *
- *
- * bytes hash = 1;
- * @return The hash.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getHash() {
- return hash_;
- }
- /**
- *
- * 区块的哈希,当区块处于待确认状态时为`null`
- *
- *
- * bytes hash = 1;
- * @param value The hash to set.
- * @return This builder for chaining.
- */
- public Builder setHash(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- hash_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * 区块的哈希,当区块处于待确认状态时为`null`
- *
- *
- * bytes hash = 1;
- * @return This builder for chaining.
- */
- public Builder clearHash() {
- bitField0_ = (bitField0_ & ~0x00000001);
- hash_ = getDefaultInstance().getHash();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString creator_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 产块者账户地址
- *
- *
- * bytes creator = 2;
- * @return The creator.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getCreator() {
- return creator_;
- }
- /**
- *
- * 产块者账户地址
- *
- *
- * bytes creator = 2;
- * @param value The creator to set.
- * @return This builder for chaining.
- */
- public Builder setCreator(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- creator_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * 产块者账户地址
- *
- *
- * bytes creator = 2;
- * @return This builder for chaining.
- */
- public Builder clearCreator() {
- bitField0_ = (bitField0_ & ~0x00000002);
- creator_ = getDefaultInstance().getCreator();
- onChanged();
- return this;
- }
-
- private long nonce_ ;
- /**
- *
- * 这个区块之前产块者产生的区块数量
- *
- *
- * uint64 nonce = 3;
- * @return The nonce.
- */
- @java.lang.Override
- public long getNonce() {
- return nonce_;
- }
- /**
- *
- * 这个区块之前产块者产生的区块数量
- *
- *
- * uint64 nonce = 3;
- * @param value The nonce to set.
- * @return This builder for chaining.
- */
- public Builder setNonce(long value) {
-
- nonce_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * 这个区块之前产块者产生的区块数量
- *
- *
- * uint64 nonce = 3;
- * @return This builder for chaining.
- */
- public Builder clearNonce() {
- bitField0_ = (bitField0_ & ~0x00000004);
- nonce_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.ProtobufList parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
- private void ensureParentHashesIsMutable() {
- if (!parentHashes_.isModifiable()) {
- parentHashes_ = makeMutableCopy(parentHashes_);
- }
- bitField0_ |= 0x00000008;
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @return A list containing the parentHashes.
- */
- public java.util.List
- getParentHashesList() {
- parentHashes_.makeImmutable();
- return parentHashes_;
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @return The count of parentHashes.
- */
- public int getParentHashesCount() {
- return parentHashes_.size();
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @param index The index of the element to return.
- * @return The parentHashes at the given index.
- */
- public com.google.protobuf.ByteString getParentHashes(int index) {
- return parentHashes_.get(index);
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @param index The index to set the value at.
- * @param value The parentHashes to set.
- * @return This builder for chaining.
- */
- public Builder setParentHashes(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureParentHashesIsMutable();
- parentHashes_.set(index, value);
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @param value The parentHashes to add.
- * @return This builder for chaining.
- */
- public Builder addParentHashes(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureParentHashesIsMutable();
- parentHashes_.add(value);
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @param values The parentHashes to add.
- * @return This builder for chaining.
- */
- public Builder addAllParentHashes(
- java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureParentHashesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, parentHashes_);
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * 父区块的哈希
- *
- *
- * repeated bytes parent_hashes = 4;
- * @return This builder for chaining.
- */
- public Builder clearParentHashes() {
- parentHashes_ = emptyList(com.google.protobuf.ByteString.class);
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.ProtobufList witnesses_ = emptyList(com.google.protobuf.ByteString.class);
- private void ensureWitnessesIsMutable() {
- if (!witnesses_.isModifiable()) {
- witnesses_ = makeMutableCopy(witnesses_);
- }
- bitField0_ |= 0x00000010;
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @return A list containing the witnesses.
- */
- public java.util.List
- getWitnessesList() {
- witnesses_.makeImmutable();
- return witnesses_;
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @return The count of witnesses.
- */
- public int getWitnessesCount() {
- return witnesses_.size();
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @param index The index of the element to return.
- * @return The witnesses at the given index.
- */
- public com.google.protobuf.ByteString getWitnesses(int index) {
- return witnesses_.get(index);
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @param index The index to set the value at.
- * @param value The witnesses to set.
- * @return This builder for chaining.
- */
- public Builder setWitnesses(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureWitnessesIsMutable();
- witnesses_.set(index, value);
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @param value The witnesses to add.
- * @return This builder for chaining.
- */
- public Builder addWitnesses(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureWitnessesIsMutable();
- witnesses_.add(value);
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @param values The witnesses to add.
- * @return This builder for chaining.
- */
- public Builder addAllWitnesses(
- java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureWitnessesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, witnesses_);
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- * 见证者账户地址
- *
- *
- * repeated bytes witnesses = 5;
- * @return This builder for chaining.
- */
- public Builder clearWitnesses() {
- witnesses_ = emptyList(com.google.protobuf.ByteString.class);
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
-
- private long timestamp_ ;
- /**
- *
- * 区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 timestamp = 6;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
- /**
- *
- * 区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 timestamp = 6;
- * @param value The timestamp to set.
- * @return This builder for chaining.
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- * 区块产生时的 UNIX 时间戳,单位为秒
- *
- *
- * int64 timestamp = 6;
- * @return This builder for chaining.
- */
- public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000020);
- timestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private long size_ ;
- /**
- *
- * 区块大小的字节数
- *
- *
- * uint64 size = 7;
- * @return The size.
- */
- @java.lang.Override
- public long getSize() {
- return size_;
- }
- /**
- *
- * 区块大小的字节数
- *
- *
- * uint64 size = 7;
- * @param value The size to set.
- * @return This builder for chaining.
- */
- public Builder setSize(long value) {
-
- size_ = value;
- bitField0_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- * 区块大小的字节数
- *
- *
- * uint64 size = 7;
- * @return This builder for chaining.
- */
- public Builder clearSize() {
- bitField0_ = (bitField0_ & ~0x00000040);
- size_ = 0L;
- onChanged();
- return this;
- }
-
- private int transactionCount_ ;
- /**
- *
- * 区块包含的事务数量
- *
- *
- * uint32 transaction_count = 8;
- * @return The transactionCount.
- */
- @java.lang.Override
- public int getTransactionCount() {
- return transactionCount_;
- }
- /**
- *
- * 区块包含的事务数量
- *
- *
- * uint32 transaction_count = 8;
- * @param value The transactionCount to set.
- * @return This builder for chaining.
- */
- public Builder setTransactionCount(int value) {
-
- transactionCount_ = value;
- bitField0_ |= 0x00000080;
- onChanged();
- return this;
- }
- /**
- *
- * 区块包含的事务数量
- *
- *
- * uint32 transaction_count = 8;
- * @return This builder for chaining.
- */
- public Builder clearTransactionCount() {
- bitField0_ = (bitField0_ & ~0x00000080);
- transactionCount_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 区块的事务默克尔树根
- *
- *
- * bytes transactions_root = 9;
- * @return The transactionsRoot.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTransactionsRoot() {
- return transactionsRoot_;
- }
- /**
- *
- * 区块的事务默克尔树根
- *
- *
- * bytes transactions_root = 9;
- * @param value The transactionsRoot to set.
- * @return This builder for chaining.
- */
- public Builder setTransactionsRoot(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- transactionsRoot_ = value;
- bitField0_ |= 0x00000100;
- onChanged();
- return this;
- }
- /**
- *
- * 区块的事务默克尔树根
- *
- *
- * bytes transactions_root = 9;
- * @return This builder for chaining.
- */
- public Builder clearTransactionsRoot() {
- bitField0_ = (bitField0_ & ~0x00000100);
- transactionsRoot_ = getDefaultInstance().getTransactionsRoot();
- onChanged();
- return this;
- }
-
- private java.util.List transactions_ =
- java.util.Collections.emptyList();
- private void ensureTransactionsIsMutable() {
- if (!((bitField0_ & 0x00000200) != 0)) {
- transactions_ = new java.util.ArrayList(transactions_);
- bitField0_ |= 0x00000200;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder, org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder> transactionsBuilder_;
-
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public java.util.List getTransactionsList() {
- if (transactionsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(transactions_);
- } else {
- return transactionsBuilder_.getMessageList();
- }
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public int getTransactionsCount() {
- if (transactionsBuilder_ == null) {
- return transactions_.size();
- } else {
- return transactionsBuilder_.getCount();
- }
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction getTransactions(int index) {
- if (transactionsBuilder_ == null) {
- return transactions_.get(index);
- } else {
- return transactionsBuilder_.getMessage(index);
- }
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder setTransactions(
- int index, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction value) {
- if (transactionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTransactionsIsMutable();
- transactions_.set(index, value);
- onChanged();
- } else {
- transactionsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder setTransactions(
- int index, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder builderForValue) {
- if (transactionsBuilder_ == null) {
- ensureTransactionsIsMutable();
- transactions_.set(index, builderForValue.build());
- onChanged();
- } else {
- transactionsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder addTransactions(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction value) {
- if (transactionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTransactionsIsMutable();
- transactions_.add(value);
- onChanged();
- } else {
- transactionsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder addTransactions(
- int index, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction value) {
- if (transactionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTransactionsIsMutable();
- transactions_.add(index, value);
- onChanged();
- } else {
- transactionsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder addTransactions(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder builderForValue) {
- if (transactionsBuilder_ == null) {
- ensureTransactionsIsMutable();
- transactions_.add(builderForValue.build());
- onChanged();
- } else {
- transactionsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder addTransactions(
- int index, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder builderForValue) {
- if (transactionsBuilder_ == null) {
- ensureTransactionsIsMutable();
- transactions_.add(index, builderForValue.build());
- onChanged();
- } else {
- transactionsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder addAllTransactions(
- java.lang.Iterable extends org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction> values) {
- if (transactionsBuilder_ == null) {
- ensureTransactionsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, transactions_);
- onChanged();
- } else {
- transactionsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder clearTransactions() {
- if (transactionsBuilder_ == null) {
- transactions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000200);
- onChanged();
- } else {
- transactionsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public Builder removeTransactions(int index) {
- if (transactionsBuilder_ == null) {
- ensureTransactionsIsMutable();
- transactions_.remove(index);
- onChanged();
- } else {
- transactionsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder getTransactionsBuilder(
- int index) {
- return getTransactionsFieldBuilder().getBuilder(index);
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder getTransactionsOrBuilder(
- int index) {
- if (transactionsBuilder_ == null) {
- return transactions_.get(index); } else {
- return transactionsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public java.util.List extends org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder>
- getTransactionsOrBuilderList() {
- if (transactionsBuilder_ != null) {
- return transactionsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(transactions_);
- }
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder addTransactionsBuilder() {
- return getTransactionsFieldBuilder().addBuilder(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance());
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder addTransactionsBuilder(
- int index) {
- return getTransactionsFieldBuilder().addBuilder(
- index, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.getDefaultInstance());
- }
- /**
- *
- * 事务对象的数组,或为空
- *
- *
- * repeated .bdware.bdledger.api.Transaction transactions = 10;
- */
- public java.util.List
- getTransactionsBuilderList() {
- return getTransactionsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder, org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder>
- getTransactionsFieldBuilder() {
- if (transactionsBuilder_ == null) {
- transactionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction, org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction.Builder, org.bdware.bdledger.api.grpc.pb.CommonProto.TransactionOrBuilder>(
- transactions_,
- ((bitField0_ & 0x00000200) != 0),
- getParentForChildren(),
- isClean());
- transactions_ = null;
- }
- return transactionsBuilder_;
- }
-
- private com.google.protobuf.Internal.ProtobufList transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
- private void ensureTransactionHashesIsMutable() {
- if (!transactionHashes_.isModifiable()) {
- transactionHashes_ = makeMutableCopy(transactionHashes_);
- }
- bitField0_ |= 0x00000400;
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @return A list containing the transactionHashes.
- */
- public java.util.List
- getTransactionHashesList() {
- transactionHashes_.makeImmutable();
- return transactionHashes_;
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @return The count of transactionHashes.
- */
- public int getTransactionHashesCount() {
- return transactionHashes_.size();
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @param index The index of the element to return.
- * @return The transactionHashes at the given index.
- */
- public com.google.protobuf.ByteString getTransactionHashes(int index) {
- return transactionHashes_.get(index);
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @param index The index to set the value at.
- * @param value The transactionHashes to set.
- * @return This builder for chaining.
- */
- public Builder setTransactionHashes(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureTransactionHashesIsMutable();
- transactionHashes_.set(index, value);
- bitField0_ |= 0x00000400;
- onChanged();
- return this;
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @param value The transactionHashes to add.
- * @return This builder for chaining.
- */
- public Builder addTransactionHashes(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureTransactionHashesIsMutable();
- transactionHashes_.add(value);
- bitField0_ |= 0x00000400;
- onChanged();
- return this;
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @param values The transactionHashes to add.
- * @return This builder for chaining.
- */
- public Builder addAllTransactionHashes(
- java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureTransactionHashesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, transactionHashes_);
- bitField0_ |= 0x00000400;
- onChanged();
- return this;
- }
- /**
- *
- * 20字节的事务哈希的数组,或为空
- *
- *
- * repeated bytes transaction_hashes = 11;
- * @return This builder for chaining.
- */
- public Builder clearTransactionHashes() {
- transactionHashes_ = emptyList(com.google.protobuf.ByteString.class);
- bitField0_ = (bitField0_ & ~0x00000400);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString creatorSignature_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 产块者签名
- *
- *
- * bytes creator_signature = 12;
- * @return The creatorSignature.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getCreatorSignature() {
- return creatorSignature_;
- }
- /**
- *
- * 产块者签名
- *
- *
- * bytes creator_signature = 12;
- * @param value The creatorSignature to set.
- * @return This builder for chaining.
- */
- public Builder setCreatorSignature(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- creatorSignature_ = value;
- bitField0_ |= 0x00000800;
- onChanged();
- return this;
- }
- /**
- *
- * 产块者签名
- *
- *
- * bytes creator_signature = 12;
- * @return This builder for chaining.
- */
- public Builder clearCreatorSignature() {
- bitField0_ = (bitField0_ & ~0x00000800);
- creatorSignature_ = getDefaultInstance().getCreatorSignature();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.ProtobufList witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
- private void ensureWitnessSignaturesIsMutable() {
- if (!witnessSignatures_.isModifiable()) {
- witnessSignatures_ = makeMutableCopy(witnessSignatures_);
- }
- bitField0_ |= 0x00001000;
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @return A list containing the witnessSignatures.
- */
- public java.util.List
- getWitnessSignaturesList() {
- witnessSignatures_.makeImmutable();
- return witnessSignatures_;
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @return The count of witnessSignatures.
- */
- public int getWitnessSignaturesCount() {
- return witnessSignatures_.size();
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @param index The index of the element to return.
- * @return The witnessSignatures at the given index.
- */
- public com.google.protobuf.ByteString getWitnessSignatures(int index) {
- return witnessSignatures_.get(index);
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @param index The index to set the value at.
- * @param value The witnessSignatures to set.
- * @return This builder for chaining.
- */
- public Builder setWitnessSignatures(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureWitnessSignaturesIsMutable();
- witnessSignatures_.set(index, value);
- bitField0_ |= 0x00001000;
- onChanged();
- return this;
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @param value The witnessSignatures to add.
- * @return This builder for chaining.
- */
- public Builder addWitnessSignatures(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- ensureWitnessSignaturesIsMutable();
- witnessSignatures_.add(value);
- bitField0_ |= 0x00001000;
- onChanged();
- return this;
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @param values The witnessSignatures to add.
- * @return This builder for chaining.
- */
- public Builder addAllWitnessSignatures(
- java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureWitnessSignaturesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, witnessSignatures_);
- bitField0_ |= 0x00001000;
- onChanged();
- return this;
- }
- /**
- *
- * 见证者签名
- *
- *
- * repeated bytes witness_signatures = 13;
- * @return This builder for chaining.
- */
- public Builder clearWitnessSignatures() {
- witnessSignatures_ = emptyList(com.google.protobuf.ByteString.class);
- bitField0_ = (bitField0_ & ~0x00001000);
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:bdware.bdledger.api.Block)
- }
-
- // @@protoc_insertion_point(class_scope:bdware.bdledger.api.Block)
- private static final org.bdware.bdledger.api.grpc.pb.CommonProto.Block DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.CommonProto.Block();
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Block getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Block parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Block getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ContractOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdware.bdledger.api.Contract)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *合约名称
- *
- *
- * bytes contractName = 1;
- * @return The contractName.
- */
- com.google.protobuf.ByteString getContractName();
-
- /**
- *
- *合约执行的节点数量
- *
- *
- * uint32 randomNum = 2;
- * @return The randomNum.
- */
- int getRandomNum();
-
- /**
- *
- *合约方法
- *
- *
- * bytes operation = 3;
- * @return The operation.
- */
- com.google.protobuf.ByteString getOperation();
-
- /**
- *
- *合约方法参数
- *
- *
- * bytes arg = 4;
- * @return The arg.
- */
- com.google.protobuf.ByteString getArg();
-
- /**
- *
- *合约文件路径(合约在IDE工程的相对路径)
- *
- *
- * bytes path = 5;
- * @return The path.
- */
- com.google.protobuf.ByteString getPath();
-
- /**
- *
- *合约内容(可为合约文件相对路径/合约脚本)
- *
- *
- * bytes content = 6;
- * @return The content.
- */
- com.google.protobuf.ByteString getContent();
-
- /**
- *
- *用户公钥
- *
- *
- * bytes pubkey = 7;
- * @return The pubkey.
- */
- com.google.protobuf.ByteString getPubkey();
- }
- /**
- * Protobuf type {@code bdware.bdledger.api.Contract}
- */
- public static final class Contract extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdware.bdledger.api.Contract)
- ContractOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Contract.newBuilder() to construct.
- private Contract(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Contract() {
- contractName_ = com.google.protobuf.ByteString.EMPTY;
- operation_ = com.google.protobuf.ByteString.EMPTY;
- arg_ = com.google.protobuf.ByteString.EMPTY;
- path_ = com.google.protobuf.ByteString.EMPTY;
- content_ = com.google.protobuf.ByteString.EMPTY;
- pubkey_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Contract();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Contract_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Contract_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.class, org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.Builder.class);
- }
-
- /**
- * Protobuf enum {@code bdware.bdledger.api.Contract.ContractUnitRequestType}
- */
- public enum ContractUnitRequestType
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * START = 0;
- */
- START(0),
- /**
- * STOP = 1;
- */
- STOP(1),
- /**
- * EXECUTE = 2;
- */
- EXECUTE(2),
- /**
- * REPLY = 3;
- */
- REPLY(3),
- /**
- * REQUEST = 4;
- */
- REQUEST(4),
- /**
- * PREPREPARE = 5;
- */
- PREPREPARE(5),
- /**
- * PREPARE = 6;
- */
- PREPARE(6),
- /**
- * COMMIT = 7;
- */
- COMMIT(7),
- /**
- * ADDPEER = 8;
- */
- ADDPEER(8),
- /**
- * DROPPEER = 9;
- */
- DROPPEER(9),
- /**
- * STATESYNC = 10;
- */
- STATESYNC(10),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * START = 0;
- */
- public static final int START_VALUE = 0;
- /**
- * STOP = 1;
- */
- public static final int STOP_VALUE = 1;
- /**
- * EXECUTE = 2;
- */
- public static final int EXECUTE_VALUE = 2;
- /**
- * REPLY = 3;
- */
- public static final int REPLY_VALUE = 3;
- /**
- * REQUEST = 4;
- */
- public static final int REQUEST_VALUE = 4;
- /**
- * PREPREPARE = 5;
- */
- public static final int PREPREPARE_VALUE = 5;
- /**
- * PREPARE = 6;
- */
- public static final int PREPARE_VALUE = 6;
- /**
- * COMMIT = 7;
- */
- public static final int COMMIT_VALUE = 7;
- /**
- * ADDPEER = 8;
- */
- public static final int ADDPEER_VALUE = 8;
- /**
- * DROPPEER = 9;
- */
- public static final int DROPPEER_VALUE = 9;
- /**
- * STATESYNC = 10;
- */
- public static final int STATESYNC_VALUE = 10;
-
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static ContractUnitRequestType valueOf(int value) {
- return forNumber(value);
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- */
- public static ContractUnitRequestType forNumber(int value) {
- switch (value) {
- case 0: return START;
- case 1: return STOP;
- case 2: return EXECUTE;
- case 3: return REPLY;
- case 4: return REQUEST;
- case 5: return PREPREPARE;
- case 6: return PREPARE;
- case 7: return COMMIT;
- case 8: return ADDPEER;
- case 9: return DROPPEER;
- case 10: return STATESYNC;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- ContractUnitRequestType> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public ContractUnitRequestType findValueByNumber(int number) {
- return ContractUnitRequestType.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalStateException(
- "Can't get the descriptor of an unrecognized enum value.");
- }
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final ContractUnitRequestType[] VALUES = values();
-
- public static ContractUnitRequestType valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- if (desc.getIndex() == -1) {
- return UNRECOGNIZED;
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private ContractUnitRequestType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:bdware.bdledger.api.Contract.ContractUnitRequestType)
- }
-
- public static final int CONTRACTNAME_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString contractName_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约名称
- *
- *
- * bytes contractName = 1;
- * @return The contractName.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getContractName() {
- return contractName_;
- }
-
- public static final int RANDOMNUM_FIELD_NUMBER = 2;
- private int randomNum_ = 0;
- /**
- *
- *合约执行的节点数量
- *
- *
- * uint32 randomNum = 2;
- * @return The randomNum.
- */
- @java.lang.Override
- public int getRandomNum() {
- return randomNum_;
- }
-
- public static final int OPERATION_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString operation_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约方法
- *
- *
- * bytes operation = 3;
- * @return The operation.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getOperation() {
- return operation_;
- }
-
- public static final int ARG_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString arg_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约方法参数
- *
- *
- * bytes arg = 4;
- * @return The arg.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getArg() {
- return arg_;
- }
-
- public static final int PATH_FIELD_NUMBER = 5;
- private com.google.protobuf.ByteString path_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约文件路径(合约在IDE工程的相对路径)
- *
- *
- * bytes path = 5;
- * @return The path.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getPath() {
- return path_;
- }
-
- public static final int CONTENT_FIELD_NUMBER = 6;
- private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约内容(可为合约文件相对路径/合约脚本)
- *
- *
- * bytes content = 6;
- * @return The content.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getContent() {
- return content_;
- }
-
- public static final int PUBKEY_FIELD_NUMBER = 7;
- private com.google.protobuf.ByteString pubkey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *用户公钥
- *
- *
- * bytes pubkey = 7;
- * @return The pubkey.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getPubkey() {
- return pubkey_;
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!contractName_.isEmpty()) {
- output.writeBytes(1, contractName_);
- }
- if (randomNum_ != 0) {
- output.writeUInt32(2, randomNum_);
- }
- if (!operation_.isEmpty()) {
- output.writeBytes(3, operation_);
- }
- if (!arg_.isEmpty()) {
- output.writeBytes(4, arg_);
- }
- if (!path_.isEmpty()) {
- output.writeBytes(5, path_);
- }
- if (!content_.isEmpty()) {
- output.writeBytes(6, content_);
- }
- if (!pubkey_.isEmpty()) {
- output.writeBytes(7, pubkey_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!contractName_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, contractName_);
- }
- if (randomNum_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(2, randomNum_);
- }
- if (!operation_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, operation_);
- }
- if (!arg_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, arg_);
- }
- if (!path_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(5, path_);
- }
- if (!content_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(6, content_);
- }
- if (!pubkey_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(7, pubkey_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.CommonProto.Contract)) {
- return super.equals(obj);
- }
- org.bdware.bdledger.api.grpc.pb.CommonProto.Contract other = (org.bdware.bdledger.api.grpc.pb.CommonProto.Contract) obj;
-
- if (!getContractName()
- .equals(other.getContractName())) return false;
- if (getRandomNum()
- != other.getRandomNum()) return false;
- if (!getOperation()
- .equals(other.getOperation())) return false;
- if (!getArg()
- .equals(other.getArg())) return false;
- if (!getPath()
- .equals(other.getPath())) return false;
- if (!getContent()
- .equals(other.getContent())) return false;
- if (!getPubkey()
- .equals(other.getPubkey())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + CONTRACTNAME_FIELD_NUMBER;
- hash = (53 * hash) + getContractName().hashCode();
- hash = (37 * hash) + RANDOMNUM_FIELD_NUMBER;
- hash = (53 * hash) + getRandomNum();
- hash = (37 * hash) + OPERATION_FIELD_NUMBER;
- hash = (53 * hash) + getOperation().hashCode();
- hash = (37 * hash) + ARG_FIELD_NUMBER;
- hash = (53 * hash) + getArg().hashCode();
- hash = (37 * hash) + PATH_FIELD_NUMBER;
- hash = (53 * hash) + getPath().hashCode();
- hash = (37 * hash) + CONTENT_FIELD_NUMBER;
- hash = (53 * hash) + getContent().hashCode();
- hash = (37 * hash) + PUBKEY_FIELD_NUMBER;
- hash = (53 * hash) + getPubkey().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.CommonProto.Contract prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code bdware.bdledger.api.Contract}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdware.bdledger.api.Contract)
- org.bdware.bdledger.api.grpc.pb.CommonProto.ContractOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Contract_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Contract_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.class, org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.Builder.class);
- }
-
- // Construct using org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- contractName_ = com.google.protobuf.ByteString.EMPTY;
- randomNum_ = 0;
- operation_ = com.google.protobuf.ByteString.EMPTY;
- arg_ = com.google.protobuf.ByteString.EMPTY;
- path_ = com.google.protobuf.ByteString.EMPTY;
- content_ = com.google.protobuf.ByteString.EMPTY;
- pubkey_ = com.google.protobuf.ByteString.EMPTY;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.internal_static_bdware_bdledger_api_Contract_descriptor;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Contract getDefaultInstanceForType() {
- return org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Contract build() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Contract result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Contract buildPartial() {
- org.bdware.bdledger.api.grpc.pb.CommonProto.Contract result = new org.bdware.bdledger.api.grpc.pb.CommonProto.Contract(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(org.bdware.bdledger.api.grpc.pb.CommonProto.Contract result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.contractName_ = contractName_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.randomNum_ = randomNum_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.operation_ = operation_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.arg_ = arg_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.path_ = path_;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.content_ = content_;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.pubkey_ = pubkey_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.bdware.bdledger.api.grpc.pb.CommonProto.Contract) {
- return mergeFrom((org.bdware.bdledger.api.grpc.pb.CommonProto.Contract)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.CommonProto.Contract other) {
- if (other == org.bdware.bdledger.api.grpc.pb.CommonProto.Contract.getDefaultInstance()) return this;
- if (other.getContractName() != com.google.protobuf.ByteString.EMPTY) {
- setContractName(other.getContractName());
- }
- if (other.getRandomNum() != 0) {
- setRandomNum(other.getRandomNum());
- }
- if (other.getOperation() != com.google.protobuf.ByteString.EMPTY) {
- setOperation(other.getOperation());
- }
- if (other.getArg() != com.google.protobuf.ByteString.EMPTY) {
- setArg(other.getArg());
- }
- if (other.getPath() != com.google.protobuf.ByteString.EMPTY) {
- setPath(other.getPath());
- }
- if (other.getContent() != com.google.protobuf.ByteString.EMPTY) {
- setContent(other.getContent());
- }
- if (other.getPubkey() != com.google.protobuf.ByteString.EMPTY) {
- setPubkey(other.getPubkey());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- contractName_ = input.readBytes();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 16: {
- randomNum_ = input.readUInt32();
- bitField0_ |= 0x00000002;
- break;
- } // case 16
- case 26: {
- operation_ = input.readBytes();
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 34: {
- arg_ = input.readBytes();
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 42: {
- path_ = input.readBytes();
- bitField0_ |= 0x00000010;
- break;
- } // case 42
- case 50: {
- content_ = input.readBytes();
- bitField0_ |= 0x00000020;
- break;
- } // case 50
- case 58: {
- pubkey_ = input.readBytes();
- bitField0_ |= 0x00000040;
- break;
- } // case 58
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private com.google.protobuf.ByteString contractName_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约名称
- *
- *
- * bytes contractName = 1;
- * @return The contractName.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getContractName() {
- return contractName_;
- }
- /**
- *
- *合约名称
- *
- *
- * bytes contractName = 1;
- * @param value The contractName to set.
- * @return This builder for chaining.
- */
- public Builder setContractName(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- contractName_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *合约名称
- *
- *
- * bytes contractName = 1;
- * @return This builder for chaining.
- */
- public Builder clearContractName() {
- bitField0_ = (bitField0_ & ~0x00000001);
- contractName_ = getDefaultInstance().getContractName();
- onChanged();
- return this;
- }
-
- private int randomNum_ ;
- /**
- *
- *合约执行的节点数量
- *
- *
- * uint32 randomNum = 2;
- * @return The randomNum.
- */
- @java.lang.Override
- public int getRandomNum() {
- return randomNum_;
- }
- /**
- *
- *合约执行的节点数量
- *
- *
- * uint32 randomNum = 2;
- * @param value The randomNum to set.
- * @return This builder for chaining.
- */
- public Builder setRandomNum(int value) {
-
- randomNum_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *合约执行的节点数量
- *
- *
- * uint32 randomNum = 2;
- * @return This builder for chaining.
- */
- public Builder clearRandomNum() {
- bitField0_ = (bitField0_ & ~0x00000002);
- randomNum_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString operation_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约方法
- *
- *
- * bytes operation = 3;
- * @return The operation.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getOperation() {
- return operation_;
- }
- /**
- *
- *合约方法
- *
- *
- * bytes operation = 3;
- * @param value The operation to set.
- * @return This builder for chaining.
- */
- public Builder setOperation(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- operation_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *合约方法
- *
- *
- * bytes operation = 3;
- * @return This builder for chaining.
- */
- public Builder clearOperation() {
- bitField0_ = (bitField0_ & ~0x00000004);
- operation_ = getDefaultInstance().getOperation();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString arg_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约方法参数
- *
- *
- * bytes arg = 4;
- * @return The arg.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getArg() {
- return arg_;
- }
- /**
- *
- *合约方法参数
- *
- *
- * bytes arg = 4;
- * @param value The arg to set.
- * @return This builder for chaining.
- */
- public Builder setArg(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- arg_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *合约方法参数
- *
- *
- * bytes arg = 4;
- * @return This builder for chaining.
- */
- public Builder clearArg() {
- bitField0_ = (bitField0_ & ~0x00000008);
- arg_ = getDefaultInstance().getArg();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString path_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约文件路径(合约在IDE工程的相对路径)
- *
- *
- * bytes path = 5;
- * @return The path.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getPath() {
- return path_;
- }
- /**
- *
- *合约文件路径(合约在IDE工程的相对路径)
- *
- *
- * bytes path = 5;
- * @param value The path to set.
- * @return This builder for chaining.
- */
- public Builder setPath(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- path_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *合约文件路径(合约在IDE工程的相对路径)
- *
- *
- * bytes path = 5;
- * @return This builder for chaining.
- */
- public Builder clearPath() {
- bitField0_ = (bitField0_ & ~0x00000010);
- path_ = getDefaultInstance().getPath();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *合约内容(可为合约文件相对路径/合约脚本)
- *
- *
- * bytes content = 6;
- * @return The content.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getContent() {
- return content_;
- }
- /**
- *
- *合约内容(可为合约文件相对路径/合约脚本)
- *
- *
- * bytes content = 6;
- * @param value The content to set.
- * @return This builder for chaining.
- */
- public Builder setContent(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- content_ = value;
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *合约内容(可为合约文件相对路径/合约脚本)
- *
- *
- * bytes content = 6;
- * @return This builder for chaining.
- */
- public Builder clearContent() {
- bitField0_ = (bitField0_ & ~0x00000020);
- content_ = getDefaultInstance().getContent();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString pubkey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- *用户公钥
- *
- *
- * bytes pubkey = 7;
- * @return The pubkey.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getPubkey() {
- return pubkey_;
- }
- /**
- *
- *用户公钥
- *
- *
- * bytes pubkey = 7;
- * @param value The pubkey to set.
- * @return This builder for chaining.
- */
- public Builder setPubkey(com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- pubkey_ = value;
- bitField0_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- *用户公钥
- *
- *
- * bytes pubkey = 7;
- * @return This builder for chaining.
- */
- public Builder clearPubkey() {
- bitField0_ = (bitField0_ & ~0x00000040);
- pubkey_ = getDefaultInstance().getPubkey();
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:bdware.bdledger.api.Contract)
- }
-
- // @@protoc_insertion_point(class_scope:bdware.bdledger.api.Contract)
- private static final org.bdware.bdledger.api.grpc.pb.CommonProto.Contract DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.CommonProto.Contract();
- }
-
- public static org.bdware.bdledger.api.grpc.pb.CommonProto.Contract getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Contract parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.CommonProto.Contract getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdware_bdledger_api_Transaction_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdware_bdledger_api_Transaction_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdware_bdledger_api_Block_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdware_bdledger_api_Block_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdware_bdledger_api_Contract_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdware_bdledger_api_Contract_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 bdware/bdledger/api/common.proto\022\023bdwa" +
- "re.bdledger.api\"\343\001\n\013Transaction\022\022\n\nblock" +
- "_hash\030\001 \001(\014\022\027\n\017block_timestamp\030\002 \001(\003\022\r\n\005" +
- "index\030\003 \001(\r\022\014\n\004hash\030\004 \001(\014\0222\n\004type\030\005 \001(\0162" +
- "$.bdware.bdledger.api.TransactionType\022\014\n" +
- "\004from\030\006 \001(\014\022\r\n\005nonce\030\007 \001(\004\022\n\n\002to\030\010 \001(\014\022\014" +
- "\n\004data\030\t \001(\014\022\t\n\001v\030\n \001(\014\022\t\n\001r\030\013 \001(\014\022\t\n\001s\030" +
- "\014 \001(\014\"\301\002\n\005Block\022\014\n\004hash\030\001 \001(\014\022\017\n\007creator" +
- "\030\002 \001(\014\022\r\n\005nonce\030\003 \001(\004\022\025\n\rparent_hashes\030\004" +
- " \003(\014\022\021\n\twitnesses\030\005 \003(\014\022\021\n\ttimestamp\030\006 \001" +
- "(\003\022\014\n\004size\030\007 \001(\004\022\031\n\021transaction_count\030\010 " +
- "\001(\r\022\031\n\021transactions_root\030\t \001(\014\0226\n\014transa" +
- "ctions\030\n \003(\0132 .bdware.bdledger.api.Trans" +
- "action\022\032\n\022transaction_hashes\030\013 \003(\014\022\031\n\021cr" +
- "eator_signature\030\014 \001(\014\022\032\n\022witness_signatu" +
- "res\030\r \003(\014\"\253\002\n\010Contract\022\024\n\014contractName\030\001" +
- " \001(\014\022\021\n\trandomNum\030\002 \001(\r\022\021\n\toperation\030\003 \001" +
- "(\014\022\013\n\003arg\030\004 \001(\014\022\014\n\004path\030\005 \001(\014\022\017\n\007content" +
- "\030\006 \001(\014\022\016\n\006pubkey\030\007 \001(\014\"\246\001\n\027ContractUnitR" +
- "equestType\022\t\n\005START\020\000\022\010\n\004STOP\020\001\022\013\n\007EXECU" +
- "TE\020\002\022\t\n\005REPLY\020\003\022\013\n\007REQUEST\020\004\022\016\n\nPREPREPA" +
- "RE\020\005\022\013\n\007PREPARE\020\006\022\n\n\006COMMIT\020\007\022\013\n\007ADDPEER" +
- "\020\010\022\014\n\010DROPPEER\020\t\022\r\n\tSTATESYNC\020\n*o\n\017Trans" +
- "actionType\022\n\n\006RECORD\020\000\022\013\n\007MESSAGE\020\001\022\025\n\021C" +
- "ONTRACT_CREATION\020\002\022\027\n\023CONTRACT_INVOCATIO" +
- "N\020\003\022\023\n\017CONTRACT_STATUS\020\004BY\n\037org.bdware.b" +
- "dledger.api.grpc.pbB\013CommonProtoZ)bdware" +
- ".org/bdledger/pkg/api/grpc/pb;apipbb\006pro" +
- "to3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- internal_static_bdware_bdledger_api_Transaction_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_bdware_bdledger_api_Transaction_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdware_bdledger_api_Transaction_descriptor,
- new java.lang.String[] { "BlockHash", "BlockTimestamp", "Index", "Hash", "Type", "From", "Nonce", "To", "Data", "V", "R", "S", });
- internal_static_bdware_bdledger_api_Block_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_bdware_bdledger_api_Block_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdware_bdledger_api_Block_descriptor,
- new java.lang.String[] { "Hash", "Creator", "Nonce", "ParentHashes", "Witnesses", "Timestamp", "Size", "TransactionCount", "TransactionsRoot", "Transactions", "TransactionHashes", "CreatorSignature", "WitnessSignatures", });
- internal_static_bdware_bdledger_api_Contract_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_bdware_bdledger_api_Contract_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdware_bdledger_api_Contract_descriptor,
- new java.lang.String[] { "ContractName", "RandomNum", "Operation", "Arg", "Path", "Content", "Pubkey", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/pb/ErrorDetailsProto.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/ErrorDetailsProto.java
deleted file mode 100644
index fa1e8e7..0000000
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/ErrorDetailsProto.java
+++ /dev/null
@@ -1,1771 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: bdware/bdledger/api/error_details.proto
-
-// Protobuf Java Version: 3.25.6
-package org.bdware.bdledger.api.grpc.pb;
-
-public final class ErrorDetailsProto {
- private ErrorDetailsProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- public interface InvalidArgumentOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdware.bdledger.api.InvalidArgument)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- java.util.List
- getFieldViolationsList();
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getFieldViolations(int index);
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- int getFieldViolationsCount();
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- java.util.List extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
- getFieldViolationsOrBuilderList();
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
- int index);
- }
- /**
- *
- * InvalidArgument indicates client specified an invalid argument.
- * Note that this differs from FailedPrecondition. It indicates arguments
- * that are problematic regardless of the state of the system
- * (e.g., a malformed file name).
- *
- *
- * Protobuf type {@code bdware.bdledger.api.InvalidArgument}
- */
- public static final class InvalidArgument extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdware.bdledger.api.InvalidArgument)
- InvalidArgumentOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use InvalidArgument.newBuilder() to construct.
- private InvalidArgument(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private InvalidArgument() {
- fieldViolations_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new InvalidArgument();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.Builder.class);
- }
-
- public interface FieldViolationOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdware.bdledger.api.InvalidArgument.FieldViolation)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @return The field.
- */
- java.lang.String getField();
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @return The bytes for field.
- */
- com.google.protobuf.ByteString
- getFieldBytes();
-
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @return The description.
- */
- java.lang.String getDescription();
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @return The bytes for description.
- */
- com.google.protobuf.ByteString
- getDescriptionBytes();
- }
- /**
- *
- * A message type used to describe a single invalid field.
- *
- *
- * Protobuf type {@code bdware.bdledger.api.InvalidArgument.FieldViolation}
- */
- public static final class FieldViolation extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdware.bdledger.api.InvalidArgument.FieldViolation)
- FieldViolationOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use FieldViolation.newBuilder() to construct.
- private FieldViolation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private FieldViolation() {
- field_ = "";
- description_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new FieldViolation();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder.class);
- }
-
- public static final int FIELD_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object field_ = "";
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @return The field.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @return The bytes for field.
- */
- @java.lang.Override
- 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;
- @SuppressWarnings("serial")
- private volatile java.lang.Object description_ = "";
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @return The description.
- */
- @java.lang.Override
- 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;
- }
- }
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @return The bytes for description.
- */
- @java.lang.Override
- 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;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation)) {
- return super.equals(obj);
- }
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation other = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation) obj;
-
- if (!getField()
- .equals(other.getField())) return false;
- if (!getDescription()
- .equals(other.getDescription())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + FIELD_FIELD_NUMBER;
- hash = (53 * hash) + getField().hashCode();
- hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
- hash = (53 * hash) + getDescription().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * A message type used to describe a single invalid field.
- *
- *
- * Protobuf type {@code bdware.bdledger.api.InvalidArgument.FieldViolation}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdware.bdledger.api.InvalidArgument.FieldViolation)
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder.class);
- }
-
- // Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- field_ = "";
- description_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getDefaultInstanceForType() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation build() {
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation buildPartial() {
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation result = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.field_ = field_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.description_ = description_;
- }
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation) {
- return mergeFrom((org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation other) {
- if (other == org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance()) return this;
- if (!other.getField().isEmpty()) {
- field_ = other.field_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getDescription().isEmpty()) {
- description_ = other.description_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- field_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- description_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object field_ = "";
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @return The 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;
- }
- }
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @return The bytes for 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;
- }
- }
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @param value The field to set.
- * @return This builder for chaining.
- */
- public Builder setField(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- field_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @return This builder for chaining.
- */
- public Builder clearField() {
- field_ = getDefaultInstance().getField();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * 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., "field_violations.field" would identify this field.
- *
- *
- * string field = 1;
- * @param value The bytes for field to set.
- * @return This builder for chaining.
- */
- public Builder setFieldBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- field_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object description_ = "";
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @return The description.
- */
- 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;
- }
- }
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @return The bytes for description.
- */
- 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;
- }
- }
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @param value The description to set.
- * @return This builder for chaining.
- */
- public Builder setDescription(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- description_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @return This builder for chaining.
- */
- public Builder clearDescription() {
- description_ = getDefaultInstance().getDescription();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * A description of why the request element is bad.
- *
- *
- * string description = 2;
- * @param value The bytes for description to set.
- * @return This builder for chaining.
- */
- public Builder setDescriptionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- description_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:bdware.bdledger.api.InvalidArgument.FieldViolation)
- }
-
- // @@protoc_insertion_point(class_scope:bdware.bdledger.api.InvalidArgument.FieldViolation)
- private static final org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation();
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public FieldViolation parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private java.util.List fieldViolations_;
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public java.util.List getFieldViolationsList() {
- return fieldViolations_;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public java.util.List extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
- getFieldViolationsOrBuilderList() {
- return fieldViolations_;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public int getFieldViolationsCount() {
- return fieldViolations_.size();
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getFieldViolations(int index) {
- return fieldViolations_.get(index);
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
- int index) {
- return fieldViolations_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- 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));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- 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));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument)) {
- return super.equals(obj);
- }
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument other = (org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument) obj;
-
- if (!getFieldViolationsList()
- .equals(other.getFieldViolationsList())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getFieldViolationsCount() > 0) {
- hash = (37 * hash) + FIELD_VIOLATIONS_FIELD_NUMBER;
- hash = (53 * hash) + getFieldViolationsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * InvalidArgument indicates client specified an invalid argument.
- * Note that this differs from FailedPrecondition. It indicates arguments
- * that are problematic regardless of the state of the system
- * (e.g., a malformed file name).
- *
- *
- * Protobuf type {@code bdware.bdledger.api.InvalidArgument}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdware.bdledger.api.InvalidArgument)
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgumentOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.class, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.Builder.class);
- }
-
- // Construct using org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (fieldViolationsBuilder_ == null) {
- fieldViolations_ = java.util.Collections.emptyList();
- } else {
- fieldViolations_ = null;
- fieldViolationsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument getDefaultInstanceForType() {
- return org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.getDefaultInstance();
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument build() {
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument buildPartial() {
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result) {
- if (fieldViolationsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.fieldViolations_ = fieldViolations_;
- } else {
- result.fieldViolations_ = fieldViolationsBuilder_.build();
- }
- }
-
- private void buildPartial0(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument result) {
- int from_bitField0_ = bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument) {
- return mergeFrom((org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument other) {
- if (other == org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.getDefaultInstance()) return this;
- if (fieldViolationsBuilder_ == null) {
- if (!other.fieldViolations_.isEmpty()) {
- if (fieldViolations_.isEmpty()) {
- fieldViolations_ = other.fieldViolations_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureFieldViolationsIsMutable();
- fieldViolations_.addAll(other.fieldViolations_);
- }
- onChanged();
- }
- } else {
- if (!other.fieldViolations_.isEmpty()) {
- if (fieldViolationsBuilder_.isEmpty()) {
- fieldViolationsBuilder_.dispose();
- fieldViolationsBuilder_ = null;
- fieldViolations_ = other.fieldViolations_;
- bitField0_ = (bitField0_ & ~0x00000001);
- fieldViolationsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getFieldViolationsFieldBuilder() : null;
- } else {
- fieldViolationsBuilder_.addAllMessages(other.fieldViolations_);
- }
- }
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation m =
- input.readMessage(
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.parser(),
- extensionRegistry);
- if (fieldViolationsBuilder_ == null) {
- ensureFieldViolationsIsMutable();
- fieldViolations_.add(m);
- } else {
- fieldViolationsBuilder_.addMessage(m);
- }
- break;
- } // case 10
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.util.List fieldViolations_ =
- java.util.Collections.emptyList();
- private void ensureFieldViolationsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- fieldViolations_ = new java.util.ArrayList(fieldViolations_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder> fieldViolationsBuilder_;
-
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public java.util.List getFieldViolationsList() {
- if (fieldViolationsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(fieldViolations_);
- } else {
- return fieldViolationsBuilder_.getMessageList();
- }
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public int getFieldViolationsCount() {
- if (fieldViolationsBuilder_ == null) {
- return fieldViolations_.size();
- } else {
- return fieldViolationsBuilder_.getCount();
- }
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation getFieldViolations(int index) {
- if (fieldViolationsBuilder_ == null) {
- return fieldViolations_.get(index);
- } else {
- return fieldViolationsBuilder_.getMessage(index);
- }
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder setFieldViolations(
- int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation value) {
- if (fieldViolationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureFieldViolationsIsMutable();
- fieldViolations_.set(index, value);
- onChanged();
- } else {
- fieldViolationsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder setFieldViolations(
- int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder builderForValue) {
- if (fieldViolationsBuilder_ == null) {
- ensureFieldViolationsIsMutable();
- fieldViolations_.set(index, builderForValue.build());
- onChanged();
- } else {
- fieldViolationsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder addFieldViolations(org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation value) {
- if (fieldViolationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureFieldViolationsIsMutable();
- fieldViolations_.add(value);
- onChanged();
- } else {
- fieldViolationsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder addFieldViolations(
- int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation value) {
- if (fieldViolationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureFieldViolationsIsMutable();
- fieldViolations_.add(index, value);
- onChanged();
- } else {
- fieldViolationsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder addFieldViolations(
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder builderForValue) {
- if (fieldViolationsBuilder_ == null) {
- ensureFieldViolationsIsMutable();
- fieldViolations_.add(builderForValue.build());
- onChanged();
- } else {
- fieldViolationsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder addFieldViolations(
- int index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder builderForValue) {
- if (fieldViolationsBuilder_ == null) {
- ensureFieldViolationsIsMutable();
- fieldViolations_.add(index, builderForValue.build());
- onChanged();
- } else {
- fieldViolationsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder addAllFieldViolations(
- java.lang.Iterable extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation> values) {
- if (fieldViolationsBuilder_ == null) {
- ensureFieldViolationsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, fieldViolations_);
- onChanged();
- } else {
- fieldViolationsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder clearFieldViolations() {
- if (fieldViolationsBuilder_ == null) {
- fieldViolations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- fieldViolationsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public Builder removeFieldViolations(int index) {
- if (fieldViolationsBuilder_ == null) {
- ensureFieldViolationsIsMutable();
- fieldViolations_.remove(index);
- onChanged();
- } else {
- fieldViolationsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder getFieldViolationsBuilder(
- int index) {
- return getFieldViolationsFieldBuilder().getBuilder(index);
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
- int index) {
- if (fieldViolationsBuilder_ == null) {
- return fieldViolations_.get(index); } else {
- return fieldViolationsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public java.util.List extends org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
- getFieldViolationsOrBuilderList() {
- if (fieldViolationsBuilder_ != null) {
- return fieldViolationsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(fieldViolations_);
- }
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder() {
- return getFieldViolationsFieldBuilder().addBuilder(
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance());
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder(
- int index) {
- return getFieldViolationsFieldBuilder().addBuilder(
- index, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.getDefaultInstance());
- }
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdware.bdledger.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- public java.util.List
- getFieldViolationsBuilderList() {
- return getFieldViolationsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>
- getFieldViolationsFieldBuilder() {
- if (fieldViolationsBuilder_ == null) {
- fieldViolationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolation.Builder, org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument.FieldViolationOrBuilder>(
- fieldViolations_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- fieldViolations_ = null;
- }
- return fieldViolationsBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:bdware.bdledger.api.InvalidArgument)
- }
-
- // @@protoc_insertion_point(class_scope:bdware.bdledger.api.InvalidArgument)
- private static final org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument();
- }
-
- public static org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public InvalidArgument parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public org.bdware.bdledger.api.grpc.pb.ErrorDetailsProto.InvalidArgument getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdware_bdledger_api_InvalidArgument_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_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\'bdware/bdledger/api/error_details.prot" +
- "o\022\023bdware.bdledger.api\"\226\001\n\017InvalidArgume" +
- "nt\022M\n\020field_violations\030\001 \003(\01323.bdware.bd" +
- "ledger.api.InvalidArgument.FieldViolatio" +
- "n\0324\n\016FieldViolation\022\r\n\005field\030\001 \001(\t\022\023\n\013de" +
- "scription\030\002 \001(\tB_\n\037org.bdware.bdledger.a" +
- "pi.grpc.pbB\021ErrorDetailsProtoZ)bdware.or" +
- "g/bdledger/pkg/api/grpc/pb;apipbb\006proto3"
- };
- descriptor = com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- });
- internal_static_bdware_bdledger_api_InvalidArgument_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_bdware_bdledger_api_InvalidArgument_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdware_bdledger_api_InvalidArgument_descriptor,
- new java.lang.String[] { "FieldViolations", });
- internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor =
- internal_static_bdware_bdledger_api_InvalidArgument_descriptor.getNestedTypes().get(0);
- internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdware_bdledger_api_InvalidArgument_FieldViolation_descriptor,
- new java.lang.String[] { "Field", "Description", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerGrpc.java b/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerGrpc.java
deleted file mode 100644
index 73eeb7e..0000000
--- a/src/main/java/org/bdware/bdledger/api/grpc/pb/LedgerGrpc.java
+++ /dev/null
@@ -1,569 +0,0 @@
-package org.bdware.bdledger.api.grpc.pb;
-
-import static io.grpc.MethodDescriptor.generateFullMethodName;
-
-/**
- */
-@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.71.0)",
- comments = "Source: bdware/bdledger/api/ledger.proto")
-@io.grpc.stub.annotations.GrpcGenerated
-public final class LedgerGrpc {
-
- private LedgerGrpc() {}
-
- public static final java.lang.String SERVICE_NAME = "bdware.bdledger.api.Ledger";
-
- // Static method descriptors that strictly reflect the proto.
- private static volatile io.grpc.MethodDescriptor getCreateLedgerMethod;
-
- @io.grpc.stub.annotations.RpcMethod(
- fullMethodName = SERVICE_NAME + '/' + "CreateLedger",
- requestType = org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest.class,
- responseType = org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse.class,
- methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getCreateLedgerMethod() {
- io.grpc.MethodDescriptor getCreateLedgerMethod;
- if ((getCreateLedgerMethod = LedgerGrpc.getCreateLedgerMethod) == null) {
- synchronized (LedgerGrpc.class) {
- if ((getCreateLedgerMethod = LedgerGrpc.getCreateLedgerMethod) == null) {
- LedgerGrpc.getCreateLedgerMethod = getCreateLedgerMethod =
- io.grpc.MethodDescriptor.newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateLedger"))
- .setSampledToLocalTracing(true)
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerResponse.getDefaultInstance()))
- .setSchemaDescriptor(new LedgerMethodDescriptorSupplier("CreateLedger"))
- .build();
- }
- }
- }
- return getCreateLedgerMethod;
- }
-
- private static volatile io.grpc.MethodDescriptor getGetLedgersMethod;
-
- @io.grpc.stub.annotations.RpcMethod(
- fullMethodName = SERVICE_NAME + '/' + "GetLedgers",
- requestType = com.google.protobuf.Empty.class,
- responseType = org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse.class,
- methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getGetLedgersMethod() {
- io.grpc.MethodDescriptor getGetLedgersMethod;
- if ((getGetLedgersMethod = LedgerGrpc.getGetLedgersMethod) == null) {
- synchronized (LedgerGrpc.class) {
- if ((getGetLedgersMethod = LedgerGrpc.getGetLedgersMethod) == null) {
- LedgerGrpc.getGetLedgersMethod = getGetLedgersMethod =
- io.grpc.MethodDescriptor.newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLedgers"))
- .setSampledToLocalTracing(true)
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.Empty.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- org.bdware.bdledger.api.grpc.pb.LedgerProto.GetLedgersResponse.getDefaultInstance()))
- .setSchemaDescriptor(new LedgerMethodDescriptorSupplier("GetLedgers"))
- .build();
- }
- }
- }
- return getGetLedgersMethod;
- }
-
- private static volatile io.grpc.MethodDescriptor getSendTransactionMethod;
-
- @io.grpc.stub.annotations.RpcMethod(
- fullMethodName = SERVICE_NAME + '/' + "SendTransaction",
- requestType = org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.class,
- responseType = org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse.class,
- methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getSendTransactionMethod() {
- io.grpc.MethodDescriptor getSendTransactionMethod;
- if ((getSendTransactionMethod = LedgerGrpc.getSendTransactionMethod) == null) {
- synchronized (LedgerGrpc.class) {
- if ((getSendTransactionMethod = LedgerGrpc.getSendTransactionMethod) == null) {
- LedgerGrpc.getSendTransactionMethod = getSendTransactionMethod =
- io.grpc.MethodDescriptor.newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SendTransaction"))
- .setSampledToLocalTracing(true)
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- org.bdware.bdledger.api.grpc.pb.LedgerProto.SendTransactionResponse.getDefaultInstance()))
- .setSchemaDescriptor(new LedgerMethodDescriptorSupplier("SendTransaction"))
- .build();
- }
- }
- }
- return getSendTransactionMethod;
- }
-
- /**
- * Creates a new async stub that supports all call types for the service
- */
- public static LedgerStub newStub(io.grpc.Channel channel) {
- io.grpc.stub.AbstractStub.StubFactory factory =
- new io.grpc.stub.AbstractStub.StubFactory() {
- @java.lang.Override
- public LedgerStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
- return new LedgerStub(channel, callOptions);
- }
- };
- return LedgerStub.newStub(factory, channel);
- }
-
- /**
- * Creates a new blocking-style stub that supports all types of calls on the service
- */
- public static LedgerBlockingV2Stub newBlockingV2Stub(
- io.grpc.Channel channel) {
- io.grpc.stub.AbstractStub.StubFactory factory =
- new io.grpc.stub.AbstractStub.StubFactory() {
- @java.lang.Override
- public LedgerBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
- return new LedgerBlockingV2Stub(channel, callOptions);
- }
- };
- return LedgerBlockingV2Stub.newStub(factory, channel);
- }
-
- /**
- * Creates a new blocking-style stub that supports unary and streaming output calls on the service
- */
- public static LedgerBlockingStub newBlockingStub(
- io.grpc.Channel channel) {
- io.grpc.stub.AbstractStub.StubFactory factory =
- new io.grpc.stub.AbstractStub.StubFactory() {
- @java.lang.Override
- public LedgerBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
- return new LedgerBlockingStub(channel, callOptions);
- }
- };
- return LedgerBlockingStub.newStub(factory, channel);
- }
-
- /**
- * Creates a new ListenableFuture-style stub that supports unary calls on the service
- */
- public static LedgerFutureStub newFutureStub(
- io.grpc.Channel channel) {
- io.grpc.stub.AbstractStub.StubFactory factory =
- new io.grpc.stub.AbstractStub.StubFactory() {
- @java.lang.Override
- public LedgerFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
- return new LedgerFutureStub(channel, callOptions);
- }
- };
- return LedgerFutureStub.newStub(factory, channel);
- }
-
- /**
- */
- public interface AsyncService {
-
- /**
- *
- **
- * Create a new ledger
- * 创建一个新账本
- *
- */
- default void createLedger(org.bdware.bdledger.api.grpc.pb.LedgerProto.CreateLedgerRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
- io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateLedgerMethod(), responseObserver);
- }
-
- /**
- *
- **
- * Get all ledgers
- * 查询所有帐本列表
- *
- */
- default void getLedgers(com.google.protobuf.Empty request,
- io.grpc.stub.StreamObserver responseObserver) {
- io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLedgersMethod(), responseObserver);
- }
-
- /**
- *