annotations

package
v0.0.0-...-e9290dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FieldBehavior_name = map[int32]string{
		0: "FIELD_BEHAVIOR_UNSPECIFIED",
		1: "OPTIONAL",
		2: "REQUIRED",
		3: "OUTPUT_ONLY",
		4: "INPUT_ONLY",
		5: "IMMUTABLE",
		6: "UNORDERED_LIST",
		7: "NON_EMPTY_DEFAULT",
	}
	FieldBehavior_value = map[string]int32{
		"FIELD_BEHAVIOR_UNSPECIFIED": 0,
		"OPTIONAL":                   1,
		"REQUIRED":                   2,
		"OUTPUT_ONLY":                3,
		"INPUT_ONLY":                 4,
		"IMMUTABLE":                  5,
		"UNORDERED_LIST":             6,
		"NON_EMPTY_DEFAULT":          7,
	}
)

Enum value maps for FieldBehavior.

View Source
var (
	// A designation of a specific field behavior (required, output only, etc.)
	// in protobuf messages.
	//
	// Examples:
	//
	//   string name = 1 [(google.api.field_behavior) = REQUIRED];
	//   State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
	//   google.protobuf.Duration ttl = 1
	//     [(google.api.field_behavior) = INPUT_ONLY];
	//   google.protobuf.Timestamp expire_time = 1
	//     [(google.api.field_behavior) = OUTPUT_ONLY,
	//      (google.api.field_behavior) = IMMUTABLE];
	//
	// repeated google.api.FieldBehavior field_behavior = 1052;
	E_FieldBehavior = &file_google_api_field_behavior_proto_extTypes[0]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var File_google_api_field_behavior_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type FieldBehavior

type FieldBehavior int32

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.

const (
	// Conventional default for enums. Do not use this.
	FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0
	// Specifically denotes a field as optional.
	// While all fields in protocol buffers are optional, this may be specified
	// for emphasis if appropriate.
	FieldBehavior_OPTIONAL FieldBehavior = 1
	// 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`).
	FieldBehavior_REQUIRED FieldBehavior = 2
	// 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).
	FieldBehavior_OUTPUT_ONLY FieldBehavior = 3
	// Denotes a field as input only.
	// This indicates that the field is provided in requests, and the
	// corresponding field is not included in output.
	FieldBehavior_INPUT_ONLY FieldBehavior = 4
	// 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.
	FieldBehavior_IMMUTABLE FieldBehavior = 5
	// 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.
	FieldBehavior_UNORDERED_LIST FieldBehavior = 6
	// 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.
	FieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7
)

func (FieldBehavior) Descriptor

func (FieldBehavior) Enum

func (x FieldBehavior) Enum() *FieldBehavior

func (FieldBehavior) EnumDescriptor deprecated

func (FieldBehavior) EnumDescriptor() ([]byte, []int)

Deprecated: Use FieldBehavior.Descriptor instead.

func (FieldBehavior) Number

func (FieldBehavior) String

func (x FieldBehavior) String() string

func (FieldBehavior) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL