gapic-generator 0.9.1 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +57 -0
- data/lib/gapic/generator/version.rb +1 -1
- data/lib/gapic/generators/default_generator.rb +3 -1
- data/lib/gapic/generators/default_generator_parameters.rb +6 -2
- data/lib/gapic/grpc_service_config/{service_config.rb → config.rb} +2 -2
- data/lib/gapic/grpc_service_config/parser.rb +8 -8
- data/lib/gapic/model/method/http_annotation.rb +123 -0
- data/lib/gapic/model/method/lro.rb +160 -0
- data/lib/gapic/model/method/routing.rb +263 -0
- data/lib/gapic/model/mixins.rb +181 -0
- data/lib/gapic/model/model_error.rb +26 -0
- data/lib/gapic/model/service/nonstandard_lro_provider.rb +293 -0
- data/lib/gapic/model.rb +22 -0
- data/lib/gapic/path_pattern/pattern.rb +46 -0
- data/lib/gapic/path_pattern/segment.rb +97 -9
- data/lib/gapic/presenters/gem_presenter.rb +46 -3
- data/lib/gapic/presenters/{service_config_presenter.rb → grpc_service_config_presenter.rb} +1 -1
- data/lib/gapic/presenters/method/rest_pagination_info.rb +246 -0
- data/lib/gapic/presenters/method_presenter.rb +56 -5
- data/lib/gapic/presenters/method_rest_presenter.rb +99 -48
- data/lib/gapic/presenters/resource_presenter.rb +8 -0
- data/lib/gapic/presenters/service/lro_client_presenter.rb +90 -0
- data/lib/gapic/presenters/service_presenter.rb +236 -3
- data/lib/gapic/presenters/service_rest_presenter.rb +117 -10
- data/lib/gapic/presenters/snippet_presenter.rb +2 -1
- data/lib/gapic/presenters.rb +3 -1
- data/lib/gapic/schema/api.rb +61 -2
- data/lib/gapic/schema/loader.rb +4 -1
- data/lib/gapic/schema/service_config_parser.rb +118 -0
- data/lib/gapic/schema/wrappers.rb +149 -0
- data/lib/google/api/auth.pb.rb +75 -0
- data/lib/google/api/backend.pb.rb +59 -0
- data/lib/google/api/billing.pb.rb +53 -0
- data/lib/google/api/context.pb.rb +47 -0
- data/lib/google/api/control.pb.rb +38 -0
- data/lib/google/api/documentation.pb.rb +56 -0
- data/lib/google/api/endpoint.pb.rb +42 -0
- data/lib/google/api/label.pb.rb +49 -0
- data/lib/google/api/launch_stage.pb.rb +37 -0
- data/lib/google/api/log.pb.rb +47 -0
- data/lib/google/api/logging.pb.rb +48 -0
- data/lib/google/api/metric.pb.rb +90 -0
- data/lib/google/api/monitored_resource.pb.rb +68 -0
- data/lib/google/api/monitoring.pb.rb +48 -0
- data/lib/google/api/quota.pb.rb +63 -0
- data/lib/google/api/routing.pb.rb +58 -0
- data/lib/google/api/service.pb.rb +90 -0
- data/lib/google/api/source_info.pb.rb +44 -0
- data/lib/google/api/system_parameter.pb.rb +51 -0
- data/lib/google/api/usage.pb.rb +47 -0
- data/lib/google/cloud/extended_operations.pb.rb +57 -0
- data/lib/google/protobuf/any.pb.rb +1 -1
- data/lib/google/protobuf/api.pb.rb +69 -0
- data/lib/google/protobuf/descriptor.pb.rb +1 -1
- data/lib/google/protobuf/duration.pb.rb +41 -0
- data/lib/google/protobuf/source_context.pb.rb +39 -0
- data/lib/google/protobuf/struct.pb.rb +65 -0
- data/lib/google/protobuf/type.pb.rb +128 -0
- data/lib/google/protobuf/wrappers.pb.rb +80 -0
- data/templates/default/gem/yardopts.erb +1 -1
- data/templates/default/lib/_package.erb +4 -0
- data/templates/default/lib/_service.erb +6 -0
- data/templates/default/lib/rest/_rest.erb +0 -2
- data/templates/default/service/client/_client.erb +37 -27
- data/templates/default/service/client/_config.erb +13 -14
- data/templates/default/service/client/_nonstandard_lro.erb +57 -0
- data/templates/default/service/client/_paths.erb +1 -1
- data/templates/default/service/client/_self_configure_defaults.erb +2 -2
- data/templates/default/service/client/method/_def.erb +2 -0
- data/templates/default/service/client/method/def/_options_defaults.erb +4 -9
- data/templates/default/service/client/method/def/_response.erb +2 -0
- data/templates/default/service/client/method/def/_response_nonstandard_lro.erb +23 -0
- data/templates/default/service/client/method/def/_routing_params.erb +36 -0
- data/templates/default/service/client/method/docs/_deprecated.erb +5 -0
- data/templates/default/service/client/method/docs/_snippets.erb +6 -0
- data/templates/default/service/nonstandard_lro.erb +6 -0
- data/templates/default/service/rest/client/_client.erb +45 -27
- data/templates/default/service/rest/client/_config.erb +48 -0
- data/templates/default/service/rest/client/method/_def.erb +1 -1
- data/templates/default/service/rest/client/method/def/_options_defaults.erb +5 -2
- data/templates/default/service/rest/client/method/def/_response.erb +8 -0
- data/templates/default/service/rest/client/method/def/_response_nonstandard_lro.erb +23 -0
- data/templates/default/service/rest/client/method/def/_response_normal.erb +4 -15
- data/templates/default/service/rest/client/method/def/_response_paged.erb +7 -0
- data/templates/default/service/rest/client/method/docs/_result.erb +3 -3
- data/templates/default/service/rest/service_stub/_service_stub.erb +25 -0
- data/templates/default/service/rest/{grpc_transcoding/method → service_stub/grpc_transcoding_method}/_def.erb +4 -1
- data/templates/default/service/rest/{grpc_transcoding/method → service_stub/grpc_transcoding_method}/def/_query_string_param.erb +0 -0
- data/templates/default/service/rest/service_stub/method/_def.erb +20 -0
- data/templates/default/service/rest/service_stub/method/def/_request.erb +2 -0
- data/templates/default/service/rest/service_stub/method/def/_response.erb +17 -0
- data/templates/default/service/rest/service_stub.erb +6 -0
- data/templates/default/service/rest/test/client.erb +1 -1
- data/templates/default/service/test/client_paths.erb +1 -1
- data/templates/default/service/test/method/_assert_response.erb +3 -0
- metadata +74 -11
- data/templates/default/service/rest/client/_requires.erb +0 -1
- data/templates/default/service/rest/grpc_transcoding/_grpc_transcoding.erb +0 -9
@@ -0,0 +1,118 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require "yaml"
|
18
|
+
require "google/api/service.pb"
|
19
|
+
|
20
|
+
module Gapic
|
21
|
+
module Schema
|
22
|
+
# Contains logic for parsing a subset of service.yaml used
|
23
|
+
# for the service generation
|
24
|
+
module ServiceConfigParser
|
25
|
+
class << self
|
26
|
+
CONFIG_VERSION_KEY = "config_version"
|
27
|
+
NAME_KEY = "name"
|
28
|
+
VERSION_KEY = "version"
|
29
|
+
ID_KEY = "id"
|
30
|
+
TITLE_KEY = "title"
|
31
|
+
APIS_KEY = "apis"
|
32
|
+
HTTP_KEY = "http"
|
33
|
+
HTTP_RULES_KEY = "rules"
|
34
|
+
HTTP_RULES_SELECTOR_KEY = "selector"
|
35
|
+
HTTP_RULES_VERBS_ALLOWED = ["get", "post", "put", "patch", "delete"].freeze
|
36
|
+
HTTP_RULES_BODY_KEY = "body"
|
37
|
+
HTTP_RULES_ADDITIONAL_BINDINGS_KEY = "additional_bindings"
|
38
|
+
|
39
|
+
##
|
40
|
+
# Returns the parsed Google::Api::Service object.
|
41
|
+
# Only supports a limited subset of fields.
|
42
|
+
#
|
43
|
+
# @return [::Google::Api::Service]
|
44
|
+
#
|
45
|
+
def parse_service_yaml service_yaml_text
|
46
|
+
return nil unless service_yaml_text && !service_yaml_text.empty?
|
47
|
+
service_yaml = YAML.safe_load service_yaml_text
|
48
|
+
service = Google::Api::Service.new
|
49
|
+
|
50
|
+
if service_yaml.key? CONFIG_VERSION_KEY
|
51
|
+
config_ver = Google::Protobuf::UInt32Value.new
|
52
|
+
config_ver.value = service_yaml[CONFIG_VERSION_KEY]
|
53
|
+
service.config_version = config_ver
|
54
|
+
end
|
55
|
+
|
56
|
+
service.name = service_yaml[NAME_KEY] if service_yaml.key? NAME_KEY
|
57
|
+
service.id = service_yaml[ID_KEY] if service_yaml.key? ID_KEY
|
58
|
+
service.title = service_yaml[TITLE_KEY] if service_yaml.key? TITLE_KEY
|
59
|
+
|
60
|
+
service.apis = parse_apis service_yaml[APIS_KEY] if service_yaml.key? APIS_KEY
|
61
|
+
service.http = parse_http service_yaml[HTTP_KEY] if service_yaml.key? HTTP_KEY
|
62
|
+
service
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
# Parses the Apis section of the service yaml
|
68
|
+
# @return [Enumerable<::Google::Protobuf::Api>]
|
69
|
+
def parse_apis apis_yaml
|
70
|
+
apis_yaml.map { |api_yaml| parse_api api_yaml }
|
71
|
+
end
|
72
|
+
|
73
|
+
# Parses a single Api from yaml
|
74
|
+
# only supports a limited amount of fields
|
75
|
+
# @return [::Google::Protobuf::Api]
|
76
|
+
def parse_api api_yaml
|
77
|
+
api = ::Google::Protobuf::Api.new
|
78
|
+
api.name = api_yaml[NAME_KEY] if api_yaml.key? NAME_KEY
|
79
|
+
api.version = api_yaml[VERSION_KEY] if api_yaml.key? VERSION_KEY
|
80
|
+
api
|
81
|
+
end
|
82
|
+
|
83
|
+
# Parses a http section of the service yaml
|
84
|
+
# only supports a limited amount of fields
|
85
|
+
# @return [::Google::Api::Http]
|
86
|
+
def parse_http http_yaml
|
87
|
+
http = Google::Api::Http.new
|
88
|
+
|
89
|
+
if http_yaml.key? HTTP_RULES_KEY
|
90
|
+
http.rules = http_yaml[HTTP_RULES_KEY].map { |rule_yaml| parse_http_rule rule_yaml }
|
91
|
+
end
|
92
|
+
|
93
|
+
http
|
94
|
+
end
|
95
|
+
|
96
|
+
# Parses a single Http rule from yaml
|
97
|
+
# only supports a limited amount of fields
|
98
|
+
# NB: this method is recursive when parsing additional_bindings field
|
99
|
+
# @return [::Google::Api::HttpRule]
|
100
|
+
def parse_http_rule rule_yaml
|
101
|
+
rule = Google::Api::HttpRule.new
|
102
|
+
rule.selector = rule_yaml[HTTP_RULES_SELECTOR_KEY] if rule_yaml.key? HTTP_RULES_SELECTOR_KEY
|
103
|
+
verb_path = HTTP_RULES_VERBS_ALLOWED.find { |verb| rule_yaml[verb] }
|
104
|
+
rule.send "#{verb_path}=", rule_yaml[verb_path] if verb_path
|
105
|
+
rule.body = rule_yaml[HTTP_RULES_BODY_KEY] if rule_yaml.key? HTTP_RULES_BODY_KEY
|
106
|
+
|
107
|
+
if rule_yaml.key? HTTP_RULES_ADDITIONAL_BINDINGS_KEY
|
108
|
+
rule.additional_bindings = rule_yaml[HTTP_RULES_ADDITIONAL_BINDINGS_KEY].map do |binding_yaml|
|
109
|
+
parse_http_rule binding_yaml
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
rule
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -268,6 +268,12 @@ module Gapic
|
|
268
268
|
parent.ruby_package
|
269
269
|
end
|
270
270
|
|
271
|
+
# @return [Boolean] True if this service is marked as deprecated, false
|
272
|
+
# otherwise.
|
273
|
+
def is_deprecated?
|
274
|
+
options[:deprecated] if options
|
275
|
+
end
|
276
|
+
|
271
277
|
# @return [Array<Google::Api::ResourceDescriptor>] A representation of the resource.
|
272
278
|
# This is generally intended to be attached to the "name" field.
|
273
279
|
# See `google/api/resource.proto`.
|
@@ -277,6 +283,15 @@ module Gapic
|
|
277
283
|
@resources ||= Gapic::ResourceLookup.for_service self
|
278
284
|
end
|
279
285
|
|
286
|
+
# @return [String] The full name for this service
|
287
|
+
# (e.g. `google.example.Service`).
|
288
|
+
# Useful when matching against other pieces of information
|
289
|
+
# which also reference full proto name, e.g. Service Config
|
290
|
+
# or Grpc Service Config
|
291
|
+
def full_name
|
292
|
+
@address.join "."
|
293
|
+
end
|
294
|
+
|
280
295
|
# @!method name
|
281
296
|
# @return [String] the unqualified name of the service.
|
282
297
|
# @!method options
|
@@ -336,12 +351,47 @@ module Gapic
|
|
336
351
|
options[:".google.longrunning.operation_info"] if options
|
337
352
|
end
|
338
353
|
|
354
|
+
# @return [Boolean] True if this method is marked as deprecated, false
|
355
|
+
# otherwise.
|
356
|
+
def is_deprecated?
|
357
|
+
options[:deprecated] if options
|
358
|
+
end
|
359
|
+
|
339
360
|
# @return [Google::Api::HttpRule] The HTTP bindings for this method. See
|
340
361
|
# `google/api/http.proto`.
|
341
362
|
def http
|
342
363
|
options[:".google.api.http"] if options
|
343
364
|
end
|
344
365
|
|
366
|
+
# @return [Google::Api::RoutingRule] The Routing bindings for this method. See
|
367
|
+
# `google/api/routing.proto`.
|
368
|
+
def routing
|
369
|
+
options[:".google.api.routing"] if options
|
370
|
+
end
|
371
|
+
|
372
|
+
# @return [String] The full name for this method
|
373
|
+
# (e.g. `google.example.Service.Rpc`).
|
374
|
+
# Useful when matching against other pieces of information
|
375
|
+
# which also reference full proto name.
|
376
|
+
def full_name
|
377
|
+
@address.join "."
|
378
|
+
end
|
379
|
+
|
380
|
+
# Nonstandard LRO annotation.
|
381
|
+
# @return [String] Name of the nonstandard LRO service
|
382
|
+
# that should be used for polling the operation object
|
383
|
+
# that this method returns
|
384
|
+
def operation_service
|
385
|
+
options[:".google.cloud.operation_service"] if options
|
386
|
+
end
|
387
|
+
|
388
|
+
# Nonstandard LRO annotation.
|
389
|
+
# @return [Boolean] Whether this method is a polling method
|
390
|
+
# for a nonstandard LRO service
|
391
|
+
def polling_method
|
392
|
+
options[:".google.cloud.operation_polling_method"] if options
|
393
|
+
end
|
394
|
+
|
345
395
|
# @!method name
|
346
396
|
# @return [String] the unqualified name of the method.
|
347
397
|
# @!method options
|
@@ -564,6 +614,14 @@ module Gapic
|
|
564
614
|
descriptor.options&.map_entry
|
565
615
|
end
|
566
616
|
|
617
|
+
# @return [String] The full name for this message
|
618
|
+
# (e.g. `google.example.Message`).
|
619
|
+
# Useful when matching against other pieces of information
|
620
|
+
# which also reference full proto name.
|
621
|
+
def full_name
|
622
|
+
@address.join "."
|
623
|
+
end
|
624
|
+
|
567
625
|
# @!method name
|
568
626
|
# @return [String] the unqualified name of the message.
|
569
627
|
# @!method oneof_decl
|
@@ -641,6 +699,20 @@ module Gapic
|
|
641
699
|
false
|
642
700
|
end
|
643
701
|
|
702
|
+
# @return [Field, nil] a key field for this map
|
703
|
+
# or nil if this field is not a map
|
704
|
+
def map_key_field
|
705
|
+
return nil? unless map?
|
706
|
+
@message.fields.find { |f| f.name == "key" }
|
707
|
+
end
|
708
|
+
|
709
|
+
# @return [Field, nil] a value field for this map
|
710
|
+
# or nil if this field is not a map
|
711
|
+
def map_val_field
|
712
|
+
return nil? unless map?
|
713
|
+
@message.fields.find { |f| f.name == "value" }
|
714
|
+
end
|
715
|
+
|
644
716
|
# @return [String] A reference to another resource message or resource
|
645
717
|
# definition. See `google/api/resource.proto`.
|
646
718
|
def resource_reference
|
@@ -656,6 +728,83 @@ module Gapic
|
|
656
728
|
[]
|
657
729
|
end
|
658
730
|
|
731
|
+
# @return [String] The full name for this field
|
732
|
+
# (e.g. `google.example.Message.field`).
|
733
|
+
# Useful when matching against other pieces of information
|
734
|
+
# which also reference full proto name.
|
735
|
+
def full_name
|
736
|
+
@address.join "."
|
737
|
+
end
|
738
|
+
|
739
|
+
# Nonstandard LRO annotation.
|
740
|
+
# This annotation goes on the field of the request message of the method
|
741
|
+
# that intiates a non-standard LRO.
|
742
|
+
#
|
743
|
+
# This annotation contains a field name of the request message
|
744
|
+
# of the LRO polling method. (e.g. `GetRegionOperationRequest`)
|
745
|
+
# (let's call it a 'referenced field')
|
746
|
+
#
|
747
|
+
# When the this method is called, this value should be saved.
|
748
|
+
# Later, when when polling for a nonstandard LRO, this saved value should
|
749
|
+
# be copied to the referenced field.
|
750
|
+
#
|
751
|
+
# This typically would be used for something that a caller method knows,
|
752
|
+
# but an Operation object might not have, e.g. a 'region_id'.
|
753
|
+
#
|
754
|
+
# So if this field is `region_id` and the annotation is
|
755
|
+
# `(google.cloud.operation_request_field) = "region"`, then:
|
756
|
+
#
|
757
|
+
# `get_region_operation_request.region = this_message.region_id`
|
758
|
+
#
|
759
|
+
# In contrast to the `operation_response_field`, this field
|
760
|
+
# - goes onto the fields of the input message of the method that
|
761
|
+
# initiates the LRO
|
762
|
+
# - semantically annotates a 'push': the value of this field gets
|
763
|
+
# 'pushed' into every LRO poll request.
|
764
|
+
#
|
765
|
+
# @return [String]
|
766
|
+
def operation_request_field
|
767
|
+
options[:".google.cloud.operation_request_field"] if options
|
768
|
+
end
|
769
|
+
|
770
|
+
# Nonstandard LRO annotation.
|
771
|
+
# This annotation goes on the field of the request message of the method
|
772
|
+
# that polls for a non-standard LRO.
|
773
|
+
#
|
774
|
+
# This annotation contains a field name of the LRO object (typically 'Operation')
|
775
|
+
# (let's call it a 'referenced field')
|
776
|
+
#
|
777
|
+
# When polling for a nonstandard LRO, the value of the field
|
778
|
+
# that this annotation is on should be copied from the referenced field.
|
779
|
+
#
|
780
|
+
# This typically would get used for something that is named differently in the
|
781
|
+
# operation polling request message vs in the Operation object, e.g. operation's name
|
782
|
+
#
|
783
|
+
# So if this field is `operation` and the annotation is
|
784
|
+
# `(google.cloud.operation_response_field) = "name"`, then:
|
785
|
+
#
|
786
|
+
# `get_region_operation_request.operation = operation.name`
|
787
|
+
#
|
788
|
+
# In contrast to the `operation_request_field`, this field
|
789
|
+
# - goes onto the fields of the LRO polling method's input message
|
790
|
+
# - semantically annotates a 'pull', the value of the referenced field gets
|
791
|
+
# 'pulled' into this one.
|
792
|
+
#
|
793
|
+
# @return [String]
|
794
|
+
def operation_response_field
|
795
|
+
options[:".google.cloud.operation_response_field"] if options
|
796
|
+
end
|
797
|
+
|
798
|
+
# Nonstandard LRO annotation.
|
799
|
+
# This annotation goes on the fields of the nonstandard Operation message
|
800
|
+
# Is value can be either `NAME`, `STATUS`, `ERROR_MESSAGE`, or `ERROR_CODE`
|
801
|
+
# and the field encodes a corresponding aspect of the LRO behaviour.
|
802
|
+
#
|
803
|
+
# @return [Integer]
|
804
|
+
def operation_field
|
805
|
+
options[:".google.cloud.operation_field"] if options
|
806
|
+
end
|
807
|
+
|
659
808
|
# Specifically denotes a field as optional. While all fields in protocol
|
660
809
|
# buffers are optional, this may be specified for emphasis if
|
661
810
|
# appropriate.
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
module Google
|
9
|
+
module Api
|
10
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
11
|
+
|
12
|
+
##
|
13
|
+
# Message Classes
|
14
|
+
#
|
15
|
+
class Authentication < ::Protobuf::Message; end
|
16
|
+
class AuthenticationRule < ::Protobuf::Message; end
|
17
|
+
class JwtLocation < ::Protobuf::Message; end
|
18
|
+
class AuthProvider < ::Protobuf::Message; end
|
19
|
+
class OAuthRequirements < ::Protobuf::Message; end
|
20
|
+
class AuthRequirement < ::Protobuf::Message; end
|
21
|
+
|
22
|
+
|
23
|
+
##
|
24
|
+
# File Options
|
25
|
+
#
|
26
|
+
set_option :java_package, "com.google.api"
|
27
|
+
set_option :java_outer_classname, "AuthProto"
|
28
|
+
set_option :java_multiple_files, true
|
29
|
+
set_option :go_package, "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"
|
30
|
+
set_option :objc_class_prefix, "GAPI"
|
31
|
+
|
32
|
+
|
33
|
+
##
|
34
|
+
# Message Fields
|
35
|
+
#
|
36
|
+
class Authentication
|
37
|
+
repeated ::Google::Api::AuthenticationRule, :rules, 3
|
38
|
+
repeated ::Google::Api::AuthProvider, :providers, 4
|
39
|
+
end
|
40
|
+
|
41
|
+
class AuthenticationRule
|
42
|
+
optional :string, :selector, 1
|
43
|
+
optional ::Google::Api::OAuthRequirements, :oauth, 2
|
44
|
+
optional :bool, :allow_without_credential, 5
|
45
|
+
repeated ::Google::Api::AuthRequirement, :requirements, 7
|
46
|
+
end
|
47
|
+
|
48
|
+
class JwtLocation
|
49
|
+
optional :string, :header, 1
|
50
|
+
optional :string, :query, 2
|
51
|
+
optional :string, :value_prefix, 3
|
52
|
+
end
|
53
|
+
|
54
|
+
class AuthProvider
|
55
|
+
optional :string, :id, 1
|
56
|
+
optional :string, :issuer, 2
|
57
|
+
optional :string, :jwks_uri, 3
|
58
|
+
optional :string, :audiences, 4
|
59
|
+
optional :string, :authorization_url, 5
|
60
|
+
repeated ::Google::Api::JwtLocation, :jwt_locations, 6
|
61
|
+
end
|
62
|
+
|
63
|
+
class OAuthRequirements
|
64
|
+
optional :string, :canonical_scopes, 1
|
65
|
+
end
|
66
|
+
|
67
|
+
class AuthRequirement
|
68
|
+
optional :string, :provider_id, 1
|
69
|
+
optional :string, :audiences, 2
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
module Google
|
9
|
+
module Api
|
10
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
11
|
+
|
12
|
+
##
|
13
|
+
# Message Classes
|
14
|
+
#
|
15
|
+
class Backend < ::Protobuf::Message; end
|
16
|
+
class BackendRule < ::Protobuf::Message
|
17
|
+
class PathTranslation < ::Protobuf::Enum
|
18
|
+
define :PATH_TRANSLATION_UNSPECIFIED, 0
|
19
|
+
define :CONSTANT_ADDRESS, 1
|
20
|
+
define :APPEND_PATH_TO_ADDRESS, 2
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
##
|
28
|
+
# File Options
|
29
|
+
#
|
30
|
+
set_option :java_package, "com.google.api"
|
31
|
+
set_option :java_outer_classname, "BackendProto"
|
32
|
+
set_option :java_multiple_files, true
|
33
|
+
set_option :go_package, "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"
|
34
|
+
set_option :objc_class_prefix, "GAPI"
|
35
|
+
|
36
|
+
|
37
|
+
##
|
38
|
+
# Message Fields
|
39
|
+
#
|
40
|
+
class Backend
|
41
|
+
repeated ::Google::Api::BackendRule, :rules, 1
|
42
|
+
end
|
43
|
+
|
44
|
+
class BackendRule
|
45
|
+
optional :string, :selector, 1
|
46
|
+
optional :string, :address, 2
|
47
|
+
optional :double, :deadline, 3
|
48
|
+
optional :double, :min_deadline, 4
|
49
|
+
optional :double, :operation_deadline, 5
|
50
|
+
optional ::Google::Api::BackendRule::PathTranslation, :path_translation, 6
|
51
|
+
optional :string, :jwt_audience, 7
|
52
|
+
optional :bool, :disable_auth, 8
|
53
|
+
optional :string, :protocol, 9
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
|
9
|
+
##
|
10
|
+
# Imports
|
11
|
+
#
|
12
|
+
require 'google/api/metric.pb'
|
13
|
+
|
14
|
+
module Google
|
15
|
+
module Api
|
16
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
17
|
+
|
18
|
+
##
|
19
|
+
# Message Classes
|
20
|
+
#
|
21
|
+
class Billing < ::Protobuf::Message
|
22
|
+
class BillingDestination < ::Protobuf::Message; end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
##
|
29
|
+
# File Options
|
30
|
+
#
|
31
|
+
set_option :java_package, "com.google.api"
|
32
|
+
set_option :java_outer_classname, "BillingProto"
|
33
|
+
set_option :java_multiple_files, true
|
34
|
+
set_option :go_package, "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"
|
35
|
+
set_option :objc_class_prefix, "GAPI"
|
36
|
+
|
37
|
+
|
38
|
+
##
|
39
|
+
# Message Fields
|
40
|
+
#
|
41
|
+
class Billing
|
42
|
+
class BillingDestination
|
43
|
+
optional :string, :monitored_resource, 1
|
44
|
+
repeated :string, :metrics, 2
|
45
|
+
end
|
46
|
+
|
47
|
+
repeated ::Google::Api::Billing::BillingDestination, :consumer_destinations, 8
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
module Google
|
9
|
+
module Api
|
10
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
11
|
+
|
12
|
+
##
|
13
|
+
# Message Classes
|
14
|
+
#
|
15
|
+
class Context < ::Protobuf::Message; end
|
16
|
+
class ContextRule < ::Protobuf::Message; end
|
17
|
+
|
18
|
+
|
19
|
+
##
|
20
|
+
# File Options
|
21
|
+
#
|
22
|
+
set_option :java_package, "com.google.api"
|
23
|
+
set_option :java_outer_classname, "ContextProto"
|
24
|
+
set_option :java_multiple_files, true
|
25
|
+
set_option :go_package, "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"
|
26
|
+
set_option :objc_class_prefix, "GAPI"
|
27
|
+
|
28
|
+
|
29
|
+
##
|
30
|
+
# Message Fields
|
31
|
+
#
|
32
|
+
class Context
|
33
|
+
repeated ::Google::Api::ContextRule, :rules, 1
|
34
|
+
end
|
35
|
+
|
36
|
+
class ContextRule
|
37
|
+
optional :string, :selector, 1
|
38
|
+
repeated :string, :requested, 2
|
39
|
+
repeated :string, :provided, 3
|
40
|
+
repeated :string, :allowed_request_extensions, 4
|
41
|
+
repeated :string, :allowed_response_extensions, 5
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
module Google
|
9
|
+
module Api
|
10
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
11
|
+
|
12
|
+
##
|
13
|
+
# Message Classes
|
14
|
+
#
|
15
|
+
class Control < ::Protobuf::Message; end
|
16
|
+
|
17
|
+
|
18
|
+
##
|
19
|
+
# File Options
|
20
|
+
#
|
21
|
+
set_option :java_package, "com.google.api"
|
22
|
+
set_option :java_outer_classname, "ControlProto"
|
23
|
+
set_option :java_multiple_files, true
|
24
|
+
set_option :go_package, "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"
|
25
|
+
set_option :objc_class_prefix, "GAPI"
|
26
|
+
|
27
|
+
|
28
|
+
##
|
29
|
+
# Message Fields
|
30
|
+
#
|
31
|
+
class Control
|
32
|
+
optional :string, :environment, 1
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
module Google
|
9
|
+
module Api
|
10
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
11
|
+
|
12
|
+
##
|
13
|
+
# Message Classes
|
14
|
+
#
|
15
|
+
class Documentation < ::Protobuf::Message; end
|
16
|
+
class DocumentationRule < ::Protobuf::Message; end
|
17
|
+
class Page < ::Protobuf::Message; end
|
18
|
+
|
19
|
+
|
20
|
+
##
|
21
|
+
# File Options
|
22
|
+
#
|
23
|
+
set_option :java_package, "com.google.api"
|
24
|
+
set_option :java_outer_classname, "DocumentationProto"
|
25
|
+
set_option :java_multiple_files, true
|
26
|
+
set_option :go_package, "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"
|
27
|
+
set_option :objc_class_prefix, "GAPI"
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Message Fields
|
32
|
+
#
|
33
|
+
class Documentation
|
34
|
+
optional :string, :summary, 1
|
35
|
+
repeated ::Google::Api::Page, :pages, 5
|
36
|
+
repeated ::Google::Api::DocumentationRule, :rules, 3
|
37
|
+
optional :string, :documentation_root_url, 4
|
38
|
+
optional :string, :overview, 2
|
39
|
+
end
|
40
|
+
|
41
|
+
class DocumentationRule
|
42
|
+
optional :string, :selector, 1
|
43
|
+
optional :string, :description, 2
|
44
|
+
optional :string, :deprecation_description, 3
|
45
|
+
end
|
46
|
+
|
47
|
+
class Page
|
48
|
+
optional :string, :name, 1
|
49
|
+
optional :string, :content, 2
|
50
|
+
repeated ::Google::Api::Page, :subpages, 3
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
module Google
|
9
|
+
module Api
|
10
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
11
|
+
|
12
|
+
##
|
13
|
+
# Message Classes
|
14
|
+
#
|
15
|
+
class Endpoint < ::Protobuf::Message; end
|
16
|
+
|
17
|
+
|
18
|
+
##
|
19
|
+
# File Options
|
20
|
+
#
|
21
|
+
set_option :java_package, "com.google.api"
|
22
|
+
set_option :java_outer_classname, "EndpointProto"
|
23
|
+
set_option :java_multiple_files, true
|
24
|
+
set_option :go_package, "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"
|
25
|
+
set_option :objc_class_prefix, "GAPI"
|
26
|
+
|
27
|
+
|
28
|
+
##
|
29
|
+
# Message Fields
|
30
|
+
#
|
31
|
+
class Endpoint
|
32
|
+
optional :string, :name, 1
|
33
|
+
repeated :string, :aliases, 2, :deprecated => true
|
34
|
+
repeated :string, :features, 4
|
35
|
+
optional :string, :target, 101
|
36
|
+
optional :bool, :allow_cors, 5
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|