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.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +143 -8
- data/lib/google/shopping/merchant/accounts/v1beta/accessright_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/client.rb +452 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/client.rb +419 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest/service_stub.rb +130 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_issue_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_pb.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/client.rb +633 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/client.rb +586 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest/service_stub.rb +249 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/account_tax_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accountissue_pb.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accountissue_services_pb.rb +47 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_pb.rb +67 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/client.rb +942 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/paths.rb +80 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/client.rb +890 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest/service_stub.rb +423 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/accounts_services_pb.rb +71 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/client.rb +525 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/client.rb +485 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_identity_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/client.rb +524 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/client.rb +484 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/business_info_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessidentity_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/businessinfo_services_pb.rb +50 -0
- data/lib/google/shopping/merchant/accounts/v1beta/customerservice_pb.rb +48 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/client.rb +539 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/paths.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/client.rb +499 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/email_preferences_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_pb.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/emailpreferences_services_pb.rb +65 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/client.rb +724 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/client.rb +670 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest/service_stub.rb +310 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/homepage_services_pb.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +551 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +511 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +189 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +53 -0
- data/lib/google/shopping/merchant/accounts/v1beta/phoneverificationstate_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/client.rb +734 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/client.rb +680 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest/service_stub.rb +309 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service/rest.rb +64 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_service.rb +67 -0
- data/lib/google/shopping/merchant/accounts/v1beta/programs_services_pb.rb +65 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_pb.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/client.rb +835 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/client.rb +774 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest/service_stub.rb +368 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service/rest.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_service.rb +61 -0
- data/lib/google/shopping/merchant/accounts/v1beta/regions_services_pb.rb +62 -0
- data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/client.rb +526 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/client.rb +486 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest/service_stub.rb +190 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service/rest.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shipping_settings_service.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_pb.rb +83 -0
- data/lib/google/shopping/merchant/accounts/v1beta/shippingsettings_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1beta/tax_rule_pb.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/client.rb +522 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/client.rb +482 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest/service_stub.rb +189 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_agreement_state_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/client.rb +623 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/paths.rb +63 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/client.rb +584 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest/service_stub.rb +246 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/terms_of_service_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_pb.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofservice_services_pb.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate_services_pb.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/termsofservicekind_pb.rb +44 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_pb.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/client.rb +838 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/client.rb +777 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest/service_stub.rb +368 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_service.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/user_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/version.rb +7 -2
- data/lib/google/shopping/merchant/accounts/v1beta.rb +60 -0
- data/lib/google-shopping-merchant-accounts-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +420 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/accessright.rb +43 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/account_tax.rb +101 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/accountissue.rb +142 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/accounts.rb +219 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/businessidentity.rb +129 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/businessinfo.rb +72 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/customerservice.rb +43 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/emailpreferences.rb +82 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/homepage.rb +87 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +238 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/phoneverificationstate.rb +40 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/programs.rb +160 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/regions.rb +195 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/shippingsettings.rb +743 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/tax_rule.rb +88 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservice.rb +99 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.rb +132 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/termsofservicekind.rb +37 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/user.rb +156 -0
- data/proto_docs/google/shopping/type/types.rb +210 -0
- data/proto_docs/google/type/date.rb +53 -0
- data/proto_docs/google/type/datetime.rb +99 -0
- data/proto_docs/google/type/interval.rb +45 -0
- data/proto_docs/google/type/phone_number.rb +112 -0
- data/proto_docs/google/type/postal_address.rb +135 -0
- metadata +234 -10
@@ -0,0 +1,309 @@
|
|
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/shopping/merchant/accounts/v1beta/programs_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Shopping
|
23
|
+
module Merchant
|
24
|
+
module Accounts
|
25
|
+
module V1beta
|
26
|
+
module ProgramsService
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST service stub for the ProgramsService service.
|
30
|
+
# Service stub contains baseline method implementations
|
31
|
+
# including transcoding, making the REST call, and deserialing the response.
|
32
|
+
#
|
33
|
+
class ServiceStub
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
43
|
+
numeric_enums: true,
|
44
|
+
raise_faraday_errors: false
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# The effective universe domain
|
49
|
+
#
|
50
|
+
# @return [String]
|
51
|
+
#
|
52
|
+
def universe_domain
|
53
|
+
@client_stub.universe_domain
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# The effective endpoint
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
#
|
61
|
+
def endpoint
|
62
|
+
@client_stub.endpoint
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Baseline implementation for the get_program REST call
|
67
|
+
#
|
68
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest]
|
69
|
+
# A request object representing the call parameters. Required.
|
70
|
+
# @param options [::Gapic::CallOptions]
|
71
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
72
|
+
#
|
73
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
74
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program]
|
75
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
76
|
+
#
|
77
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::Program]
|
78
|
+
# A result object deserialized from the server's reply
|
79
|
+
def get_program request_pb, options = nil
|
80
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
81
|
+
|
82
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_program_request request_pb
|
83
|
+
query_string_params = if query_string_params.any?
|
84
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
85
|
+
else
|
86
|
+
{}
|
87
|
+
end
|
88
|
+
|
89
|
+
response = @client_stub.make_http_request(
|
90
|
+
verb,
|
91
|
+
uri: uri,
|
92
|
+
body: body || "",
|
93
|
+
params: query_string_params,
|
94
|
+
options: options
|
95
|
+
)
|
96
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
97
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true
|
98
|
+
|
99
|
+
yield result, operation if block_given?
|
100
|
+
result
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Baseline implementation for the list_programs REST call
|
105
|
+
#
|
106
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest]
|
107
|
+
# A request object representing the call parameters. Required.
|
108
|
+
# @param options [::Gapic::CallOptions]
|
109
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
110
|
+
#
|
111
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
112
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse]
|
113
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
114
|
+
#
|
115
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse]
|
116
|
+
# A result object deserialized from the server's reply
|
117
|
+
def list_programs request_pb, options = nil
|
118
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
119
|
+
|
120
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_programs_request request_pb
|
121
|
+
query_string_params = if query_string_params.any?
|
122
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
123
|
+
else
|
124
|
+
{}
|
125
|
+
end
|
126
|
+
|
127
|
+
response = @client_stub.make_http_request(
|
128
|
+
verb,
|
129
|
+
uri: uri,
|
130
|
+
body: body || "",
|
131
|
+
params: query_string_params,
|
132
|
+
options: options
|
133
|
+
)
|
134
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
135
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse.decode_json response.body, ignore_unknown_fields: true
|
136
|
+
|
137
|
+
yield result, operation if block_given?
|
138
|
+
result
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Baseline implementation for the enable_program REST call
|
143
|
+
#
|
144
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest]
|
145
|
+
# A request object representing the call parameters. Required.
|
146
|
+
# @param options [::Gapic::CallOptions]
|
147
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
148
|
+
#
|
149
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
150
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program]
|
151
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
152
|
+
#
|
153
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::Program]
|
154
|
+
# A result object deserialized from the server's reply
|
155
|
+
def enable_program request_pb, options = nil
|
156
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
157
|
+
|
158
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_enable_program_request request_pb
|
159
|
+
query_string_params = if query_string_params.any?
|
160
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
161
|
+
else
|
162
|
+
{}
|
163
|
+
end
|
164
|
+
|
165
|
+
response = @client_stub.make_http_request(
|
166
|
+
verb,
|
167
|
+
uri: uri,
|
168
|
+
body: body || "",
|
169
|
+
params: query_string_params,
|
170
|
+
options: options
|
171
|
+
)
|
172
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
173
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true
|
174
|
+
|
175
|
+
yield result, operation if block_given?
|
176
|
+
result
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Baseline implementation for the disable_program REST call
|
181
|
+
#
|
182
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest]
|
183
|
+
# A request object representing the call parameters. Required.
|
184
|
+
# @param options [::Gapic::CallOptions]
|
185
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
186
|
+
#
|
187
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
188
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::Program]
|
189
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
190
|
+
#
|
191
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::Program]
|
192
|
+
# A result object deserialized from the server's reply
|
193
|
+
def disable_program request_pb, options = nil
|
194
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
195
|
+
|
196
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_disable_program_request request_pb
|
197
|
+
query_string_params = if query_string_params.any?
|
198
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
199
|
+
else
|
200
|
+
{}
|
201
|
+
end
|
202
|
+
|
203
|
+
response = @client_stub.make_http_request(
|
204
|
+
verb,
|
205
|
+
uri: uri,
|
206
|
+
body: body || "",
|
207
|
+
params: query_string_params,
|
208
|
+
options: options
|
209
|
+
)
|
210
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
211
|
+
result = ::Google::Shopping::Merchant::Accounts::V1beta::Program.decode_json response.body, ignore_unknown_fields: true
|
212
|
+
|
213
|
+
yield result, operation if block_given?
|
214
|
+
result
|
215
|
+
end
|
216
|
+
|
217
|
+
##
|
218
|
+
# @private
|
219
|
+
#
|
220
|
+
# GRPC transcoding helper method for the get_program REST call
|
221
|
+
#
|
222
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest]
|
223
|
+
# A request object representing the call parameters. Required.
|
224
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
225
|
+
# Uri, Body, Query string parameters
|
226
|
+
def self.transcode_get_program_request request_pb
|
227
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
228
|
+
.with_bindings(
|
229
|
+
uri_method: :get,
|
230
|
+
uri_template: "/accounts/v1beta/{name}",
|
231
|
+
matches: [
|
232
|
+
["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false]
|
233
|
+
]
|
234
|
+
)
|
235
|
+
transcoder.transcode request_pb
|
236
|
+
end
|
237
|
+
|
238
|
+
##
|
239
|
+
# @private
|
240
|
+
#
|
241
|
+
# GRPC transcoding helper method for the list_programs REST call
|
242
|
+
#
|
243
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest]
|
244
|
+
# A request object representing the call parameters. Required.
|
245
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
246
|
+
# Uri, Body, Query string parameters
|
247
|
+
def self.transcode_list_programs_request request_pb
|
248
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
249
|
+
.with_bindings(
|
250
|
+
uri_method: :get,
|
251
|
+
uri_template: "/accounts/v1beta/{parent}/programs",
|
252
|
+
matches: [
|
253
|
+
["parent", %r{^accounts/[^/]+/?$}, false]
|
254
|
+
]
|
255
|
+
)
|
256
|
+
transcoder.transcode request_pb
|
257
|
+
end
|
258
|
+
|
259
|
+
##
|
260
|
+
# @private
|
261
|
+
#
|
262
|
+
# GRPC transcoding helper method for the enable_program REST call
|
263
|
+
#
|
264
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest]
|
265
|
+
# A request object representing the call parameters. Required.
|
266
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
267
|
+
# Uri, Body, Query string parameters
|
268
|
+
def self.transcode_enable_program_request request_pb
|
269
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
270
|
+
.with_bindings(
|
271
|
+
uri_method: :post,
|
272
|
+
uri_template: "/accounts/v1beta/{name}:enable",
|
273
|
+
body: "*",
|
274
|
+
matches: [
|
275
|
+
["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false]
|
276
|
+
]
|
277
|
+
)
|
278
|
+
transcoder.transcode request_pb
|
279
|
+
end
|
280
|
+
|
281
|
+
##
|
282
|
+
# @private
|
283
|
+
#
|
284
|
+
# GRPC transcoding helper method for the disable_program REST call
|
285
|
+
#
|
286
|
+
# @param request_pb [::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest]
|
287
|
+
# A request object representing the call parameters. Required.
|
288
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
289
|
+
# Uri, Body, Query string parameters
|
290
|
+
def self.transcode_disable_program_request request_pb
|
291
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
292
|
+
.with_bindings(
|
293
|
+
uri_method: :post,
|
294
|
+
uri_template: "/accounts/v1beta/{name}:disable",
|
295
|
+
body: "*",
|
296
|
+
matches: [
|
297
|
+
["name", %r{^accounts/[^/]+/programs/[^/]+/?$}, false]
|
298
|
+
]
|
299
|
+
)
|
300
|
+
transcoder.transcode request_pb
|
301
|
+
end
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
309
|
+
end
|
@@ -0,0 +1,64 @@
|
|
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 "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/shopping/merchant/accounts/v1beta/version"
|
24
|
+
|
25
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/credentials"
|
26
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/paths"
|
27
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/rest/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Shopping
|
31
|
+
module Merchant
|
32
|
+
module Accounts
|
33
|
+
module V1beta
|
34
|
+
##
|
35
|
+
# Service for program management.
|
36
|
+
#
|
37
|
+
# Programs provide a mechanism for adding functionality to merchant accounts. A
|
38
|
+
# typical example of this is the [Free product
|
39
|
+
# listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU)
|
40
|
+
# program, which enables products from a merchant's store to be shown across
|
41
|
+
# Google for free.
|
42
|
+
#
|
43
|
+
# This service exposes methods to retrieve a merchant's
|
44
|
+
# participation in all available programs, in addition to methods for
|
45
|
+
# explicitly enabling or disabling participation in each program.
|
46
|
+
#
|
47
|
+
# To load this service and instantiate a REST client:
|
48
|
+
#
|
49
|
+
# require "google/shopping/merchant/accounts/v1beta/programs_service/rest"
|
50
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new
|
51
|
+
#
|
52
|
+
module ProgramsService
|
53
|
+
# Client for the REST transport
|
54
|
+
module Rest
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
64
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,67 @@
|
|
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 "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/shopping/merchant/accounts/v1beta/version"
|
24
|
+
|
25
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/credentials"
|
26
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/paths"
|
27
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/client"
|
28
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Shopping
|
32
|
+
module Merchant
|
33
|
+
module Accounts
|
34
|
+
module V1beta
|
35
|
+
##
|
36
|
+
# Service for program management.
|
37
|
+
#
|
38
|
+
# Programs provide a mechanism for adding functionality to merchant accounts. A
|
39
|
+
# typical example of this is the [Free product
|
40
|
+
# listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU)
|
41
|
+
# program, which enables products from a merchant's store to be shown across
|
42
|
+
# Google for free.
|
43
|
+
#
|
44
|
+
# This service exposes methods to retrieve a merchant's
|
45
|
+
# participation in all available programs, in addition to methods for
|
46
|
+
# explicitly enabling or disabling participation in each program.
|
47
|
+
#
|
48
|
+
# @example Load this service and instantiate a gRPC client
|
49
|
+
#
|
50
|
+
# require "google/shopping/merchant/accounts/v1beta/programs_service"
|
51
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Client.new
|
52
|
+
#
|
53
|
+
# @example Load this service and instantiate a REST client
|
54
|
+
#
|
55
|
+
# require "google/shopping/merchant/accounts/v1beta/programs_service/rest"
|
56
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::ProgramsService::Rest::Client.new
|
57
|
+
#
|
58
|
+
module ProgramsService
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
helper_path = ::File.join __dir__, "programs_service", "helpers.rb"
|
67
|
+
require "google/shopping/merchant/accounts/v1beta/programs_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/shopping/merchant/accounts/v1beta/programs.proto for package 'google.shopping.merchant.accounts.v1beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2024 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/shopping/merchant/accounts/v1beta/programs_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Shopping
|
24
|
+
module Merchant
|
25
|
+
module Accounts
|
26
|
+
module V1beta
|
27
|
+
module ProgramsService
|
28
|
+
# Service for program management.
|
29
|
+
#
|
30
|
+
# Programs provide a mechanism for adding functionality to merchant accounts. A
|
31
|
+
# typical example of this is the [Free product
|
32
|
+
# listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU)
|
33
|
+
# program, which enables products from a merchant's store to be shown across
|
34
|
+
# Google for free.
|
35
|
+
#
|
36
|
+
# This service exposes methods to retrieve a merchant's
|
37
|
+
# participation in all available programs, in addition to methods for
|
38
|
+
# explicitly enabling or disabling participation in each program.
|
39
|
+
class Service
|
40
|
+
|
41
|
+
include ::GRPC::GenericService
|
42
|
+
|
43
|
+
self.marshal_class_method = :encode
|
44
|
+
self.unmarshal_class_method = :decode
|
45
|
+
self.service_name = 'google.shopping.merchant.accounts.v1beta.ProgramsService'
|
46
|
+
|
47
|
+
# Retrieves the specified program for the account.
|
48
|
+
rpc :GetProgram, ::Google::Shopping::Merchant::Accounts::V1beta::GetProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program
|
49
|
+
# Retrieves all programs for the account.
|
50
|
+
rpc :ListPrograms, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsRequest, ::Google::Shopping::Merchant::Accounts::V1beta::ListProgramsResponse
|
51
|
+
# Enable participation in the specified program for the account. Executing
|
52
|
+
# this method requires admin access.
|
53
|
+
rpc :EnableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::EnableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program
|
54
|
+
# Disable participation in the specified program for the account. Executing
|
55
|
+
# this method requires admin access.
|
56
|
+
rpc :DisableProgram, ::Google::Shopping::Merchant::Accounts::V1beta::DisableProgramRequest, ::Google::Shopping::Merchant::Accounts::V1beta::Program
|
57
|
+
end
|
58
|
+
|
59
|
+
Stub = Service.rpc_stub_class
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/shopping/merchant/accounts/v1beta/regions.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
require 'google/api/field_behavior_pb'
|
10
|
+
require 'google/api/resource_pb'
|
11
|
+
require 'google/protobuf/empty_pb'
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
13
|
+
require 'google/protobuf/wrappers_pb'
|
14
|
+
|
15
|
+
|
16
|
+
descriptor_data = "\n6google/shopping/merchant/accounts/v1beta/regions.proto\x12(google.shopping.merchant.accounts.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"K\n\x10GetRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\xb0\x01\n\x13\x43reateRegionRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tregion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x06region\x18\x03 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\"\x92\x01\n\x13UpdateRegionRequest\x12\x45\n\x06region\x18\x01 \x01(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.RegionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x13\x44\x65leteRegionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!merchantapi.googleapis.com/Region\"\x81\x01\n\x12ListRegionsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"q\n\x13ListRegionsResponse\x12\x41\n\x07regions\x18\x01 \x03(\x0b\x32\x30.google.shopping.merchant.accounts.v1beta.Region\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x05\n\x06Region\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12^\n\x10postal_code_area\x18\x03 \x01(\x0b\x32?.google.shopping.merchant.accounts.v1beta.Region.PostalCodeAreaB\x03\xe0\x41\x01\x12[\n\x0egeotarget_area\x18\x04 \x01(\x0b\x32>.google.shopping.merchant.accounts.v1beta.Region.GeoTargetAreaB\x03\xe0\x41\x01\x12\x44\n\x1bregional_inventory_eligible\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12:\n\x11shipping_eligible\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x1a\xcf\x01\n\x0ePostalCodeArea\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12j\n\x0cpostal_codes\x18\x02 \x03(\x0b\x32O.google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRangeB\x03\xe0\x41\x02\x1a\x37\n\x0fPostalCodeRange\x12\x12\n\x05\x62\x65gin\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x65nd\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x34\n\rGeoTargetArea\x12#\n\x16geotarget_criteria_ids\x18\x01 \x03(\x03\x42\x03\xe0\x41\x02:\\\xea\x41Y\n!merchantapi.googleapis.com/Region\x12#accounts/{account}/regions/{region}*\x07regions2\x06regionB\x0f\n\r_display_name2\xb9\x08\n\x0eRegionsService\x12\xb6\x01\n\tGetRegion\x12:.google.shopping.merchant.accounts.v1beta.GetRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xd7\x01\n\x0c\x43reateRegion\x12=.google.shopping.merchant.accounts.v1beta.CreateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"V\xda\x41\x17parent,region,region_id\x82\xd3\xe4\x93\x02\x36\",/accounts/v1beta/{parent=accounts/*}/regions:\x06region\x12\xd9\x01\n\x0cUpdateRegion\x12=.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest\x1a\x30.google.shopping.merchant.accounts.v1beta.Region\"X\xda\x41\x12region,update_mask\x82\xd3\xe4\x93\x02=23/accounts/v1beta/{region.name=accounts/*/regions/*}:\x06region\x12\xa2\x01\n\x0c\x44\x65leteRegion\x12=.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/accounts/v1beta/{name=accounts/*/regions/*}\x12\xc9\x01\n\x0bListRegions\x12<.google.shopping.merchant.accounts.v1beta.ListRegionsRequest\x1a=.google.shopping.merchant.accounts.v1beta.ListRegionsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/accounts/v1beta/{parent=accounts/*}/regions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8e\x01\n,com.google.shopping.merchant.accounts.v1betaB\x0cRegionsProtoP\x01ZNcloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspbb\x06proto3"
|
17
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
32
|
+
["google.protobuf.BoolValue", "google/protobuf/wrappers.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
42
|
+
end
|
43
|
+
|
44
|
+
module Google
|
45
|
+
module Shopping
|
46
|
+
module Merchant
|
47
|
+
module Accounts
|
48
|
+
module V1beta
|
49
|
+
GetRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.GetRegionRequest").msgclass
|
50
|
+
CreateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.CreateRegionRequest").msgclass
|
51
|
+
UpdateRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.UpdateRegionRequest").msgclass
|
52
|
+
DeleteRegionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.DeleteRegionRequest").msgclass
|
53
|
+
ListRegionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsRequest").msgclass
|
54
|
+
ListRegionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.ListRegionsResponse").msgclass
|
55
|
+
Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region").msgclass
|
56
|
+
Region::PostalCodeArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea").msgclass
|
57
|
+
Region::PostalCodeArea::PostalCodeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.PostalCodeArea.PostalCodeRange").msgclass
|
58
|
+
Region::GeoTargetArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.accounts.v1beta.Region.GeoTargetArea").msgclass
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|