google-shopping-merchant-accounts-v1beta 0.a → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +143 -8
  5. data/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb +44 -0
  6. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +452 -0
  7. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +49 -0
  8. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +49 -0
  9. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +419 -0
  10. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +130 -0
  11. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb +54 -0
  12. data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb +57 -0
  13. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb +57 -0
  14. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +633 -0
  15. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +49 -0
  16. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +66 -0
  17. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +586 -0
  18. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +249 -0
  19. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +58 -0
  20. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +61 -0
  21. data/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +58 -0
  22. data/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +57 -0
  23. data/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +47 -0
  24. data/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +67 -0
  25. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +942 -0
  26. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +49 -0
  27. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +80 -0
  28. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +890 -0
  29. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +423 -0
  30. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb +54 -0
  31. data/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb +57 -0
  32. data/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +71 -0
  33. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +525 -0
  34. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +49 -0
  35. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +49 -0
  36. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +485 -0
  37. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +190 -0
  38. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +55 -0
  39. data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb +58 -0
  40. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +524 -0
  41. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +49 -0
  42. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +49 -0
  43. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +484 -0
  44. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +190 -0
  45. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb +54 -0
  46. data/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb +57 -0
  47. data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb +56 -0
  48. data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +51 -0
  49. data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +60 -0
  50. data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +50 -0
  51. data/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb +48 -0
  52. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +539 -0
  53. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +49 -0
  54. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +52 -0
  55. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +499 -0
  56. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +190 -0
  57. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb +57 -0
  58. data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +60 -0
  59. data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb +54 -0
  60. data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +65 -0
  61. data/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb +55 -0
  62. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +724 -0
  63. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +49 -0
  64. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +49 -0
  65. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +670 -0
  66. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +310 -0
  67. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb +54 -0
  68. data/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb +57 -0
  69. data/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +66 -0
  70. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +61 -0
  71. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +551 -0
  72. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +49 -0
  73. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +66 -0
  74. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +511 -0
  75. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +189 -0
  76. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +58 -0
  77. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +61 -0
  78. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +53 -0
  79. data/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb +44 -0
  80. data/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb +56 -0
  81. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +734 -0
  82. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +49 -0
  83. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +66 -0
  84. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +680 -0
  85. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb +309 -0
  86. data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb +64 -0
  87. data/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +67 -0
  88. data/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +65 -0
  89. data/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb +63 -0
  90. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +835 -0
  91. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +49 -0
  92. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +66 -0
  93. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +774 -0
  94. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +368 -0
  95. data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +58 -0
  96. data/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +61 -0
  97. data/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +62 -0
  98. data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +52 -0
  99. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +526 -0
  100. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +49 -0
  101. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +49 -0
  102. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +486 -0
  103. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +190 -0
  104. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +55 -0
  105. data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb +58 -0
  106. data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb +83 -0
  107. data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb +51 -0
  108. data/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb +49 -0
  109. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb +522 -0
  110. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +49 -0
  111. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +66 -0
  112. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +482 -0
  113. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +189 -0
  114. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb +54 -0
  115. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb +57 -0
  116. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +623 -0
  117. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +49 -0
  118. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +63 -0
  119. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +584 -0
  120. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +246 -0
  121. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb +54 -0
  122. data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb +57 -0
  123. data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +54 -0
  124. data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +52 -0
  125. data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb +56 -0
  126. data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +49 -0
  127. data/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb +44 -0
  128. data/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb +60 -0
  129. data/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +838 -0
  130. data/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +49 -0
  131. data/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +66 -0
  132. data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +777 -0
  133. data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +368 -0
  134. data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb +54 -0
  135. data/lib/google/shopping/merchant/accounts/v1beta/user_service.rb +57 -0
  136. data/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +58 -0
  137. data/lib/google/shopping/merchant/accounts/v1beta/version.rb +7 -2
  138. data/lib/google/shopping/merchant/accounts/v1beta.rb +60 -0
  139. data/lib/google-shopping-merchant-accounts-v1beta.rb +21 -0
  140. data/proto_docs/README.md +4 -0
  141. data/proto_docs/google/api/client.rb +420 -0
  142. data/proto_docs/google/api/field_behavior.rb +85 -0
  143. data/proto_docs/google/api/launch_stage.rb +71 -0
  144. data/proto_docs/google/api/resource.rb +227 -0
  145. data/proto_docs/google/protobuf/duration.rb +98 -0
  146. data/proto_docs/google/protobuf/empty.rb +34 -0
  147. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  148. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  149. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  150. data/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +43 -0
  151. data/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +101 -0
  152. data/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +142 -0
  153. data/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +219 -0
  154. data/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +129 -0
  155. data/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb +72 -0
  156. data/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +43 -0
  157. data/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +82 -0
  158. data/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +87 -0
  159. data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +238 -0
  160. data/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +40 -0
  161. data/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +160 -0
  162. data/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +195 -0
  163. data/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +743 -0
  164. data/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +88 -0
  165. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +99 -0
  166. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +132 -0
  167. data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +37 -0
  168. data/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb +156 -0
  169. data/proto_docs/google/shopping/type/types.rb +210 -0
  170. data/proto_docs/google/type/date.rb +53 -0
  171. data/proto_docs/google/type/datetime.rb +99 -0
  172. data/proto_docs/google/type/interval.rb +45 -0
  173. data/proto_docs/google/type/phone_number.rb +112 -0
  174. data/proto_docs/google/type/postal_address.rb +135 -0
  175. metadata +234 -10
