An indicator of the behavior of a given field (for example, that a field
is required in requests, or given as output but ignored as input).
This does not change the behavior in protocol buffers itself; it only
denotes the behavior and may affect how API tooling handles the field.
Note: This enum may receive new values in the future.
Denotes that the field in a resource (a message annotated with
google.api.resource) is used in the resource name to uniquely identify the
resource. For AIP-compliant APIs, this should only be applied to the
name field on the resource.
This behavior should not be applied to references to other resources within
the message.
The identifier field of resources often have different field behavior
depending on the request it is embedded in (e.g. for Create methods name
is optional and unused, while for Update methods it is required). Instead
of method-specific annotations, only IDENTIFIER is required.
IDENTIFIER = 8;
IDENTIFIER_VALUE
Denotes that the field in a resource (a message annotated with
google.api.resource) is used in the resource name to uniquely identify the
resource. For AIP-compliant APIs, this should only be applied to the
name field on the resource.
This behavior should not be applied to references to other resources within
the message.
The identifier field of resources often have different field behavior
depending on the request it is embedded in (e.g. for Create methods name
is optional and unused, while for Update methods it is required). Instead
of method-specific annotations, only IDENTIFIER is required.
IDENTIFIER = 8;
IMMUTABLE
Denotes a field as immutable.
This indicates that the field may be set once in a request to create a
resource, but may not be changed thereafter.
IMMUTABLE = 5;
IMMUTABLE_VALUE
Denotes a field as immutable.
This indicates that the field may be set once in a request to create a
resource, but may not be changed thereafter.
IMMUTABLE = 5;
INPUT_ONLY
Denotes a field as input only.
This indicates that the field is provided in requests, and the
corresponding field is not included in output.
INPUT_ONLY = 4;
INPUT_ONLY_VALUE
Denotes a field as input only.
This indicates that the field is provided in requests, and the
corresponding field is not included in output.
INPUT_ONLY = 4;
NON_EMPTY_DEFAULT
Denotes that this field returns a non-empty default value if not set.
This indicates that if the user provides the empty value in a request,
a non-empty value will be returned. The user will not be aware of what
non-empty value to expect.
NON_EMPTY_DEFAULT = 7;
NON_EMPTY_DEFAULT_VALUE
Denotes that this field returns a non-empty default value if not set.
This indicates that if the user provides the empty value in a request,
a non-empty value will be returned. The user will not be aware of what
non-empty value to expect.
NON_EMPTY_DEFAULT = 7;
OPTIONAL
Specifically denotes a field as optional.
While all fields in protocol buffers are optional, this may be specified
for emphasis if appropriate.
OPTIONAL = 1;
OPTIONAL_VALUE
Specifically denotes a field as optional.
While all fields in protocol buffers are optional, this may be specified
for emphasis if appropriate.
OPTIONAL = 1;
OUTPUT_ONLY
Denotes a field as output only.
This indicates that the field is provided in responses, but including the
field in a request does nothing (the server must ignore it and
must not throw an error as a result of the field's presence).
OUTPUT_ONLY = 3;
OUTPUT_ONLY_VALUE
Denotes a field as output only.
This indicates that the field is provided in responses, but including the
field in a request does nothing (the server must ignore it and
must not throw an error as a result of the field's presence).
OUTPUT_ONLY = 3;
REQUIRED
Denotes a field as required.
This indicates that the field must be provided as part of the request,
and failure to do so will cause an error (usually INVALID_ARGUMENT).
REQUIRED = 2;
REQUIRED_VALUE
Denotes a field as required.
This indicates that the field must be provided as part of the request,
and failure to do so will cause an error (usually INVALID_ARGUMENT).
REQUIRED = 2;
UNORDERED_LIST
Denotes that a (repeated) field is an unordered list.
This indicates that the service may provide the elements of the list
in any arbitrary order, rather than the order the user originally
provided. Additionally, the list's order may or may not be stable.
UNORDERED_LIST = 6;
UNORDERED_LIST_VALUE
Denotes that a (repeated) field is an unordered list.
This indicates that the service may provide the elements of the list
in any arbitrary order, rather than the order the user originally
provided. Additionally, the list's order may or may not be stable.
[[["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 2025-08-28 UTC."],[],[],null,["# Enum FieldBehavior (2.60.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.60.0 (latest)](/java/docs/reference/proto-google-common-protos/latest/com.google.api.FieldBehavior)\n- [2.59.2](/java/docs/reference/proto-google-common-protos/2.59.2/com.google.api.FieldBehavior)\n- [2.58.0](/java/docs/reference/proto-google-common-protos/2.58.0/com.google.api.FieldBehavior)\n- [2.57.0](/java/docs/reference/proto-google-common-protos/2.57.0/com.google.api.FieldBehavior)\n- [2.56.0](/java/docs/reference/proto-google-common-protos/2.56.0/com.google.api.FieldBehavior)\n- [2.54.1](/java/docs/reference/proto-google-common-protos/2.54.1/com.google.api.FieldBehavior)\n- [2.53.0](/java/docs/reference/proto-google-common-protos/2.53.0/com.google.api.FieldBehavior)\n- [2.52.0](/java/docs/reference/proto-google-common-protos/2.52.0/com.google.api.FieldBehavior)\n- [2.51.0](/java/docs/reference/proto-google-common-protos/2.51.0/com.google.api.FieldBehavior)\n- [2.50.1](/java/docs/reference/proto-google-common-protos/2.50.1/com.google.api.FieldBehavior)\n- [2.49.0](/java/docs/reference/proto-google-common-protos/2.49.0/com.google.api.FieldBehavior)\n- [2.48.0](/java/docs/reference/proto-google-common-protos/2.48.0/com.google.api.FieldBehavior)\n- [2.46.0](/java/docs/reference/proto-google-common-protos/2.46.0/com.google.api.FieldBehavior)\n- [2.45.1](/java/docs/reference/proto-google-common-protos/2.45.1/com.google.api.FieldBehavior)\n- [2.44.0](/java/docs/reference/proto-google-common-protos/2.44.0/com.google.api.FieldBehavior)\n- [2.43.0](/java/docs/reference/proto-google-common-protos/2.43.0/com.google.api.FieldBehavior)\n- [2.42.0](/java/docs/reference/proto-google-common-protos/2.42.0/com.google.api.FieldBehavior)\n- [2.41.0](/java/docs/reference/proto-google-common-protos/2.41.0/com.google.api.FieldBehavior)\n- [2.40.0](/java/docs/reference/proto-google-common-protos/2.40.0/com.google.api.FieldBehavior)\n- [2.39.1](/java/docs/reference/proto-google-common-protos/2.39.1/com.google.api.FieldBehavior)\n- [2.38.0](/java/docs/reference/proto-google-common-protos/2.38.0/com.google.api.FieldBehavior)\n- [2.37.1](/java/docs/reference/proto-google-common-protos/2.37.1/com.google.api.FieldBehavior)\n- [2.36.0](/java/docs/reference/proto-google-common-protos/2.36.0/com.google.api.FieldBehavior)\n- [2.34.0](/java/docs/reference/proto-google-common-protos/2.34.0/com.google.api.FieldBehavior)\n- [2.33.0](/java/docs/reference/proto-google-common-protos/2.33.0/com.google.api.FieldBehavior)\n- [2.32.0](/java/docs/reference/proto-google-common-protos/2.32.0/com.google.api.FieldBehavior)\n- [2.30.0](/java/docs/reference/proto-google-common-protos/2.30.0/com.google.api.FieldBehavior)\n- [2.29.0](/java/docs/reference/proto-google-common-protos/2.29.0/com.google.api.FieldBehavior)\n- [2.28.0](/java/docs/reference/proto-google-common-protos/2.28.0/com.google.api.FieldBehavior)\n- [2.27.0](/java/docs/reference/proto-google-common-protos/2.27.0/com.google.api.FieldBehavior)\n- [2.26.0](/java/docs/reference/proto-google-common-protos/2.26.0/com.google.api.FieldBehavior)\n- [2.25.1](/java/docs/reference/proto-google-common-protos/2.25.1/com.google.api.FieldBehavior)\n- [2.24.0](/java/docs/reference/proto-google-common-protos/2.24.0/com.google.api.FieldBehavior)\n- [2.23.1](/java/docs/reference/proto-google-common-protos/2.23.1/com.google.api.FieldBehavior)\n- [2.22.1](/java/docs/reference/proto-google-common-protos/2.22.1/com.google.api.FieldBehavior)\n- [2.21.1](/java/docs/reference/proto-google-common-protos/2.21.1/com.google.api.FieldBehavior)\n- [2.15.0](/java/docs/reference/proto-google-common-protos/2.15.0/com.google.api.FieldBehavior)\n- [2.14.3](/java/docs/reference/proto-google-common-protos/2.14.3/com.google.api.FieldBehavior)\n- [2.13.0](/java/docs/reference/proto-google-common-protos/2.13.0/com.google.api.FieldBehavior)\n- [2.12.0](/java/docs/reference/proto-google-common-protos/2.12.0/com.google.api.FieldBehavior)\n- [2.11.0](/java/docs/reference/proto-google-common-protos/2.11.0/com.google.api.FieldBehavior)\n- [2.10.0](/java/docs/reference/proto-google-common-protos/2.10.0/com.google.api.FieldBehavior)\n- [2.9.6](/java/docs/reference/proto-google-common-protos/2.9.6/com.google.api.FieldBehavior)\n- [2.8.4](/java/docs/reference/proto-google-common-protos/2.8.4/com.google.api.FieldBehavior)\n- [2.7.4](/java/docs/reference/proto-google-common-protos/2.7.4/com.google.api.FieldBehavior) \n\n public enum FieldBehavior extends Enum\u003cFieldBehavior\u003e implements ProtocolMessageEnum\n\nAn indicator of the behavior of a given field (for example, that a field\nis required in requests, or given as output but ignored as input).\nThis **does not** change the behavior in protocol buffers itself; it only\ndenotes the behavior and may affect how API tooling handles the field.\n\nNote: This enum **may** receive new values in the future.\n\nProtobuf enum `google.api.FieldBehavior` \n\nImplements\n----------\n\n[ProtocolMessageEnum](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolMessageEnum.html) \n\nInherited Members\n-----------------\n\n[Enum.\\\u003cT\\\u003evalueOf(Class\\\u003cT\\\u003e,String)](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#valueOf-java.lang.Class-java.lang.String-) \n[Enum.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#clone--) \n[Enum.compareTo(E)](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#compareTo-E-) \n[Enum.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#equals-java.lang.Object-) \n[Enum.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#finalize--) \n[Enum.getDeclaringClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#getDeclaringClass--) \n[Enum.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#hashCode--) \n[Enum.name()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#name--) \n[Enum.ordinal()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#ordinal--) \n[Enum.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#toString--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)"]]