com.google.api.servicecontrol.v1.CheckError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of endpoints-management-protos Show documentation
Show all versions of endpoints-management-protos Show documentation
Contains the generated protocol buffer surface used by Endpoints
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/servicecontrol/v1/check_error.proto
package com.google.api.servicecontrol.v1;
/**
*
* Defines the errors to be returned in
* [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
*
*
* Protobuf type {@code google.api.servicecontrol.v1.CheckError}
*/
public final class CheckError extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.CheckError)
CheckErrorOrBuilder {
// Use CheckError.newBuilder() to construct.
private CheckError(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private CheckError() {
code_ = 0;
detail_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private CheckError(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
code_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
detail_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.CheckErrorProto.internal_static_google_api_servicecontrol_v1_CheckError_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.CheckErrorProto.internal_static_google_api_servicecontrol_v1_CheckError_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.CheckError.class, com.google.api.servicecontrol.v1.CheckError.Builder.class);
}
/**
*
* Error codes for Check responses.
*
*
* Protobuf enum {@code google.api.servicecontrol.v1.CheckError.Code}
*/
public enum Code
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* This is never used in `CheckResponse`.
*
*
* ERROR_CODE_UNSPECIFIED = 0;
*/
ERROR_CODE_UNSPECIFIED(0),
/**
*
* The consumer's project id was not found.
* Same as [google.rpc.Code.NOT_FOUND][].
*
*
* NOT_FOUND = 5;
*/
NOT_FOUND(5),
/**
*
* The consumer doesn't have access to the specified resource.
* Same as [google.rpc.Code.PERMISSION_DENIED][].
*
*
* PERMISSION_DENIED = 7;
*/
PERMISSION_DENIED(7),
/**
*
* Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][].
*
*
* RESOURCE_EXHAUSTED = 8;
*/
RESOURCE_EXHAUSTED(8),
/**
*
* The consumer hasn't activated the service.
*
*
* SERVICE_NOT_ACTIVATED = 104;
*/
SERVICE_NOT_ACTIVATED(104),
/**
*
* The consumer cannot access the service because billing is disabled.
*
*
* BILLING_DISABLED = 107;
*/
BILLING_DISABLED(107),
/**
*
* The consumer's project has been marked as deleted (soft deletion).
*
*
* PROJECT_DELETED = 108;
*/
PROJECT_DELETED(108),
/**
*
* The consumer's project number or id does not represent a valid project.
*
*
* PROJECT_INVALID = 114;
*/
PROJECT_INVALID(114),
/**
*
* The IP address of the consumer is invalid for the specific consumer
* project.
*
*
* IP_ADDRESS_BLOCKED = 109;
*/
IP_ADDRESS_BLOCKED(109),
/**
*
* The referer address of the consumer request is invalid for the specific
* consumer project.
*
*
* REFERER_BLOCKED = 110;
*/
REFERER_BLOCKED(110),
/**
*
* The client application of the consumer request is invalid for the
* specific consumer project.
*
*
* CLIENT_APP_BLOCKED = 111;
*/
CLIENT_APP_BLOCKED(111),
/**
*
* The consumer's API key is invalid.
*
*
* API_KEY_INVALID = 105;
*/
API_KEY_INVALID(105),
/**
*
* The consumer's API Key has expired.
*
*
* API_KEY_EXPIRED = 112;
*/
API_KEY_EXPIRED(112),
/**
*
* The consumer's API Key was not found in config record.
*
*
* API_KEY_NOT_FOUND = 113;
*/
API_KEY_NOT_FOUND(113),
/**
*
* The backend server for looking up project id/number is unavailable.
*
*
* NAMESPACE_LOOKUP_UNAVAILABLE = 300;
*/
NAMESPACE_LOOKUP_UNAVAILABLE(300),
/**
*
* The backend server for checking service status is unavailable.
*
*
* SERVICE_STATUS_UNAVAILABLE = 301;
*/
SERVICE_STATUS_UNAVAILABLE(301),
/**
*
* The backend server for checking billing status is unavailable.
*
*
* BILLING_STATUS_UNAVAILABLE = 302;
*/
BILLING_STATUS_UNAVAILABLE(302),
UNRECOGNIZED(-1),
;
/**
*
* This is never used in `CheckResponse`.
*
*
* ERROR_CODE_UNSPECIFIED = 0;
*/
public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0;
/**
*
* The consumer's project id was not found.
* Same as [google.rpc.Code.NOT_FOUND][].
*
*
* NOT_FOUND = 5;
*/
public static final int NOT_FOUND_VALUE = 5;
/**
*
* The consumer doesn't have access to the specified resource.
* Same as [google.rpc.Code.PERMISSION_DENIED][].
*
*
* PERMISSION_DENIED = 7;
*/
public static final int PERMISSION_DENIED_VALUE = 7;
/**
*
* Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][].
*
*
* RESOURCE_EXHAUSTED = 8;
*/
public static final int RESOURCE_EXHAUSTED_VALUE = 8;
/**
*
* The consumer hasn't activated the service.
*
*
* SERVICE_NOT_ACTIVATED = 104;
*/
public static final int SERVICE_NOT_ACTIVATED_VALUE = 104;
/**
*
* The consumer cannot access the service because billing is disabled.
*
*
* BILLING_DISABLED = 107;
*/
public static final int BILLING_DISABLED_VALUE = 107;
/**
*
* The consumer's project has been marked as deleted (soft deletion).
*
*
* PROJECT_DELETED = 108;
*/
public static final int PROJECT_DELETED_VALUE = 108;
/**
*
* The consumer's project number or id does not represent a valid project.
*
*
* PROJECT_INVALID = 114;
*/
public static final int PROJECT_INVALID_VALUE = 114;
/**
*
* The IP address of the consumer is invalid for the specific consumer
* project.
*
*
* IP_ADDRESS_BLOCKED = 109;
*/
public static final int IP_ADDRESS_BLOCKED_VALUE = 109;
/**
*
* The referer address of the consumer request is invalid for the specific
* consumer project.
*
*
* REFERER_BLOCKED = 110;
*/
public static final int REFERER_BLOCKED_VALUE = 110;
/**
*
* The client application of the consumer request is invalid for the
* specific consumer project.
*
*
* CLIENT_APP_BLOCKED = 111;
*/
public static final int CLIENT_APP_BLOCKED_VALUE = 111;
/**
*
* The consumer's API key is invalid.
*
*
* API_KEY_INVALID = 105;
*/
public static final int API_KEY_INVALID_VALUE = 105;
/**
*
* The consumer's API Key has expired.
*
*
* API_KEY_EXPIRED = 112;
*/
public static final int API_KEY_EXPIRED_VALUE = 112;
/**
*
* The consumer's API Key was not found in config record.
*
*
* API_KEY_NOT_FOUND = 113;
*/
public static final int API_KEY_NOT_FOUND_VALUE = 113;
/**
*
* The backend server for looking up project id/number is unavailable.
*
*
* NAMESPACE_LOOKUP_UNAVAILABLE = 300;
*/
public static final int NAMESPACE_LOOKUP_UNAVAILABLE_VALUE = 300;
/**
*
* The backend server for checking service status is unavailable.
*
*
* SERVICE_STATUS_UNAVAILABLE = 301;
*/
public static final int SERVICE_STATUS_UNAVAILABLE_VALUE = 301;
/**
*
* The backend server for checking billing status is unavailable.
*
*
* BILLING_STATUS_UNAVAILABLE = 302;
*/
public static final int BILLING_STATUS_UNAVAILABLE_VALUE = 302;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Code valueOf(int value) {
return forNumber(value);
}
public static Code forNumber(int value) {
switch (value) {
case 0: return ERROR_CODE_UNSPECIFIED;
case 5: return NOT_FOUND;
case 7: return PERMISSION_DENIED;
case 8: return RESOURCE_EXHAUSTED;
case 104: return SERVICE_NOT_ACTIVATED;
case 107: return BILLING_DISABLED;
case 108: return PROJECT_DELETED;
case 114: return PROJECT_INVALID;
case 109: return IP_ADDRESS_BLOCKED;
case 110: return REFERER_BLOCKED;
case 111: return CLIENT_APP_BLOCKED;
case 105: return API_KEY_INVALID;
case 112: return API_KEY_EXPIRED;
case 113: return API_KEY_NOT_FOUND;
case 300: return NAMESPACE_LOOKUP_UNAVAILABLE;
case 301: return SERVICE_STATUS_UNAVAILABLE;
case 302: return BILLING_STATUS_UNAVAILABLE;
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() {
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.api.servicecontrol.v1.CheckError.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.api.servicecontrol.v1.CheckError.Code)
}
public static final int CODE_FIELD_NUMBER = 1;
private int code_;
/**
*
* The error code.
*
*
* optional .google.api.servicecontrol.v1.CheckError.Code code = 1;
*/
public int getCodeValue() {
return code_;
}
/**
*
* The error code.
*
*
* optional .google.api.servicecontrol.v1.CheckError.Code code = 1;
*/
public com.google.api.servicecontrol.v1.CheckError.Code getCode() {
com.google.api.servicecontrol.v1.CheckError.Code result = com.google.api.servicecontrol.v1.CheckError.Code.valueOf(code_);
return result == null ? com.google.api.servicecontrol.v1.CheckError.Code.UNRECOGNIZED : result;
}
public static final int DETAIL_FIELD_NUMBER = 2;
private volatile java.lang.Object detail_;
/**
*
* Free-form text providing details on the error cause of the error.
*
*
* optional string detail = 2;
*/
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;
}
}
/**
*
* Free-form text providing details on the error cause of the error.
*
*
* optional string detail = 2;
*/
public com.google.protobuf.ByteString
getDetailBytes() {
java.lang.Object ref = detail_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
detail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (code_ != com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, code_);
}
if (!getDetailBytes().isEmpty()) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, detail_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (code_ != com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, code_);
}
if (!getDetailBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, detail_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.api.servicecontrol.v1.CheckError)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.CheckError other = (com.google.api.servicecontrol.v1.CheckError) obj;
boolean result = true;
result = result && code_ == other.code_;
result = result && getDetail()
.equals(other.getDetail());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + CODE_FIELD_NUMBER;
hash = (53 * hash) + code_;
hash = (37 * hash) + DETAIL_FIELD_NUMBER;
hash = (53 * hash) + getDetail().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v1.CheckError parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.CheckError 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.servicecontrol.v1.CheckError parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.CheckError parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.CheckError parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.CheckError parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.CheckError parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.CheckError parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.CheckError parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.CheckError parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.servicecontrol.v1.CheckError prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Defines the errors to be returned in
* [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
*
*
* Protobuf type {@code google.api.servicecontrol.v1.CheckError}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.CheckError)
com.google.api.servicecontrol.v1.CheckErrorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.CheckErrorProto.internal_static_google_api_servicecontrol_v1_CheckError_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.CheckErrorProto.internal_static_google_api_servicecontrol_v1_CheckError_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.CheckError.class, com.google.api.servicecontrol.v1.CheckError.Builder.class);
}
// Construct using com.google.api.servicecontrol.v1.CheckError.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
code_ = 0;
detail_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.servicecontrol.v1.CheckErrorProto.internal_static_google_api_servicecontrol_v1_CheckError_descriptor;
}
public com.google.api.servicecontrol.v1.CheckError getDefaultInstanceForType() {
return com.google.api.servicecontrol.v1.CheckError.getDefaultInstance();
}
public com.google.api.servicecontrol.v1.CheckError build() {
com.google.api.servicecontrol.v1.CheckError result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.servicecontrol.v1.CheckError buildPartial() {
com.google.api.servicecontrol.v1.CheckError result = new com.google.api.servicecontrol.v1.CheckError(this);
result.code_ = code_;
result.detail_ = detail_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.servicecontrol.v1.CheckError) {
return mergeFrom((com.google.api.servicecontrol.v1.CheckError)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v1.CheckError other) {
if (other == com.google.api.servicecontrol.v1.CheckError.getDefaultInstance()) return this;
if (other.code_ != 0) {
setCodeValue(other.getCodeValue());
}
if (!other.getDetail().isEmpty()) {
detail_ = other.detail_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.servicecontrol.v1.CheckError parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.servicecontrol.v1.CheckError) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int code_ = 0;
/**
*
* The error code.
*
*
* optional .google.api.servicecontrol.v1.CheckError.Code code = 1;
*/
public int getCodeValue() {
return code_;
}
/**
*
* The error code.
*
*
* optional .google.api.servicecontrol.v1.CheckError.Code code = 1;
*/
public Builder setCodeValue(int value) {
code_ = value;
onChanged();
return this;
}
/**
*
* The error code.
*
*
* optional .google.api.servicecontrol.v1.CheckError.Code code = 1;
*/
public com.google.api.servicecontrol.v1.CheckError.Code getCode() {
com.google.api.servicecontrol.v1.CheckError.Code result = com.google.api.servicecontrol.v1.CheckError.Code.valueOf(code_);
return result == null ? com.google.api.servicecontrol.v1.CheckError.Code.UNRECOGNIZED : result;
}
/**
*
* The error code.
*
*
* optional .google.api.servicecontrol.v1.CheckError.Code code = 1;
*/
public Builder setCode(com.google.api.servicecontrol.v1.CheckError.Code value) {
if (value == null) {
throw new NullPointerException();
}
code_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The error code.
*
*
* optional .google.api.servicecontrol.v1.CheckError.Code code = 1;
*/
public Builder clearCode() {
code_ = 0;
onChanged();
return this;
}
private java.lang.Object detail_ = "";
/**
*
* Free-form text providing details on the error cause of the error.
*
*
* optional string detail = 2;
*/
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;
}
}
/**
*
* Free-form text providing details on the error cause of the error.
*
*
* optional string detail = 2;
*/
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;
}
}
/**
*
* Free-form text providing details on the error cause of the error.
*
*
* optional string detail = 2;
*/
public Builder setDetail(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
detail_ = value;
onChanged();
return this;
}
/**
*
* Free-form text providing details on the error cause of the error.
*
*
* optional string detail = 2;
*/
public Builder clearDetail() {
detail_ = getDefaultInstance().getDetail();
onChanged();
return this;
}
/**
*
* Free-form text providing details on the error cause of the error.
*
*
* optional string detail = 2;
*/
public Builder setDetailBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
detail_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v1.CheckError)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.CheckError)
private static final com.google.api.servicecontrol.v1.CheckError DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.CheckError();
}
public static com.google.api.servicecontrol.v1.CheckError getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CheckError parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CheckError(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.api.servicecontrol.v1.CheckError getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}