blob: 164e0df0bf597be76c7fb7f158f2af54d491ffbd [file] [log] [blame]
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +00001// Copyright 2018 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Don Newton98fd8812019-09-23 15:15:02 -040015// Code generated by protoc-gen-go. DO NOT EDIT.
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000016// versions:
17// protoc-gen-go v1.27.1
18// protoc v3.12.2
Don Newton98fd8812019-09-23 15:15:02 -040019// source: google/api/field_behavior.proto
20
21package annotations
22
23import (
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000024 reflect "reflect"
25 sync "sync"
Don Newton98fd8812019-09-23 15:15:02 -040026
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000027 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
28 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
29 descriptorpb "google.golang.org/protobuf/types/descriptorpb"
Don Newton98fd8812019-09-23 15:15:02 -040030)
31
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000032const (
33 // Verify that this generated code is sufficiently up-to-date.
34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35 // Verify that runtime/protoimpl is sufficiently up-to-date.
36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37)
Don Newton98fd8812019-09-23 15:15:02 -040038
39// An indicator of the behavior of a given field (for example, that a field
40// is required in requests, or given as output but ignored as input).
41// This **does not** change the behavior in protocol buffers itself; it only
42// denotes the behavior and may affect how API tooling handles the field.
43//
44// Note: This enum **may** receive new values in the future.
45type FieldBehavior int32
46
47const (
48 // Conventional default for enums. Do not use this.
49 FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0
50 // Specifically denotes a field as optional.
51 // While all fields in protocol buffers are optional, this may be specified
52 // for emphasis if appropriate.
53 FieldBehavior_OPTIONAL FieldBehavior = 1
54 // Denotes a field as required.
55 // This indicates that the field **must** be provided as part of the request,
56 // and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
57 FieldBehavior_REQUIRED FieldBehavior = 2
58 // Denotes a field as output only.
59 // This indicates that the field is provided in responses, but including the
60 // field in a request does nothing (the server *must* ignore it and
61 // *must not* throw an error as a result of the field's presence).
62 FieldBehavior_OUTPUT_ONLY FieldBehavior = 3
63 // Denotes a field as input only.
64 // This indicates that the field is provided in requests, and the
65 // corresponding field is not included in output.
66 FieldBehavior_INPUT_ONLY FieldBehavior = 4
67 // Denotes a field as immutable.
68 // This indicates that the field may be set once in a request to create a
69 // resource, but may not be changed thereafter.
70 FieldBehavior_IMMUTABLE FieldBehavior = 5
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000071 // Denotes that a (repeated) field is an unordered list.
72 // This indicates that the service may provide the elements of the list
73 // in any arbitrary order, rather than the order the user originally
74 // provided. Additionally, the list's order may or may not be stable.
75 FieldBehavior_UNORDERED_LIST FieldBehavior = 6
76 // Denotes that this field returns a non-empty default value if not set.
77 // This indicates that if the user provides the empty value in a request,
78 // a non-empty value will be returned. The user will not be aware of what
79 // non-empty value to expect.
80 FieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7
Don Newton98fd8812019-09-23 15:15:02 -040081)
82
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000083// Enum value maps for FieldBehavior.
84var (
85 FieldBehavior_name = map[int32]string{
86 0: "FIELD_BEHAVIOR_UNSPECIFIED",
87 1: "OPTIONAL",
88 2: "REQUIRED",
89 3: "OUTPUT_ONLY",
90 4: "INPUT_ONLY",
91 5: "IMMUTABLE",
92 6: "UNORDERED_LIST",
93 7: "NON_EMPTY_DEFAULT",
94 }
95 FieldBehavior_value = map[string]int32{
96 "FIELD_BEHAVIOR_UNSPECIFIED": 0,
97 "OPTIONAL": 1,
98 "REQUIRED": 2,
99 "OUTPUT_ONLY": 3,
100 "INPUT_ONLY": 4,
101 "IMMUTABLE": 5,
102 "UNORDERED_LIST": 6,
103 "NON_EMPTY_DEFAULT": 7,
104 }
105)
Don Newton98fd8812019-09-23 15:15:02 -0400106
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000107func (x FieldBehavior) Enum() *FieldBehavior {
108 p := new(FieldBehavior)
109 *p = x
110 return p
Don Newton98fd8812019-09-23 15:15:02 -0400111}
112
113func (x FieldBehavior) String() string {
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000114 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
Don Newton98fd8812019-09-23 15:15:02 -0400115}
116
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000117func (FieldBehavior) Descriptor() protoreflect.EnumDescriptor {
118 return file_google_api_field_behavior_proto_enumTypes[0].Descriptor()
119}
120
121func (FieldBehavior) Type() protoreflect.EnumType {
122 return &file_google_api_field_behavior_proto_enumTypes[0]
123}
124
125func (x FieldBehavior) Number() protoreflect.EnumNumber {
126 return protoreflect.EnumNumber(x)
127}
128
129// Deprecated: Use FieldBehavior.Descriptor instead.
Don Newton98fd8812019-09-23 15:15:02 -0400130func (FieldBehavior) EnumDescriptor() ([]byte, []int) {
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000131 return file_google_api_field_behavior_proto_rawDescGZIP(), []int{0}
Don Newton98fd8812019-09-23 15:15:02 -0400132}
133
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000134var file_google_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{
135 {
136 ExtendedType: (*descriptorpb.FieldOptions)(nil),
137 ExtensionType: ([]FieldBehavior)(nil),
138 Field: 1052,
139 Name: "google.api.field_behavior",
140 Tag: "varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior",
141 Filename: "google/api/field_behavior.proto",
142 },
Don Newton98fd8812019-09-23 15:15:02 -0400143}
144
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000145// Extension fields to descriptorpb.FieldOptions.
146var (
147 // A designation of a specific field behavior (required, output only, etc.)
148 // in protobuf messages.
149 //
150 // Examples:
151 //
152 // string name = 1 [(google.api.field_behavior) = REQUIRED];
153 // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
154 // google.protobuf.Duration ttl = 1
155 // [(google.api.field_behavior) = INPUT_ONLY];
156 // google.protobuf.Timestamp expire_time = 1
157 // [(google.api.field_behavior) = OUTPUT_ONLY,
158 // (google.api.field_behavior) = IMMUTABLE];
159 //
160 // repeated google.api.FieldBehavior field_behavior = 1052;
161 E_FieldBehavior = &file_google_api_field_behavior_proto_extTypes[0]
162)
163
164var File_google_api_field_behavior_proto protoreflect.FileDescriptor
165
166var file_google_api_field_behavior_proto_rawDesc = []byte{
167 0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,
168 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
169 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67,
170 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64,
171 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a,
172 0xa6, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f,
173 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x42, 0x45, 0x48, 0x41, 0x56,
174 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
175 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12,
176 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a,
177 0x0b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e,
178 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d,
179 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a,
180 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10,
181 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44,
182 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x07, 0x3a, 0x60, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c,
183 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f,
184 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65,
185 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28, 0x0e,
186 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69,
187 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x0d, 0x66, 0x69, 0x65,
188 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70, 0x0a, 0x0e, 0x63, 0x6f,
189 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x46, 0x69,
190 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f,
191 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e,
192 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
193 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,
194 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
195 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72,
196 0x6f, 0x74, 0x6f, 0x33,
Don Newton98fd8812019-09-23 15:15:02 -0400197}
198
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000199var (
200 file_google_api_field_behavior_proto_rawDescOnce sync.Once
201 file_google_api_field_behavior_proto_rawDescData = file_google_api_field_behavior_proto_rawDesc
202)
Don Newton98fd8812019-09-23 15:15:02 -0400203
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +0000204func file_google_api_field_behavior_proto_rawDescGZIP() []byte {
205 file_google_api_field_behavior_proto_rawDescOnce.Do(func() {
206 file_google_api_field_behavior_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_behavior_proto_rawDescData)
207 })
208 return file_google_api_field_behavior_proto_rawDescData
209}
210
211var file_google_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
212var file_google_api_field_behavior_proto_goTypes = []interface{}{
213 (FieldBehavior)(0), // 0: google.api.FieldBehavior
214 (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
215}
216var file_google_api_field_behavior_proto_depIdxs = []int32{
217 1, // 0: google.api.field_behavior:extendee -> google.protobuf.FieldOptions
218 0, // 1: google.api.field_behavior:type_name -> google.api.FieldBehavior
219 2, // [2:2] is the sub-list for method output_type
220 2, // [2:2] is the sub-list for method input_type
221 1, // [1:2] is the sub-list for extension type_name
222 0, // [0:1] is the sub-list for extension extendee
223 0, // [0:0] is the sub-list for field type_name
224}
225
226func init() { file_google_api_field_behavior_proto_init() }
227func file_google_api_field_behavior_proto_init() {
228 if File_google_api_field_behavior_proto != nil {
229 return
230 }
231 type x struct{}
232 out := protoimpl.TypeBuilder{
233 File: protoimpl.DescBuilder{
234 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
235 RawDescriptor: file_google_api_field_behavior_proto_rawDesc,
236 NumEnums: 1,
237 NumMessages: 0,
238 NumExtensions: 1,
239 NumServices: 0,
240 },
241 GoTypes: file_google_api_field_behavior_proto_goTypes,
242 DependencyIndexes: file_google_api_field_behavior_proto_depIdxs,
243 EnumInfos: file_google_api_field_behavior_proto_enumTypes,
244 ExtensionInfos: file_google_api_field_behavior_proto_extTypes,
245 }.Build()
246 File_google_api_field_behavior_proto = out.File
247 file_google_api_field_behavior_proto_rawDesc = nil
248 file_google_api_field_behavior_proto_goTypes = nil
249 file_google_api_field_behavior_proto_depIdxs = nil
Don Newton98fd8812019-09-23 15:15:02 -0400250}