Send feedback
Class BadRequest.Types.FieldViolation (2.10.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.10.0 keyboard_arrow_down
public sealed class BadRequest.Types.FieldViolation : IMessage<BadRequest.Types.FieldViolation>, IEquatable<BadRequest.Types.FieldViolation>, IDeepCloneable<BadRequest.Types.FieldViolation>, IBufferMessage, IMessage
A message type used to describe a single bad request field.
Inheritance
object >
BadRequest.Types.FieldViolation
Namespace
Google.Rpc
Assembly
Google.Api.CommonProtos.dll
Constructors
FieldViolation()
FieldViolation(FieldViolation)
public FieldViolation(BadRequest.Types.FieldViolation other)
Fields
DescriptionFieldNumber
public const int DescriptionFieldNumber = 2
Field number for the "description" field.
Field Value
Type
Description
int
FieldFieldNumber
public const int FieldFieldNumber = 1
Field number for the "field" field.
Field Value
Type
Description
int
Properties
Description
public string Description { get; set; }
A description of why the request element is bad.
Property Value
Type
Description
string
Descriptor
public static MessageDescriptor Descriptor { get; }
Field
public string Field { get; set; }
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.
Property Value
Type
Description
string
Parser
public static MessageParser<BadRequest.Types.FieldViolation> Parser { get; }
Methods
CalculateSize()
public int CalculateSize()
Returns
Type
Description
int
Clone()
public BadRequest.Types.FieldViolation Clone()
Equals(FieldViolation)
public bool Equals(BadRequest.Types.FieldViolation other)
Returns
Type
Description
bool
Equals(object)
public override bool Equals(object other)
Parameter
Name
Description
other
object
Returns
Type
Description
bool
Overrides
GetHashCode()
public override int GetHashCode()
Returns
Type
Description
int
Overrides
public void MergeFrom(CodedInputStream input)
MergeFrom(FieldViolation)
public void MergeFrom(BadRequest.Types.FieldViolation other)
ToString()
public override string ToString()
Returns
Type
Description
string
Overrides
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-26 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-26 UTC."],[],[]]