Package com.google.rpc
Class BadRequest.FieldViolation.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<BadRequest.FieldViolation,BadRequest.FieldViolation.Builder>
com.google.rpc.BadRequest.FieldViolation.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,BadRequest.FieldViolationOrBuilder
,Cloneable
- Enclosing class:
- BadRequest.FieldViolation
public static final class BadRequest.FieldViolation.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<BadRequest.FieldViolation,BadRequest.FieldViolation.Builder>
implements BadRequest.FieldViolationOrBuilder
A message type used to describe a single bad request field.Protobuf type
google.rpc.BadRequest.FieldViolation
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionA description of why the request element is bad.A path that leads to a field in the request body.Provides a localized error message for field-level errors that is safe to return to the API consumer.The reason of the field-level error.A description of why the request element is bad.com.google.protobuf.ByteString
A description of why the request element is bad.getField()
A path that leads to a field in the request body.com.google.protobuf.ByteString
A path that leads to a field in the request body.Provides a localized error message for field-level errors that is safe to return to the API consumer.The reason of the field-level error.com.google.protobuf.ByteString
The reason of the field-level error.boolean
Provides a localized error message for field-level errors that is safe to return to the API consumer.Provides a localized error message for field-level errors that is safe to return to the API consumer.setDescription
(String value) A description of why the request element is bad.setDescriptionBytes
(com.google.protobuf.ByteString value) A description of why the request element is bad.A path that leads to a field in the request body.setFieldBytes
(com.google.protobuf.ByteString value) A path that leads to a field in the request body.Provides a localized error message for field-level errors that is safe to return to the API consumer.setLocalizedMessage
(LocalizedMessage.Builder builderForValue) Provides a localized error message for field-level errors that is safe to return to the API consumer.The reason of the field-level error.setReasonBytes
(com.google.protobuf.ByteString value) The reason of the field-level error.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getField
A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. Consider the following: message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } optional string email = 1; repeated EmailType type = 2; } string full_name = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto `field` could take one of the following values: * `full_name` for a violation in the `full_name` value * `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message * `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message. In JSON, the same values are represented as: * `fullName` for a violation in the `fullName` value * `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message * `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message.
string field = 1 [json_name = "field"];
- Specified by:
getField
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- The field.
-
getFieldBytes
public com.google.protobuf.ByteString getFieldBytes()A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. Consider the following: message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } optional string email = 1; repeated EmailType type = 2; } string full_name = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto `field` could take one of the following values: * `full_name` for a violation in the `full_name` value * `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message * `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message. In JSON, the same values are represented as: * `fullName` for a violation in the `fullName` value * `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message * `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message.
string field = 1 [json_name = "field"];
- Specified by:
getFieldBytes
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- The bytes for field.
-
setField
A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. Consider the following: message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } optional string email = 1; repeated EmailType type = 2; } string full_name = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto `field` could take one of the following values: * `full_name` for a violation in the `full_name` value * `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message * `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message. In JSON, the same values are represented as: * `fullName` for a violation in the `fullName` value * `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message * `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message.
string field = 1 [json_name = "field"];
- Parameters:
value
- The field to set.- Returns:
- This builder for chaining.
-
clearField
A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. Consider the following: message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } optional string email = 1; repeated EmailType type = 2; } string full_name = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto `field` could take one of the following values: * `full_name` for a violation in the `full_name` value * `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message * `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message. In JSON, the same values are represented as: * `fullName` for a violation in the `fullName` value * `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message * `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message.
string field = 1 [json_name = "field"];
- Returns:
- This builder for chaining.
-
setFieldBytes
A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. Consider the following: message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } optional string email = 1; repeated EmailType type = 2; } string full_name = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto `field` could take one of the following values: * `full_name` for a violation in the `full_name` value * `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message * `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message. In JSON, the same values are represented as: * `fullName` for a violation in the `fullName` value * `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message * `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message.
string field = 1 [json_name = "field"];
- Parameters:
value
- The bytes for field to set.- Returns:
- This builder for chaining.
-
getDescription
A description of why the request element is bad.
string description = 2 [json_name = "description"];
- Specified by:
getDescription
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()A description of why the request element is bad.
string description = 2 [json_name = "description"];
- Specified by:
getDescriptionBytes
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- The bytes for description.
-
setDescription
A description of why the request element is bad.
string description = 2 [json_name = "description"];
- Parameters:
value
- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
A description of why the request element is bad.
string description = 2 [json_name = "description"];
- Returns:
- This builder for chaining.
-
setDescriptionBytes
A description of why the request element is bad.
string description = 2 [json_name = "description"];
- Parameters:
value
- The bytes for description to set.- Returns:
- This builder for chaining.
-
getReason
The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
string reason = 3 [json_name = "reason"];
- Specified by:
getReason
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- The reason.
-
getReasonBytes
public com.google.protobuf.ByteString getReasonBytes()The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
string reason = 3 [json_name = "reason"];
- Specified by:
getReasonBytes
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- The bytes for reason.
-
setReason
The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
string reason = 3 [json_name = "reason"];
- Parameters:
value
- The reason to set.- Returns:
- This builder for chaining.
-
clearReason
The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
string reason = 3 [json_name = "reason"];
- Returns:
- This builder for chaining.
-
setReasonBytes
The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
string reason = 3 [json_name = "reason"];
- Parameters:
value
- The bytes for reason to set.- Returns:
- This builder for chaining.
-
hasLocalizedMessage
public boolean hasLocalizedMessage()Provides a localized error message for field-level errors that is safe to return to the API consumer.
.google.rpc.LocalizedMessage localized_message = 4 [json_name = "localizedMessage"];
- Specified by:
hasLocalizedMessage
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- Whether the localizedMessage field is set.
-
getLocalizedMessage
Provides a localized error message for field-level errors that is safe to return to the API consumer.
.google.rpc.LocalizedMessage localized_message = 4 [json_name = "localizedMessage"];
- Specified by:
getLocalizedMessage
in interfaceBadRequest.FieldViolationOrBuilder
- Returns:
- The localizedMessage.
-
setLocalizedMessage
Provides a localized error message for field-level errors that is safe to return to the API consumer.
.google.rpc.LocalizedMessage localized_message = 4 [json_name = "localizedMessage"];
-
setLocalizedMessage
public BadRequest.FieldViolation.Builder setLocalizedMessage(LocalizedMessage.Builder builderForValue) Provides a localized error message for field-level errors that is safe to return to the API consumer.
.google.rpc.LocalizedMessage localized_message = 4 [json_name = "localizedMessage"];
-
mergeLocalizedMessage
Provides a localized error message for field-level errors that is safe to return to the API consumer.
.google.rpc.LocalizedMessage localized_message = 4 [json_name = "localizedMessage"];
-
clearLocalizedMessage
Provides a localized error message for field-level errors that is safe to return to the API consumer.
.google.rpc.LocalizedMessage localized_message = 4 [json_name = "localizedMessage"];
-