@@ -8,70 +8,11 @@ option java_multiple_files = true;
8
8
option java_outer_classname = "ConfigProtoDesc" ;
9
9
option java_package = "com.google.api.codegen.v2" ;
10
10
11
- // `ConfigProto` specifies the configuration of code generation for
12
- // GAPIC. The user provides it via a YAML file; this message here
13
- // represents the schema for this file.
14
- //
15
- // Example of a YAML configuration:
16
- //
17
- // type: com.google.api.codegen.ConfigProto
18
- // generator:
19
- // id: java
20
- // interfaces:
21
- // - name: google.example.library.v1.LibraryService
22
- // collections:
23
- // - name_pattern: shelves/{shelf}
24
- // entity_name: shelf
25
- // - name_pattern: shelves/{shelf}/books/{book}
26
- // entity_name: book
27
- // ...
28
- // retry_codes_def:
29
- // - name: idempotent
30
- // retry_codes:
31
- // ...
32
- // - name: non_idempotent
33
- // retry_codes:
34
- // retry_params_def:
35
- // - name: default
36
- // ...
37
- // methods:
38
- // - name: PublishBooks
39
- // flattening:
40
- // groups:
41
- // - parameters:
42
- // - name
43
- // - parameters:
44
- // - name
45
- // - version
46
- // page_streaming:
47
- // request:
48
- // token_field: page_token
49
- // response:
50
- // token_field: next_page_token
51
- // resources_field: books
52
- // batching:
53
- // thresholds:
54
- // element_count_threshold: 5
55
- // request_byte_threshold: 16384
56
- // batch_descriptor:
57
- // batched_field: pictures
58
- // request_discriminator_fields:
59
- // - album
60
- // - labels
61
- // subresponse_field: pic_id
62
- // retry_codes_name: idempotent
63
- // retry_params_name: default
64
- // field_name_patterns:
65
- // name: book
66
- // - name: GetBook
67
- // ...
68
- // ...
69
11
message ConfigProto {
70
12
// The settings of generated code in a specific language.
71
13
map <string , LanguageSettingsProto > language_settings = 4 ;
72
14
73
- // The language of the generated code.
74
- string language = 5 ; // UNSUPPORTED.
15
+ reserved 5 , 20 ;
75
16
76
17
// The configuration for the license header to put on generated files.
77
18
LicenseHeaderProto license_header = 7 ;
@@ -96,12 +37,9 @@ message ConfigProto {
96
37
// [DEPRECATED]
97
38
.google.protobuf.BoolValue enable_string_format_functions_override = 22 ;
98
39
99
- // A list of message resource name configurations.
100
- repeated ResourceNameMessageConfigProto resource_name_generation = 20 ;
101
-
102
40
// A required field to specify the version of GAPIC config schema.
103
41
// It is versioned using Semantic Versioning 2.0.0 (semver) and follows the
104
- // semver specification. Currently, the only valid value is "1 .0.0".
42
+ // semver specification. Currently, the only valid value is "2 .0.0".
105
43
string config_schema_version = 21 ;
106
44
}
107
45
@@ -140,8 +78,7 @@ enum ReleaseLevel {
140
78
}
141
79
142
80
message LicenseHeaderProto {
143
- // The file containing the copyright line(s).
144
- string copyright_file = 1 ; // DEPRECATED. The Google copyright will always be used.
81
+ reserved 1 ;
145
82
146
83
// The file containing the raw license header without any copyright line(s).
147
84
string license_file = 2 ;
@@ -187,14 +124,7 @@ message SmokeTestConfigProto {
187
124
}
188
125
189
126
message CollectionConfigProto {
190
- // A pattern to describe the names of the resources of this
191
- // collection, using the platform's conventions for URI patterns. A
192
- // generator may use this to generate methods to compose and
193
- // decompose such names. The pattern should use named placeholders
194
- // as in `shelves/{shelf}/books/{book}`; those will be taken as
195
- // hints for the parameter names of the generated methods. If
196
- // empty, no name methods are generated.
197
- string name_pattern = 1 ;
127
+ reserved 1 ;
198
128
199
129
// Name to be used as a basis for generated methods and classes.
200
130
string entity_name = 2 ;
@@ -235,11 +165,7 @@ message MethodConfigProto {
235
165
// The fully qualified name of the method.
236
166
string name = 1 ;
237
167
238
- // Specifies the configuration for parameter flattening.
239
- FlatteningConfigProto flattening = 2 ;
240
-
241
- // Specifies the configuration for paging.
242
- PageStreamingConfigProto page_streaming = 3 ;
168
+ reserved 2 , 3 , 7 , 8 , 9 , 11 , 14 , 15 ;
243
169
244
170
// Specifies the configuration for gRPC-streaming responses.
245
171
// Note that this is for configuring paged gRPC-streaming responses.
@@ -254,22 +180,9 @@ message MethodConfigProto {
254
180
// The name must be defined in InterfaceConfigProto::retry_params_def.
255
181
string retry_params_name = 5 ;
256
182
257
- // Specifies the default timeout for a non-retrying call. If the call is
258
- // retrying, refer to `retry_params_name` instead.
259
- uint64 timeout_millis = 11 ; // UNSUPPORTED.
260
-
261
183
// Specifies the configuration for batching.
262
184
BatchingConfigProto batching = 6 ;
263
185
264
- reserved 7 ;
265
-
266
- // Fields that are always required for a request to be valid.
267
- repeated string required_fields = 8 ;
268
-
269
- // Maps the field name of the request type to entity_name of CollectionConfigProto.
270
- // It is used to specify the string pattern that the field must follow.
271
- map <string , string > field_name_patterns = 9 ;
272
-
273
186
// Specifies complex structure fields that need to be initialized by the sample code for
274
187
// the sample to be usable.
275
188
repeated string sample_code_init_fields = 10 ;
@@ -296,17 +209,8 @@ message MethodConfigProto {
296
209
// IAM methods to IamPolicy for Pub/Sub.
297
210
string reroute_to_grpc_interface = 12 ;
298
211
299
- // TODO: Remove this config once there are no use cases.
300
- // Specifies the list of the method's input message fields (including nested
301
- // ones, using the dot notation), which should be url-encoded in
302
- // "x-goog-request-params" header
303
- repeated string header_request_params = 14 ; // UNSUPPORTED.
304
-
305
212
repeated SurfaceTreatmentProto surface_treatments = 20 ;
306
213
307
- // Set the resource name treatment for fields
308
- ResourceNameTreatment resource_name_treatment = 15 ;
309
-
310
214
// Long-running settings.
311
215
LongRunningConfigProto long_running = 30 ;
312
216
@@ -461,30 +365,6 @@ message SampleConfiguration {
461
365
repeated SampleTypeConfiguration api_explorer = 3 ;
462
366
}
463
367
464
- // `FlatteningConfigProto` describes the parameter groups for which a
465
- // generator should produce method overloads which allow a client to
466
- // directly pass request message fields as method parameters. This
467
- // information may or may not be used, depending on the target
468
- // language.
469
- message FlatteningConfigProto {
470
- // Specifies a list of flattening groups.
471
- repeated FlatteningGroupProto groups = 1 ;
472
- }
473
-
474
- // `FlatteningGroupProto` represents a list of parameters to be flattened.
475
- message FlatteningGroupProto {
476
- // The list of parameters to include in this flattening group. Each
477
- // parameter must be a field of the request message.
478
- repeated string parameters = 1 ;
479
-
480
- string flattening_group_name = 2 ; // DEPRECATED.
481
-
482
- // Map flattening parameters listed in parameters field to a resource name
483
- // treatment. This is used to override the resource_name_treament setting in
484
- // MethodConfigProto.
485
- map <string , ResourceNameTreatment > parameter_resource_name_treatment = 3 ;
486
- }
487
-
488
368
// The ResourceNameTreatment enum can be used to specify how to treat the
489
369
// resource name formats defined in the field_name_patterns
490
370
// and response_field_name_patterns fields.
@@ -505,24 +385,12 @@ enum ResourceNameTreatment {
505
385
// `PageStreamingConfigProto` describes information for generating a method which
506
386
// transforms a paging list rpc into a stream of resources.
507
387
message PageStreamingConfigProto {
508
- // Specifies request information of the list method.
509
- PageStreamingRequestProto request = 1 ;
388
+ reserved 1 ;
510
389
511
390
// Specifies response information of the list method.
512
391
PageStreamingResponseProto response = 2 ;
513
392
}
514
393
515
- // `PageStreamingRequestProto` defines which fields match the paging pattern in
516
- // the request.
517
- message PageStreamingRequestProto {
518
- // The name of the field in the request containing the page token.
519
- string token_field = 1 ;
520
-
521
- // Optional. The name of the field, if present, specifying the maximum number
522
- // of elements to be returned in the response.
523
- string page_size_field = 2 ;
524
- }
525
-
526
394
// `PageStreamingResponseProto` defines which fields match the paging pattern in
527
395
// the response.
528
396
message PageStreamingResponseProto {
@@ -623,17 +491,6 @@ message BatchingDescriptorProto {
623
491
string subresponse_field = 3 ;
624
492
}
625
493
626
- // `ResourceNameMessageConfigProto` specifies the fields of a message that
627
- // support a resource name type.
628
- message ResourceNameMessageConfigProto {
629
- // The simple name of the message.
630
- string message_name = 1 ;
631
-
632
- // A list of field simple names and corresponding entity names, as defined in
633
- // the collection configs.
634
- map <string , string > field_entity_map = 2 ;
635
- }
636
-
637
494
// SurfaceTreatmentProto describes treatments to the code generation
638
495
// that are expected to be different for each language.
639
496
message SurfaceTreatmentProto {
@@ -658,12 +515,7 @@ enum VisibilityProto {
658
515
// LongRunningProto describes settings to use when generating API methods
659
516
// that use the long-running operation pattern.
660
517
message LongRunningConfigProto {
661
- // The fully-qualified type that is returned from an Operation when it is
662
- // complete.
663
- string return_type = 1 ;
664
-
665
- // The fully-qualified type of the metadata of an Operation.
666
- string metadata_type = 2 ;
518
+ reserved 1 , 2 ;
667
519
668
520
// Whether or not the server implements delete.
669
521
bool implements_delete = 3 ;
0 commit comments