// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        (unknown)
// source: google/api/field_behavior.proto

package annotations

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	descriptorpb "google.golang.org/protobuf/types/descriptorpb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// 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.
type FieldBehavior int32

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
	// 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.
	FieldBehavior_IDENTIFIER FieldBehavior = 8
)

// Enum value maps for FieldBehavior.
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",
		8: "IDENTIFIER",
	}
	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,
		"IDENTIFIER":                 8,
	}
)

func (x FieldBehavior) Enum() *FieldBehavior {
	p := new(FieldBehavior)
	*p = x
	return p
}

func (x FieldBehavior) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (FieldBehavior) Descriptor() protoreflect.EnumDescriptor {
	return file_google_api_field_behavior_proto_enumTypes[0].Descriptor()
}

func (FieldBehavior) Type() protoreflect.EnumType {
	return &file_google_api_field_behavior_proto_enumTypes[0]
}

func (x FieldBehavior) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use FieldBehavior.Descriptor instead.
func (FieldBehavior) EnumDescriptor() ([]byte, []int) {
	return file_google_api_field_behavior_proto_rawDescGZIP(), []int{0}
}

var file_google_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{
	{
		ExtendedType:  (*descriptorpb.FieldOptions)(nil),
		ExtensionType: ([]FieldBehavior)(nil),
		Field:         1052,
		Name:          "google.api.field_behavior",
		Tag:           "varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior",
		Filename:      "google/api/field_behavior.proto",
	},
}

// Extension fields to descriptorpb.FieldOptions.
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]
)

var File_google_api_field_behavior_proto protoreflect.FileDescriptor

const file_google_api_field_behavior_proto_rawDesc = "" +
	"\n" +
	"\x1fgoogle/api/field_behavior.proto\x12\n" +
	"google.api\x1a google/protobuf/descriptor.proto*\xb6\x01\n" +
	"\rFieldBehavior\x12\x1e\n" +
	"\x1aFIELD_BEHAVIOR_UNSPECIFIED\x10\x00\x12\f\n" +
	"\bOPTIONAL\x10\x01\x12\f\n" +
	"\bREQUIRED\x10\x02\x12\x0f\n" +
	"\vOUTPUT_ONLY\x10\x03\x12\x0e\n" +
	"\n" +
	"INPUT_ONLY\x10\x04\x12\r\n" +
	"\tIMMUTABLE\x10\x05\x12\x12\n" +
	"\x0eUNORDERED_LIST\x10\x06\x12\x15\n" +
	"\x11NON_EMPTY_DEFAULT\x10\a\x12\x0e\n" +
	"\n" +
	"IDENTIFIER\x10\b:d\n" +
	"\x0efield_behavior\x12\x1d.google.protobuf.FieldOptions\x18\x9c\b \x03(\x0e2\x19.google.api.FieldBehaviorB\x02\x10\x00R\rfieldBehaviorB\xb0\x01\n" +
	"\x0ecom.google.apiB\x12FieldBehaviorProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x03GAX\xaa\x02\n" +
	"Google.Api\xca\x02\n" +
	"Google\\Api\xe2\x02\x16Google\\Api\\GPBMetadata\xea\x02\vGoogle::Apib\x06proto3"

var (
	file_google_api_field_behavior_proto_rawDescOnce sync.Once
	file_google_api_field_behavior_proto_rawDescData []byte
)

func file_google_api_field_behavior_proto_rawDescGZIP() []byte {
	file_google_api_field_behavior_proto_rawDescOnce.Do(func() {
		file_google_api_field_behavior_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_api_field_behavior_proto_rawDesc), len(file_google_api_field_behavior_proto_rawDesc)))
	})
	return file_google_api_field_behavior_proto_rawDescData
}

var file_google_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_google_api_field_behavior_proto_goTypes = []any{
	(FieldBehavior)(0),                // 0: google.api.FieldBehavior
	(*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
}
var file_google_api_field_behavior_proto_depIdxs = []int32{
	1, // 0: google.api.field_behavior:extendee -> google.protobuf.FieldOptions
	0, // 1: google.api.field_behavior:type_name -> google.api.FieldBehavior
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	1, // [1:2] is the sub-list for extension type_name
	0, // [0:1] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_google_api_field_behavior_proto_init() }
func file_google_api_field_behavior_proto_init() {
	if File_google_api_field_behavior_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_field_behavior_proto_rawDesc), len(file_google_api_field_behavior_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   0,
			NumExtensions: 1,
			NumServices:   0,
		},
		GoTypes:           file_google_api_field_behavior_proto_goTypes,
		DependencyIndexes: file_google_api_field_behavior_proto_depIdxs,
		EnumInfos:         file_google_api_field_behavior_proto_enumTypes,
		ExtensionInfos:    file_google_api_field_behavior_proto_extTypes,
	}.Build()
	File_google_api_field_behavior_proto = out.File
	file_google_api_field_behavior_proto_goTypes = nil
	file_google_api_field_behavior_proto_depIdxs = nil
}