@@ -0,0 +1,835 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/shopping/merchant/accounts/v1beta/regions_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Accounts
26
+ module V1beta
27
+ module RegionsService
28
+ ##
29
+ # Client for the RegionsService service.
30
+ #
31
+ # Manages regions configuration.
32
+ #
33
+ # This API defines the following resource model:
34
+ #
35
+ # - [Region][google.shopping.merchant.accounts.v1main.Region]
36
+ #
37
+ class Client
38
+ # @private
39
+ API_VERSION = ""
40
+
41
+ # @private
42
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
43
+
44
+ include Paths
45
+
46
+ # @private
47
+ attr_reader :regions_service_stub
48
+
49
+ ##
50
+ # Configure the RegionsService Client class.
51
+ #
52
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration}
53
+ # for a description of the configuration fields.
54
+ #
55
+ # @example
56
+ #
57
+ # # Modify the configuration for all RegionsService clients
58
+ # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config|
59
+ # config.timeout = 10.0
60
+ # end
61
+ #
62
+ # @yield [config] Configure the Client client.
63
+ # @yieldparam config [Client::Configuration]
64
+ #
65
+ # @return [Client::Configuration]
66
+ #
67
+ def self.configure
68
+ @configure ||= begin
69
+ namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"]
70
+ parent_config = while namespace.any?
71
+ parent_name = namespace.join "::"
72
+ parent_const = const_get parent_name
73
+ break parent_const.configure if parent_const.respond_to? :configure
74
+ namespace.pop
75
+ end
76
+ default_config = Client::Configuration.new parent_config
77
+
78
+ default_config
79
+ end
80
+ yield @configure if block_given?
81
+ @configure
82
+ end
83
+
84
+ ##
85
+ # Configure the RegionsService Client instance.
86
+ #
87
+ # The configuration is set to the derived mode, meaning that values can be changed,
88
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
89
+ # should be made on {Client.configure}.
90
+ #
91
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration}
92
+ # for a description of the configuration fields.
93
+ #
94
+ # @yield [config] Configure the Client client.
95
+ # @yieldparam config [Client::Configuration]
96
+ #
97
+ # @return [Client::Configuration]
98
+ #
99
+ def configure
100
+ yield @config if block_given?
101
+ @config
102
+ end
103
+
104
+ ##
105
+ # The effective universe domain
106
+ #
107
+ # @return [String]
108
+ #
109
+ def universe_domain
110
+ @regions_service_stub.universe_domain
111
+ end
112
+
113
+ ##
114
+ # Create a new RegionsService client object.
115
+ #
116
+ # @example
117
+ #
118
+ # # Create a client using the default configuration
119
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new
120
+ #
121
+ # # Create a client using a custom configuration
122
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config|
123
+ # config.timeout = 10.0
124
+ # end
125
+ #
126
+ # @yield [config] Configure the RegionsService client.
127
+ # @yieldparam config [Client::Configuration]
128
+ #
129
+ def initialize
130
+ # These require statements are intentionally placed here to initialize
131
+ # the gRPC module only when it's required.
132
+ # See https://github.com/googleapis/toolkit/issues/446
133
+ require "gapic/grpc"
134
+ require "google/shopping/merchant/accounts/v1beta/regions_services_pb"
135
+
136
+ # Create the configuration object
137
+ @config = Configuration.new Client.configure
138
+
139
+ # Yield the configuration if needed
140
+ yield @config if block_given?
141
+
142
+ # Create credentials
143
+ credentials = @config.credentials
144
+ # Use self-signed JWT if the endpoint is unchanged from default,
145
+ # but only if the default endpoint does not have a region prefix.
146
+ enable_self_signed_jwt = @config.endpoint.nil? ||
147
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
148
+ !@config.endpoint.split(".").first.include?("-"))
149
+ credentials ||= Credentials.default scope: @config.scope,
150
+ enable_self_signed_jwt: enable_self_signed_jwt
151
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
152
+ credentials = Credentials.new credentials, scope: @config.scope
153
+ end
154
+ @quota_project_id = @config.quota_project
155
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
156
+
157
+ @regions_service_stub = ::Gapic::ServiceStub.new(
158
+ ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Stub,
159
+ credentials: credentials,
160
+ endpoint: @config.endpoint,
161
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
+ universe_domain: @config.universe_domain,
163
+ channel_args: @config.channel_args,
164
+ interceptors: @config.interceptors,
165
+ channel_pool_config: @config.channel_pool
166
+ )
167
+ end
168
+
169
+ # Service calls
170
+
171
+ ##
172
+ # Retrieves a region defined in your Merchant Center account.
173
+ #
174
+ # @overload get_region(request, options = nil)
175
+ # Pass arguments to `get_region` via a request object, either of type
176
+ # {::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest} or an equivalent Hash.
177
+ #
178
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest, ::Hash]
179
+ # A request object representing the call parameters. Required. To specify no
180
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
181
+ # @param options [::Gapic::CallOptions, ::Hash]
182
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
183
+ #
184
+ # @overload get_region(name: nil)
185
+ # Pass arguments to `get_region` via keyword arguments. Note that at
186
+ # least one keyword argument is required. To specify no parameters, or to keep all
187
+ # the default parameter values, pass an empty Hash as a request object (see above).
188
+ #
189
+ # @param name [::String]
190
+ # Required. The name of the region to retrieve.
191
+ # Format: `accounts/{account}/regions/{region}`
192
+ #
193
+ # @yield [response, operation] Access the result along with the RPC operation
194
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region]
195
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
196
+ #
197
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region]
198
+ #
199
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
200
+ #
201
+ # @example Basic example
202
+ # require "google/shopping/merchant/accounts/v1beta"
203
+ #
204
+ # # Create a client object. The client can be reused for multiple calls.
205
+ # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest.new
209
+ #
210
+ # # Call the get_region method.
211
+ # result = client.get_region request
212
+ #
213
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region.
214
+ # p result
215
+ #
216
+ def get_region request, options = nil
217
+ raise ::ArgumentError, "request must be provided" if request.nil?
218
+
219
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetRegionRequest
220
+
221
+ # Converts hash and nil to an options object
222
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
223
+
224
+ # Customize the options with defaults
225
+ metadata = @config.rpcs.get_region.metadata.to_h
226
+
227
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
228
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
229
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
230
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
231
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
232
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
233
+
234
+ header_params = {}
235
+ if request.name
236
+ header_params["name"] = request.name
237
+ end
238
+
239
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
240
+ metadata[:"x-goog-request-params"] ||= request_params_header
241
+
242
+ options.apply_defaults timeout: @config.rpcs.get_region.timeout,
243
+ metadata: metadata,
244
+ retry_policy: @config.rpcs.get_region.retry_policy
245
+
246
+ options.apply_defaults timeout: @config.timeout,
247
+ metadata: @config.metadata,
248
+ retry_policy: @config.retry_policy
249
+
250
+ @regions_service_stub.call_rpc :get_region, request, options: options do |response, operation|
251
+ yield response, operation if block_given?
252
+ return response
253
+ end
254
+ rescue ::GRPC::BadStatus => e
255
+ raise ::Google::Cloud::Error.from_error(e)
256
+ end
257
+
258
+ ##
259
+ # Creates a region definition in your Merchant Center account. Executing this
260
+ # method requires admin access.
261
+ #
262
+ # @overload create_region(request, options = nil)
263
+ # Pass arguments to `create_region` via a request object, either of type
264
+ # {::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest} or an equivalent Hash.
265
+ #
266
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest, ::Hash]
267
+ # A request object representing the call parameters. Required. To specify no
268
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
269
+ # @param options [::Gapic::CallOptions, ::Hash]
270
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
271
+ #
272
+ # @overload create_region(parent: nil, region_id: nil, region: nil)
273
+ # Pass arguments to `create_region` via keyword arguments. Note that at
274
+ # least one keyword argument is required. To specify no parameters, or to keep all
275
+ # the default parameter values, pass an empty Hash as a request object (see above).
276
+ #
277
+ # @param parent [::String]
278
+ # Required. The account to create a region for.
279
+ # Format: `accounts/{account}`
280
+ # @param region_id [::String]
281
+ # Required. The identifier for the region, unique over all regions of the
282
+ # same account.
283
+ # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash]
284
+ # Required. The region to create.
285
+ #
286
+ # @yield [response, operation] Access the result along with the RPC operation
287
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region]
288
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
289
+ #
290
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region]
291
+ #
292
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
+ #
294
+ # @example Basic example
295
+ # require "google/shopping/merchant/accounts/v1beta"
296
+ #
297
+ # # Create a client object. The client can be reused for multiple calls.
298
+ # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new
299
+ #
300
+ # # Create a request. To set request fields, pass in keyword arguments.
301
+ # request = Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest.new
302
+ #
303
+ # # Call the create_region method.
304
+ # result = client.create_region request
305
+ #
306
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region.
307
+ # p result
308
+ #
309
+ def create_region request, options = nil
310
+ raise ::ArgumentError, "request must be provided" if request.nil?
311
+
312
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateRegionRequest
313
+
314
+ # Converts hash and nil to an options object
315
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
316
+
317
+ # Customize the options with defaults
318
+ metadata = @config.rpcs.create_region.metadata.to_h
319
+
320
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
321
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
322
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
323
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
324
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
325
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
326
+
327
+ header_params = {}
328
+ if request.parent
329
+ header_params["parent"] = request.parent
330
+ end
331
+
332
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
333
+ metadata[:"x-goog-request-params"] ||= request_params_header
334
+
335
+ options.apply_defaults timeout: @config.rpcs.create_region.timeout,
336
+ metadata: metadata,
337
+ retry_policy: @config.rpcs.create_region.retry_policy
338
+
339
+ options.apply_defaults timeout: @config.timeout,
340
+ metadata: @config.metadata,
341
+ retry_policy: @config.retry_policy
342
+
343
+ @regions_service_stub.call_rpc :create_region, request, options: options do |response, operation|
344
+ yield response, operation if block_given?
345
+ return response
346
+ end
347
+ rescue ::GRPC::BadStatus => e
348
+ raise ::Google::Cloud::Error.from_error(e)
349
+ end
350
+
351
+ ##
352
+ # Updates a region definition in your Merchant Center account. Executing this
353
+ # method requires admin access.
354
+ #
355
+ # @overload update_region(request, options = nil)
356
+ # Pass arguments to `update_region` via a request object, either of type
357
+ # {::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest} or an equivalent Hash.
358
+ #
359
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest, ::Hash]
360
+ # A request object representing the call parameters. Required. To specify no
361
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
362
+ # @param options [::Gapic::CallOptions, ::Hash]
363
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
364
+ #
365
+ # @overload update_region(region: nil, update_mask: nil)
366
+ # Pass arguments to `update_region` via keyword arguments. Note that at
367
+ # least one keyword argument is required. To specify no parameters, or to keep all
368
+ # the default parameter values, pass an empty Hash as a request object (see above).
369
+ #
370
+ # @param region [::Google::Shopping::Merchant::Accounts::V1beta::Region, ::Hash]
371
+ # Required. The updated region.
372
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
373
+ # Optional. The comma-separated field mask indicating the fields to update.
374
+ # Example:
375
+ # `"displayName,postalCodeArea.regionCode"`.
376
+ #
377
+ # @yield [response, operation] Access the result along with the RPC operation
378
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::Region]
379
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
380
+ #
381
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::Region]
382
+ #
383
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
384
+ #
385
+ # @example Basic example
386
+ # require "google/shopping/merchant/accounts/v1beta"
387
+ #
388
+ # # Create a client object. The client can be reused for multiple calls.
389
+ # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new
390
+ #
391
+ # # Create a request. To set request fields, pass in keyword arguments.
392
+ # request = Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest.new
393
+ #
394
+ # # Call the update_region method.
395
+ # result = client.update_region request
396
+ #
397
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::Region.
398
+ # p result
399
+ #
400
+ def update_region request, options = nil
401
+ raise ::ArgumentError, "request must be provided" if request.nil?
402
+
403
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateRegionRequest
404
+
405
+ # Converts hash and nil to an options object
406
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
407
+
408
+ # Customize the options with defaults
409
+ metadata = @config.rpcs.update_region.metadata.to_h
410
+
411
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
412
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
413
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
414
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
415
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
416
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
417
+
418
+ header_params = {}
419
+ if request.region&.name
420
+ header_params["region.name"] = request.region.name
421
+ end
422
+
423
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
424
+ metadata[:"x-goog-request-params"] ||= request_params_header
425
+
426
+ options.apply_defaults timeout: @config.rpcs.update_region.timeout,
427
+ metadata: metadata,
428
+ retry_policy: @config.rpcs.update_region.retry_policy
429
+
430
+ options.apply_defaults timeout: @config.timeout,
431
+ metadata: @config.metadata,
432
+ retry_policy: @config.retry_policy
433
+
434
+ @regions_service_stub.call_rpc :update_region, request, options: options do |response, operation|
435
+ yield response, operation if block_given?
436
+ return response
437
+ end
438
+ rescue ::GRPC::BadStatus => e
439
+ raise ::Google::Cloud::Error.from_error(e)
440
+ end
441
+
442
+ ##
443
+ # Deletes a region definition from your Merchant Center account. Executing
444
+ # this method requires admin access.
445
+ #
446
+ # @overload delete_region(request, options = nil)
447
+ # Pass arguments to `delete_region` via a request object, either of type
448
+ # {::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest} or an equivalent Hash.
449
+ #
450
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest, ::Hash]
451
+ # A request object representing the call parameters. Required. To specify no
452
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
453
+ # @param options [::Gapic::CallOptions, ::Hash]
454
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
455
+ #
456
+ # @overload delete_region(name: nil)
457
+ # Pass arguments to `delete_region` via keyword arguments. Note that at
458
+ # least one keyword argument is required. To specify no parameters, or to keep all
459
+ # the default parameter values, pass an empty Hash as a request object (see above).
460
+ #
461
+ # @param name [::String]
462
+ # Required. The name of the region to delete.
463
+ # Format: `accounts/{account}/regions/{region}`
464
+ #
465
+ # @yield [response, operation] Access the result along with the RPC operation
466
+ # @yieldparam response [::Google::Protobuf::Empty]
467
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
468
+ #
469
+ # @return [::Google::Protobuf::Empty]
470
+ #
471
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
472
+ #
473
+ # @example Basic example
474
+ # require "google/shopping/merchant/accounts/v1beta"
475
+ #
476
+ # # Create a client object. The client can be reused for multiple calls.
477
+ # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new
478
+ #
479
+ # # Create a request. To set request fields, pass in keyword arguments.
480
+ # request = Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest.new
481
+ #
482
+ # # Call the delete_region method.
483
+ # result = client.delete_region request
484
+ #
485
+ # # The returned object is of type Google::Protobuf::Empty.
486
+ # p result
487
+ #
488
+ def delete_region request, options = nil
489
+ raise ::ArgumentError, "request must be provided" if request.nil?
490
+
491
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::DeleteRegionRequest
492
+
493
+ # Converts hash and nil to an options object
494
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
495
+
496
+ # Customize the options with defaults
497
+ metadata = @config.rpcs.delete_region.metadata.to_h
498
+
499
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
500
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
501
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
502
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
503
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
504
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
505
+
506
+ header_params = {}
507
+ if request.name
508
+ header_params["name"] = request.name
509
+ end
510
+
511
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
512
+ metadata[:"x-goog-request-params"] ||= request_params_header
513
+
514
+ options.apply_defaults timeout: @config.rpcs.delete_region.timeout,
515
+ metadata: metadata,
516
+ retry_policy: @config.rpcs.delete_region.retry_policy
517
+
518
+ options.apply_defaults timeout: @config.timeout,
519
+ metadata: @config.metadata,
520
+ retry_policy: @config.retry_policy
521
+
522
+ @regions_service_stub.call_rpc :delete_region, request, options: options do |response, operation|
523
+ yield response, operation if block_given?
524
+ return response
525
+ end
526
+ rescue ::GRPC::BadStatus => e
527
+ raise ::Google::Cloud::Error.from_error(e)
528
+ end
529
+
530
+ ##
531
+ # Lists the regions in your Merchant Center account.
532
+ #
533
+ # @overload list_regions(request, options = nil)
534
+ # Pass arguments to `list_regions` via a request object, either of type
535
+ # {::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest} or an equivalent Hash.
536
+ #
537
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest, ::Hash]
538
+ # A request object representing the call parameters. Required. To specify no
539
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
540
+ # @param options [::Gapic::CallOptions, ::Hash]
541
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
542
+ #
543
+ # @overload list_regions(parent: nil, page_size: nil, page_token: nil)
544
+ # Pass arguments to `list_regions` via keyword arguments. Note that at
545
+ # least one keyword argument is required. To specify no parameters, or to keep all
546
+ # the default parameter values, pass an empty Hash as a request object (see above).
547
+ #
548
+ # @param parent [::String]
549
+ # Required. The account to list regions for.
550
+ # Format: `accounts/{account}`
551
+ # @param page_size [::Integer]
552
+ # Optional. The maximum number of regions to return. The service may return
553
+ # fewer than this value.
554
+ # If unspecified, at most 50 regions will be returned.
555
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
556
+ # @param page_token [::String]
557
+ # Optional. A page token, received from a previous `ListRegions` call.
558
+ # Provide this to retrieve the subsequent page.
559
+ #
560
+ # When paginating, all other parameters provided to `ListRegions` must
561
+ # match the call that provided the page token.
562
+ #
563
+ # @yield [response, operation] Access the result along with the RPC operation
564
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>]
565
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
566
+ #
567
+ # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::Region>]
568
+ #
569
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
570
+ #
571
+ # @example Basic example
572
+ # require "google/shopping/merchant/accounts/v1beta"
573
+ #
574
+ # # Create a client object. The client can be reused for multiple calls.
575
+ # client = Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new
576
+ #
577
+ # # Create a request. To set request fields, pass in keyword arguments.
578
+ # request = Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest.new
579
+ #
580
+ # # Call the list_regions method.
581
+ # result = client.list_regions request
582
+ #
583
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
584
+ # # over elements, and API calls will be issued to fetch pages as needed.
585
+ # result.each do |item|
586
+ # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::Region.
587
+ # p item
588
+ # end
589
+ #
590
+ def list_regions request, options = nil
591
+ raise ::ArgumentError, "request must be provided" if request.nil?
592
+
593
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListRegionsRequest
594
+
595
+ # Converts hash and nil to an options object
596
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
597
+
598
+ # Customize the options with defaults
599
+ metadata = @config.rpcs.list_regions.metadata.to_h
600
+
601
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
602
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
603
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
604
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
605
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
606
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
+
608
+ header_params = {}
609
+ if request.parent
610
+ header_params["parent"] = request.parent
611
+ end
612
+
613
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
614
+ metadata[:"x-goog-request-params"] ||= request_params_header
615
+
616
+ options.apply_defaults timeout: @config.rpcs.list_regions.timeout,
617
+ metadata: metadata,
618
+ retry_policy: @config.rpcs.list_regions.retry_policy
619
+
620
+ options.apply_defaults timeout: @config.timeout,
621
+ metadata: @config.metadata,
622
+ retry_policy: @config.retry_policy
623
+
624
+ @regions_service_stub.call_rpc :list_regions, request, options: options do |response, operation|
625
+ response = ::Gapic::PagedEnumerable.new @regions_service_stub, :list_regions, request, response, operation, options
626
+ yield response, operation if block_given?
627
+ return response
628
+ end
629
+ rescue ::GRPC::BadStatus => e
630
+ raise ::Google::Cloud::Error.from_error(e)
631
+ end
632
+
633
+ ##
634
+ # Configuration class for the RegionsService API.
635
+ #
636
+ # This class represents the configuration for RegionsService,
637
+ # providing control over timeouts, retry behavior, logging, transport
638
+ # parameters, and other low-level controls. Certain parameters can also be
639
+ # applied individually to specific RPCs. See
640
+ # {::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client::Configuration::Rpcs}
641
+ # for a list of RPCs that can be configured independently.
642
+ #
643
+ # Configuration can be applied globally to all clients, or to a single client
644
+ # on construction.
645
+ #
646
+ # @example
647
+ #
648
+ # # Modify the global config, setting the timeout for
649
+ # # get_region to 20 seconds,
650
+ # # and all remaining timeouts to 10 seconds.
651
+ # ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.configure do |config|
652
+ # config.timeout = 10.0
653
+ # config.rpcs.get_region.timeout = 20.0
654
+ # end
655
+ #
656
+ # # Apply the above configuration only to a new client.
657
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::RegionsService::Client.new do |config|
658
+ # config.timeout = 10.0
659
+ # config.rpcs.get_region.timeout = 20.0
660
+ # end
661
+ #
662
+ # @!attribute [rw] endpoint
663
+ # A custom service endpoint, as a hostname or hostname:port. The default is
664
+ # nil, indicating to use the default endpoint in the current universe domain.
665
+ # @return [::String,nil]
666
+ # @!attribute [rw] credentials
667
+ # Credentials to send with calls. You may provide any of the following types:
668
+ # * (`String`) The path to a service account key file in JSON format
669
+ # * (`Hash`) A service account key as a Hash
670
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
671
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
672
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
673
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
674
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
675
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
676
+ # * (`nil`) indicating no credentials
677
+ # @return [::Object]
678
+ # @!attribute [rw] scope
679
+ # The OAuth scopes
680
+ # @return [::Array<::String>]
681
+ # @!attribute [rw] lib_name
682
+ # The library name as recorded in instrumentation and logging
683
+ # @return [::String]
684
+ # @!attribute [rw] lib_version
685
+ # The library version as recorded in instrumentation and logging
686
+ # @return [::String]
687
+ # @!attribute [rw] channel_args
688
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
689
+ # `GRPC::Core::Channel` object is provided as the credential.
690
+ # @return [::Hash]
691
+ # @!attribute [rw] interceptors
692
+ # An array of interceptors that are run before calls are executed.
693
+ # @return [::Array<::GRPC::ClientInterceptor>]
694
+ # @!attribute [rw] timeout
695
+ # The call timeout in seconds.
696
+ # @return [::Numeric]
697
+ # @!attribute [rw] metadata
698
+ # Additional gRPC headers to be sent with the call.
699
+ # @return [::Hash{::Symbol=>::String}]
700
+ # @!attribute [rw] retry_policy
701
+ # The retry policy. The value is a hash with the following keys:
702
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
703
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
704
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
705
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
706
+ # trigger a retry.
707
+ # @return [::Hash]
708
+ # @!attribute [rw] quota_project
709
+ # A separate project against which to charge quota.
710
+ # @return [::String]
711
+ # @!attribute [rw] universe_domain
712
+ # The universe domain within which to make requests. This determines the
713
+ # default endpoint URL. The default value of nil uses the environment
714
+ # universe (usually the default "googleapis.com" universe).
715
+ # @return [::String,nil]
716
+ #
717
+ class Configuration
718
+ extend ::Gapic::Config
719
+
720
+ # @private
721
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
722
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
723
+
724
+ config_attr :endpoint, nil, ::String, nil
725
+ config_attr :credentials, nil do |value|
726
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
727
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
728
+ allowed.any? { |klass| klass === value }
729
+ end
730
+ config_attr :scope, nil, ::String, ::Array, nil
731
+ config_attr :lib_name, nil, ::String, nil
732
+ config_attr :lib_version, nil, ::String, nil
733
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
734
+ config_attr :interceptors, nil, ::Array, nil
735
+ config_attr :timeout, nil, ::Numeric, nil
736
+ config_attr :metadata, nil, ::Hash, nil
737
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
738
+ config_attr :quota_project, nil, ::String, nil
739
+ config_attr :universe_domain, nil, ::String, nil
740
+
741
+ # @private
742
+ def initialize parent_config = nil
743
+ @parent_config = parent_config unless parent_config.nil?
744
+
745
+ yield self if block_given?
746
+ end
747
+
748
+ ##
749
+ # Configurations for individual RPCs
750
+ # @return [Rpcs]
751
+ #
752
+ def rpcs
753
+ @rpcs ||= begin
754
+ parent_rpcs = nil
755
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
756
+ Rpcs.new parent_rpcs
757
+ end
758
+ end
759
+
760
+ ##
761
+ # Configuration for the channel pool
762
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
763
+ #
764
+ def channel_pool
765
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
766
+ end
767
+
768
+ ##
769
+ # Configuration RPC class for the RegionsService API.
770
+ #
771
+ # Includes fields providing the configuration for each RPC in this service.
772
+ # Each configuration object is of type `Gapic::Config::Method` and includes
773
+ # the following configuration fields:
774
+ #
775
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
776
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
777
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
778
+ # include the following keys:
779
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
780
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
781
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
782
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
783
+ # trigger a retry.
784
+ #
785
+ class Rpcs
786
+ ##
787
+ # RPC-specific configuration for `get_region`
788
+ # @return [::Gapic::Config::Method]
789
+ #
790
+ attr_reader :get_region
791
+ ##
792
+ # RPC-specific configuration for `create_region`
793
+ # @return [::Gapic::Config::Method]
794
+ #
795
+ attr_reader :create_region
796
+ ##
797
+ # RPC-specific configuration for `update_region`
798
+ # @return [::Gapic::Config::Method]
799
+ #
800
+ attr_reader :update_region
801
+ ##
802
+ # RPC-specific configuration for `delete_region`
803
+ # @return [::Gapic::Config::Method]
804
+ #
805
+ attr_reader :delete_region
806
+ ##
807
+ # RPC-specific configuration for `list_regions`
808
+ # @return [::Gapic::Config::Method]
809
+ #
810
+ attr_reader :list_regions
811
+
812
+ # @private
813
+ def initialize parent_rpcs = nil
814
+ get_region_config = parent_rpcs.get_region if parent_rpcs.respond_to? :get_region
815
+ @get_region = ::Gapic::Config::Method.new get_region_config
816
+ create_region_config = parent_rpcs.create_region if parent_rpcs.respond_to? :create_region
817
+ @create_region = ::Gapic::Config::Method.new create_region_config
818
+ update_region_config = parent_rpcs.update_region if parent_rpcs.respond_to? :update_region
819
+ @update_region = ::Gapic::Config::Method.new update_region_config
820
+ delete_region_config = parent_rpcs.delete_region if parent_rpcs.respond_to? :delete_region
821
+ @delete_region = ::Gapic::Config::Method.new delete_region_config
822
+ list_regions_config = parent_rpcs.list_regions if parent_rpcs.respond_to? :list_regions
823
+ @list_regions = ::Gapic::Config::Method.new list_regions_config
824
+
825
+ yield self if block_given?
826
+ end
827
+ end
828
+ end
829
+ end
830
+ end
831
+ end
832
+ end
833
+ end
834
+ end
835
+ end