google-api-client 0.9.6 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/api_names.yaml +15 -0
  4. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  5. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +75 -12
  6. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +25 -5
  7. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +6 -2
  8. data/generated/google/apis/adexchangeseller_v2_0.rb +1 -1
  9. data/generated/google/apis/admin_directory_v1/classes.rb +1 -1
  10. data/generated/google/apis/admin_directory_v1/representations.rb +1 -2
  11. data/generated/google/apis/adsense_v1_4.rb +1 -1
  12. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  13. data/generated/google/apis/analytics_v3.rb +1 -1
  14. data/generated/google/apis/analyticsreporting_v4.rb +37 -0
  15. data/generated/google/apis/analyticsreporting_v4/classes.rb +1385 -0
  16. data/generated/google/apis/analyticsreporting_v4/representations.rb +597 -0
  17. data/generated/google/apis/analyticsreporting_v4/service.rb +88 -0
  18. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  19. data/generated/google/apis/androidenterprise_v1/classes.rb +98 -2
  20. data/generated/google/apis/androidenterprise_v1/representations.rb +48 -0
  21. data/generated/google/apis/androidenterprise_v1/service.rb +63 -1
  22. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  23. data/generated/google/apis/androidpublisher_v2/classes.rb +268 -0
  24. data/generated/google/apis/androidpublisher_v2/representations.rb +142 -0
  25. data/generated/google/apis/androidpublisher_v2/service.rb +121 -0
  26. data/generated/google/apis/appstate_v1.rb +1 -1
  27. data/generated/google/apis/autoscaler_v1beta2.rb +1 -1
  28. data/generated/google/apis/autoscaler_v1beta2/classes.rb +10 -47
  29. data/generated/google/apis/autoscaler_v1beta2/representations.rb +1 -18
  30. data/generated/google/apis/autoscaler_v1beta2/service.rb +4 -4
  31. data/generated/google/apis/bigquery_v2.rb +1 -1
  32. data/generated/google/apis/bigquery_v2/classes.rb +97 -61
  33. data/generated/google/apis/bigquery_v2/representations.rb +23 -18
  34. data/generated/google/apis/calendar_v3.rb +1 -1
  35. data/generated/google/apis/classroom_v1.rb +23 -2
  36. data/generated/google/apis/classroom_v1/classes.rb +920 -6
  37. data/generated/google/apis/classroom_v1/representations.rb +419 -0
  38. data/generated/google/apis/classroom_v1/service.rb +507 -1
  39. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  40. data/generated/google/apis/cloudbuild_v1/classes.rb +30 -23
  41. data/generated/google/apis/cloudbuild_v1/representations.rb +4 -3
  42. data/generated/google/apis/cloudbuild_v1/service.rb +25 -25
  43. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  44. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  45. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  46. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +55 -0
  47. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +40 -0
  48. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +35 -0
  49. data/generated/google/apis/cloudtrace_v1.rb +11 -3
  50. data/generated/google/apis/cloudtrace_v1/classes.rb +5 -5
  51. data/generated/google/apis/cloudtrace_v1/service.rb +8 -6
  52. data/generated/google/apis/compute_beta.rb +2 -2
  53. data/generated/google/apis/compute_beta/classes.rb +162 -32
  54. data/generated/google/apis/compute_beta/representations.rb +58 -0
  55. data/generated/google/apis/compute_beta/service.rb +392 -267
  56. data/generated/google/apis/compute_v1.rb +2 -2
  57. data/generated/google/apis/compute_v1/classes.rb +21 -9
  58. data/generated/google/apis/compute_v1/representations.rb +1 -0
  59. data/generated/google/apis/compute_v1/service.rb +291 -253
  60. data/generated/google/apis/container_v1.rb +1 -1
  61. data/generated/google/apis/container_v1/classes.rb +148 -0
  62. data/generated/google/apis/container_v1/representations.rb +55 -0
  63. data/generated/google/apis/container_v1/service.rb +161 -0
  64. data/generated/google/apis/content_v2.rb +1 -1
  65. data/generated/google/apis/content_v2/classes.rb +18 -6
  66. data/generated/google/apis/content_v2/representations.rb +1 -0
  67. data/generated/google/apis/customsearch_v1.rb +1 -1
  68. data/generated/google/apis/dataproc_v1.rb +2 -11
  69. data/generated/google/apis/dataproc_v1/classes.rb +0 -19
  70. data/generated/google/apis/dataproc_v1/representations.rb +0 -13
  71. data/generated/google/apis/dataproc_v1/service.rb +8 -87
  72. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  73. data/generated/google/apis/dfareporting_v2_3.rb +1 -1
  74. data/generated/google/apis/dfareporting_v2_3/classes.rb +41 -32
  75. data/generated/google/apis/discovery_v1.rb +2 -2
  76. data/generated/google/apis/discovery_v1/service.rb +2 -2
  77. data/generated/google/apis/dns_v1.rb +2 -3
  78. data/generated/google/apis/dns_v1/service.rb +1 -2
  79. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  80. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  81. data/generated/google/apis/drive_v2.rb +3 -2
  82. data/generated/google/apis/drive_v2/service.rb +2 -1
  83. data/generated/google/apis/drive_v3.rb +3 -2
  84. data/generated/google/apis/drive_v3/service.rb +2 -1
  85. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  86. data/generated/google/apis/games_management_v1management.rb +1 -1
  87. data/generated/google/apis/games_management_v1management/classes.rb +34 -0
  88. data/generated/google/apis/games_management_v1management/representations.rb +16 -0
  89. data/generated/google/apis/games_v1.rb +1 -1
  90. data/generated/google/apis/games_v1/classes.rb +34 -0
  91. data/generated/google/apis/games_v1/representations.rb +16 -0
  92. data/generated/google/apis/games_v1/service.rb +212 -53
  93. data/generated/google/apis/genomics_v1.rb +1 -1
  94. data/generated/google/apis/genomics_v1/classes.rb +18 -0
  95. data/generated/google/apis/genomics_v1/representations.rb +3 -0
  96. data/generated/google/apis/genomics_v1/service.rb +2 -2
  97. data/generated/google/apis/gmail_v1.rb +1 -1
  98. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  99. data/generated/google/apis/identitytoolkit_v3/classes.rb +19 -7
  100. data/generated/google/apis/identitytoolkit_v3/representations.rb +3 -1
  101. data/generated/google/apis/mybusiness_v3.rb +32 -0
  102. data/generated/google/apis/mybusiness_v3/classes.rb +1864 -0
  103. data/generated/google/apis/mybusiness_v3/representations.rb +741 -0
  104. data/generated/google/apis/mybusiness_v3/service.rb +960 -0
  105. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  106. data/generated/google/apis/plus_domains_v1.rb +2 -2
  107. data/generated/google/apis/plus_domains_v1/service.rb +1 -1
  108. data/generated/google/apis/plus_v1.rb +2 -2
  109. data/generated/google/apis/plus_v1/service.rb +1 -1
  110. data/generated/google/apis/prediction_v1_6.rb +4 -1
  111. data/generated/google/apis/proximitybeacon_v1beta1.rb +5 -2
  112. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +169 -22
  113. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +36 -1
  114. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +254 -39
  115. data/generated/google/apis/replicapool_v1beta2.rb +3 -3
  116. data/generated/google/apis/replicapool_v1beta2/service.rb +2 -2
  117. data/generated/google/apis/resourceviews_v1beta2.rb +1 -1
  118. data/generated/google/apis/script_v1.rb +6 -3
  119. data/generated/google/apis/script_v1/service.rb +2 -2
  120. data/generated/google/apis/sheets_v4.rb +43 -0
  121. data/generated/google/apis/sheets_v4/classes.rb +5425 -0
  122. data/generated/google/apis/sheets_v4/representations.rb +2070 -0
  123. data/generated/google/apis/sheets_v4/service.rb +402 -0
  124. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  125. data/generated/google/apis/sqladmin_v1beta4/classes.rb +19 -4
  126. data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
  127. data/generated/google/apis/storage_v1.rb +1 -1
  128. data/generated/google/apis/storage_v1/classes.rb +2 -1
  129. data/generated/google/apis/taskqueue_v1beta2.rb +2 -2
  130. data/generated/google/apis/taskqueue_v1beta2/service.rb +1 -1
  131. data/generated/google/apis/vision_v1.rb +4 -5
  132. data/generated/google/apis/vision_v1/classes.rb +69 -68
  133. data/generated/google/apis/vision_v1/representations.rb +13 -13
  134. data/generated/google/apis/vision_v1/service.rb +3 -4
  135. data/generated/google/apis/youtube_analytics_v1.rb +2 -2
  136. data/generated/google/apis/youtube_analytics_v1/service.rb +1 -1
  137. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  138. data/generated/google/apis/youtube_partner_v1/classes.rb +121 -0
  139. data/generated/google/apis/youtube_partner_v1/representations.rb +50 -0
  140. data/generated/google/apis/youtube_partner_v1/service.rb +40 -0
  141. data/generated/google/apis/youtube_v3.rb +1 -1
  142. data/generated/google/apis/youtube_v3/classes.rb +24 -0
  143. data/generated/google/apis/youtube_v3/representations.rb +4 -0
  144. data/generated/google/apis/youtubereporting_v1.rb +3 -3
  145. data/generated/google/apis/youtubereporting_v1/classes.rb +19 -0
  146. data/generated/google/apis/youtubereporting_v1/representations.rb +3 -0
  147. data/generated/google/apis/youtubereporting_v1/service.rb +3 -4
  148. data/lib/google/apis/version.rb +1 -1
  149. metadata +14 -2
@@ -0,0 +1,960 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module MybusinessV3
23
+ # Google My Business API
24
+ #
25
+ # The Google My Business API provides an interface for managing business
26
+ # location information on Google.
27
+ #
28
+ # @example
29
+ # require 'google/apis/mybusiness_v3'
30
+ #
31
+ # Mybusiness = Google::Apis::MybusinessV3 # Alias the module
32
+ # service = Mybusiness::MybusinessService.new
33
+ #
34
+ # @see https://developers.google.com/my-business/
35
+ class MybusinessService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://mybusiness.googleapis.com/', '')
48
+ end
49
+
50
+ # Lists all of the accounts for the authenticated user. This includes all
51
+ # accounts that the user owns, as well as any accounts for which the user
52
+ # has management rights.
53
+ # @param [Fixnum] page_size
54
+ # How many accounts to fetch per page. Default is 50,
55
+ # minimum is 1, and maximum page size is 50.
56
+ # @param [String] page_token
57
+ # If specified, the next page of accounts is retrieved. The `pageToken` is
58
+ # returned when a call to `accounts.list` returns more results than can fit
59
+ # into the requested page size.
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
62
+ # @param [String] quota_user
63
+ # Available to use for quota purposes for server-side applications. Can be any
64
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
65
+ # @param [Google::Apis::RequestOptions] options
66
+ # Request-specific options
67
+ #
68
+ # @yield [result, err] Result & error if block supplied
69
+ # @yieldparam result [Google::Apis::MybusinessV3::ListAccountsResponse] parsed result object
70
+ # @yieldparam err [StandardError] error object if request failed
71
+ #
72
+ # @return [Google::Apis::MybusinessV3::ListAccountsResponse]
73
+ #
74
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
75
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
76
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
77
+ def list_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
78
+ command = make_simple_command(:get, 'v3/accounts', options)
79
+ command.response_representation = Google::Apis::MybusinessV3::ListAccountsResponse::Representation
80
+ command.response_class = Google::Apis::MybusinessV3::ListAccountsResponse
81
+ command.query['pageSize'] = page_size unless page_size.nil?
82
+ command.query['pageToken'] = page_token unless page_token.nil?
83
+ command.query['fields'] = fields unless fields.nil?
84
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
85
+ execute_or_queue_command(command, &block)
86
+ end
87
+
88
+ # Gets the specified account. Returns `NOT_FOUND` if the
89
+ # account does not exist or if the caller does not have access rights to it.
90
+ # @param [String] name
91
+ # The name of the account to fetch.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::MybusinessV3::Account] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::MybusinessV3::Account]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def get_account(name, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v3/{+name}', options)
111
+ command.response_representation = Google::Apis::MybusinessV3::Account::Representation
112
+ command.response_class = Google::Apis::MybusinessV3::Account
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Updates the specified business account. Personal accounts cannot be
120
+ # updated using this method.
121
+ # Note: At this time the only editable field for an account is
122
+ # `account_name`.
123
+ # Any other fields passed in (such as `type`, `role`, and `verified`) is
124
+ # ignored.
125
+ # @param [String] name
126
+ # The name of the account to update.
127
+ # @param [Google::Apis::MybusinessV3::Account] account_object
128
+ # @param [String] language_code
129
+ # The language of the account update.
130
+ # @param [Boolean] validate_only
131
+ # If true, the request is validated without actually updating the account.
132
+ # @param [String] fields
133
+ # Selector specifying which fields to include in a partial response.
134
+ # @param [String] quota_user
135
+ # Available to use for quota purposes for server-side applications. Can be any
136
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
137
+ # @param [Google::Apis::RequestOptions] options
138
+ # Request-specific options
139
+ #
140
+ # @yield [result, err] Result & error if block supplied
141
+ # @yieldparam result [Google::Apis::MybusinessV3::Account] parsed result object
142
+ # @yieldparam err [StandardError] error object if request failed
143
+ #
144
+ # @return [Google::Apis::MybusinessV3::Account]
145
+ #
146
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
149
+ def update_account(name, account_object = nil, language_code: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
150
+ command = make_simple_command(:put, 'v3/{+name}', options)
151
+ command.request_representation = Google::Apis::MybusinessV3::Account::Representation
152
+ command.request_object = account_object
153
+ command.response_representation = Google::Apis::MybusinessV3::Account::Representation
154
+ command.response_class = Google::Apis::MybusinessV3::Account
155
+ command.params['name'] = name unless name.nil?
156
+ command.query['languageCode'] = language_code unless language_code.nil?
157
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
158
+ command.query['fields'] = fields unless fields.nil?
159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
160
+ execute_or_queue_command(command, &block)
161
+ end
162
+
163
+ # Lists the admins for the specified account.
164
+ # @param [String] name
165
+ # The name of the account from which to retrieve a list of admins.
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::MybusinessV3::ListAccountAdminsResponse] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::MybusinessV3::ListAccountAdminsResponse]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def list_account_admins(name, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:get, 'v3/{+name}/admins', options)
185
+ command.response_representation = Google::Apis::MybusinessV3::ListAccountAdminsResponse::Representation
186
+ command.response_class = Google::Apis::MybusinessV3::ListAccountAdminsResponse
187
+ command.params['name'] = name unless name.nil?
188
+ command.query['fields'] = fields unless fields.nil?
189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
190
+ execute_or_queue_command(command, &block)
191
+ end
192
+
193
+ # Invites the specified user to become an administrator on the specified
194
+ # account. The invitee must accept the invitation in order to be granted
195
+ # access to the account.
196
+ # @param [String] name
197
+ # The resource name. For account admins, this is in the form:
198
+ # `accounts/`account_id`/admins/`admin_id``
199
+ # For location admins, this is in the form:
200
+ # `accounts/`account_id`/locations/`location_id`/admins/`admin_id``
201
+ # @param [Google::Apis::MybusinessV3::Admin] admin_object
202
+ # @param [String] fields
203
+ # Selector specifying which fields to include in a partial response.
204
+ # @param [String] quota_user
205
+ # Available to use for quota purposes for server-side applications. Can be any
206
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
207
+ # @param [Google::Apis::RequestOptions] options
208
+ # Request-specific options
209
+ #
210
+ # @yield [result, err] Result & error if block supplied
211
+ # @yieldparam result [Google::Apis::MybusinessV3::Admin] parsed result object
212
+ # @yieldparam err [StandardError] error object if request failed
213
+ #
214
+ # @return [Google::Apis::MybusinessV3::Admin]
215
+ #
216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
219
+ def create_account_admin(name, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
220
+ command = make_simple_command(:post, 'v3/{+name}/admins', options)
221
+ command.request_representation = Google::Apis::MybusinessV3::Admin::Representation
222
+ command.request_object = admin_object
223
+ command.response_representation = Google::Apis::MybusinessV3::Admin::Representation
224
+ command.response_class = Google::Apis::MybusinessV3::Admin
225
+ command.params['name'] = name unless name.nil?
226
+ command.query['fields'] = fields unless fields.nil?
227
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
228
+ execute_or_queue_command(command, &block)
229
+ end
230
+
231
+ # Removes the specified admin from the specified account.
232
+ # @param [String] name
233
+ # The resource name of the admin to remove from the account.
234
+ # @param [String] fields
235
+ # Selector specifying which fields to include in a partial response.
236
+ # @param [String] quota_user
237
+ # Available to use for quota purposes for server-side applications. Can be any
238
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
239
+ # @param [Google::Apis::RequestOptions] options
240
+ # Request-specific options
241
+ #
242
+ # @yield [result, err] Result & error if block supplied
243
+ # @yieldparam result [Google::Apis::MybusinessV3::Empty] parsed result object
244
+ # @yieldparam err [StandardError] error object if request failed
245
+ #
246
+ # @return [Google::Apis::MybusinessV3::Empty]
247
+ #
248
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
249
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
250
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
251
+ def delete_account_admin(name, fields: nil, quota_user: nil, options: nil, &block)
252
+ command = make_simple_command(:delete, 'v3/{+name}', options)
253
+ command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
254
+ command.response_class = Google::Apis::MybusinessV3::Empty
255
+ command.params['name'] = name unless name.nil?
256
+ command.query['fields'] = fields unless fields.nil?
257
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
258
+ execute_or_queue_command(command, &block)
259
+ end
260
+
261
+ # Lists the locations for the specified account.
262
+ # @param [String] name
263
+ # The name of the account to fetch locations from.
264
+ # @param [Fixnum] page_size
265
+ # How many locations to fetch per page. Default is 100,
266
+ # minimum is 1, and maximum page size is 100.
267
+ # @param [String] page_token
268
+ # If specified, it fetches the next `page` of locations. The page token
269
+ # is returned by previous calls to ListLocations when there were more
270
+ # locations than could fit in the requested page size.
271
+ # @param [String] filter
272
+ # A filter constraining the locations to return. The response includes
273
+ # only entries that match the filter. If `filter` is empty, then
274
+ # constraints are applied and all locations (paginated) are retrieved for
275
+ # the requested account.
276
+ # Further information on valid filter fields and example usage is available
277
+ # [here](https://developers.google.com/my-business/content/location-data#
278
+ # filter_results_when_listing_locations)
279
+ # .
280
+ # @param [String] fields
281
+ # Selector specifying which fields to include in a partial response.
282
+ # @param [String] quota_user
283
+ # Available to use for quota purposes for server-side applications. Can be any
284
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
285
+ # @param [Google::Apis::RequestOptions] options
286
+ # Request-specific options
287
+ #
288
+ # @yield [result, err] Result & error if block supplied
289
+ # @yieldparam result [Google::Apis::MybusinessV3::ListLocationsResponse] parsed result object
290
+ # @yieldparam err [StandardError] error object if request failed
291
+ #
292
+ # @return [Google::Apis::MybusinessV3::ListLocationsResponse]
293
+ #
294
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
295
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
296
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
297
+ def list_account_locations(name, page_size: nil, page_token: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
298
+ command = make_simple_command(:get, 'v3/{+name}/locations', options)
299
+ command.response_representation = Google::Apis::MybusinessV3::ListLocationsResponse::Representation
300
+ command.response_class = Google::Apis::MybusinessV3::ListLocationsResponse
301
+ command.params['name'] = name unless name.nil?
302
+ command.query['pageSize'] = page_size unless page_size.nil?
303
+ command.query['pageToken'] = page_token unless page_token.nil?
304
+ command.query['filter'] = filter unless filter.nil?
305
+ command.query['fields'] = fields unless fields.nil?
306
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
307
+ execute_or_queue_command(command, &block)
308
+ end
309
+
310
+ # Gets the specified location. Returns `NOT_FOUND` if the
311
+ # location does not exist.
312
+ # @param [String] name
313
+ # The name of the location to fetch.
314
+ # @param [String] fields
315
+ # Selector specifying which fields to include in a partial response.
316
+ # @param [String] quota_user
317
+ # Available to use for quota purposes for server-side applications. Can be any
318
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
319
+ # @param [Google::Apis::RequestOptions] options
320
+ # Request-specific options
321
+ #
322
+ # @yield [result, err] Result & error if block supplied
323
+ # @yieldparam result [Google::Apis::MybusinessV3::Location] parsed result object
324
+ # @yieldparam err [StandardError] error object if request failed
325
+ #
326
+ # @return [Google::Apis::MybusinessV3::Location]
327
+ #
328
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
329
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
330
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
331
+ def get_account_location(name, fields: nil, quota_user: nil, options: nil, &block)
332
+ command = make_simple_command(:get, 'v3/{+name}', options)
333
+ command.response_representation = Google::Apis::MybusinessV3::Location::Representation
334
+ command.response_class = Google::Apis::MybusinessV3::Location
335
+ command.params['name'] = name unless name.nil?
336
+ command.query['fields'] = fields unless fields.nil?
337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
338
+ execute_or_queue_command(command, &block)
339
+ end
340
+
341
+ # Gets all of the specified locations in the given account.
342
+ # @param [String] name
343
+ # The name of the account from which to fetch locations.
344
+ # @param [Google::Apis::MybusinessV3::BatchGetLocationsRequest] batch_get_locations_request_object
345
+ # @param [String] fields
346
+ # Selector specifying which fields to include in a partial response.
347
+ # @param [String] quota_user
348
+ # Available to use for quota purposes for server-side applications. Can be any
349
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
350
+ # @param [Google::Apis::RequestOptions] options
351
+ # Request-specific options
352
+ #
353
+ # @yield [result, err] Result & error if block supplied
354
+ # @yieldparam result [Google::Apis::MybusinessV3::BatchGetLocationsResponse] parsed result object
355
+ # @yieldparam err [StandardError] error object if request failed
356
+ #
357
+ # @return [Google::Apis::MybusinessV3::BatchGetLocationsResponse]
358
+ #
359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
362
+ def batch_get_locations(name, batch_get_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
363
+ command = make_simple_command(:post, 'v3/{+name}/locations:batchGet', options)
364
+ command.request_representation = Google::Apis::MybusinessV3::BatchGetLocationsRequest::Representation
365
+ command.request_object = batch_get_locations_request_object
366
+ command.response_representation = Google::Apis::MybusinessV3::BatchGetLocationsResponse::Representation
367
+ command.response_class = Google::Apis::MybusinessV3::BatchGetLocationsResponse
368
+ command.params['name'] = name unless name.nil?
369
+ command.query['fields'] = fields unless fields.nil?
370
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
371
+ execute_or_queue_command(command, &block)
372
+ end
373
+
374
+ # Gets the Google updated version of the specified location.
375
+ # Returns `NOT_FOUND` if the location does not exist.
376
+ # @param [String] name
377
+ # The name of the location to fetch.
378
+ # @param [String] fields
379
+ # Selector specifying which fields to include in a partial response.
380
+ # @param [String] quota_user
381
+ # Available to use for quota purposes for server-side applications. Can be any
382
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
383
+ # @param [Google::Apis::RequestOptions] options
384
+ # Request-specific options
385
+ #
386
+ # @yield [result, err] Result & error if block supplied
387
+ # @yieldparam result [Google::Apis::MybusinessV3::GoogleUpdatedLocation] parsed result object
388
+ # @yieldparam err [StandardError] error object if request failed
389
+ #
390
+ # @return [Google::Apis::MybusinessV3::GoogleUpdatedLocation]
391
+ #
392
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
393
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
394
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
395
+ def get_google_updated_account_location(name, fields: nil, quota_user: nil, options: nil, &block)
396
+ command = make_simple_command(:get, 'v3/{+name}:googleUpdated', options)
397
+ command.response_representation = Google::Apis::MybusinessV3::GoogleUpdatedLocation::Representation
398
+ command.response_class = Google::Apis::MybusinessV3::GoogleUpdatedLocation
399
+ command.params['name'] = name unless name.nil?
400
+ command.query['fields'] = fields unless fields.nil?
401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
402
+ execute_or_queue_command(command, &block)
403
+ end
404
+
405
+ # Creates a new location owned by the
406
+ # specified account, and returns it.
407
+ # @param [String] name
408
+ # The name of the account in which to create this location.
409
+ # @param [Google::Apis::MybusinessV3::Location] location_object
410
+ # @param [String] language_code
411
+ # The language of the location update. Currently this is used to disambiguate
412
+ # what localized categories are valid for this create request.
413
+ # @param [Boolean] validate_only
414
+ # If true, the request is validated without actually creating the location.
415
+ # @param [String] request_id
416
+ # A unique request ID for the server to detect duplicated requests. UUIDs are
417
+ # recommended. Max length is 50 characters.
418
+ # @param [String] fields
419
+ # Selector specifying which fields to include in a partial response.
420
+ # @param [String] quota_user
421
+ # Available to use for quota purposes for server-side applications. Can be any
422
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
423
+ # @param [Google::Apis::RequestOptions] options
424
+ # Request-specific options
425
+ #
426
+ # @yield [result, err] Result & error if block supplied
427
+ # @yieldparam result [Google::Apis::MybusinessV3::Location] parsed result object
428
+ # @yieldparam err [StandardError] error object if request failed
429
+ #
430
+ # @return [Google::Apis::MybusinessV3::Location]
431
+ #
432
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
433
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
434
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
435
+ def create_account_location(name, location_object = nil, language_code: nil, validate_only: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
436
+ command = make_simple_command(:post, 'v3/{+name}/locations', options)
437
+ command.request_representation = Google::Apis::MybusinessV3::Location::Representation
438
+ command.request_object = location_object
439
+ command.response_representation = Google::Apis::MybusinessV3::Location::Representation
440
+ command.response_class = Google::Apis::MybusinessV3::Location
441
+ command.params['name'] = name unless name.nil?
442
+ command.query['languageCode'] = language_code unless language_code.nil?
443
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
444
+ command.query['requestId'] = request_id unless request_id.nil?
445
+ command.query['fields'] = fields unless fields.nil?
446
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
447
+ execute_or_queue_command(command, &block)
448
+ end
449
+
450
+ # Updates the specified location.
451
+ # Photos are only allowed on a location that has a Google+ page.
452
+ # Returns `NOT_FOUND` if the location does not exist.
453
+ # @param [String] name
454
+ # The name of the location to update.
455
+ # @param [Google::Apis::MybusinessV3::Location] location_object
456
+ # @param [String] language_code
457
+ # The language of the location update. Currently this is used to disambiguate
458
+ # what localized categories are valid for this update request.
459
+ # @param [String] field_mask
460
+ # The specific fields to update. If no mask is specified, then this is
461
+ # treated as a full update and all fields are set to the values passed
462
+ # in, which may include unsetting empty fields in the request.
463
+ # @param [Boolean] validate_only
464
+ # If true, the request is validated without actually updating the location.
465
+ # @param [String] fields
466
+ # Selector specifying which fields to include in a partial response.
467
+ # @param [String] quota_user
468
+ # Available to use for quota purposes for server-side applications. Can be any
469
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
470
+ # @param [Google::Apis::RequestOptions] options
471
+ # Request-specific options
472
+ #
473
+ # @yield [result, err] Result & error if block supplied
474
+ # @yieldparam result [Google::Apis::MybusinessV3::Location] parsed result object
475
+ # @yieldparam err [StandardError] error object if request failed
476
+ #
477
+ # @return [Google::Apis::MybusinessV3::Location]
478
+ #
479
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
482
+ def patch_account_location(name, location_object = nil, language_code: nil, field_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
483
+ command = make_simple_command(:patch, 'v3/{+name}', options)
484
+ command.request_representation = Google::Apis::MybusinessV3::Location::Representation
485
+ command.request_object = location_object
486
+ command.response_representation = Google::Apis::MybusinessV3::Location::Representation
487
+ command.response_class = Google::Apis::MybusinessV3::Location
488
+ command.params['name'] = name unless name.nil?
489
+ command.query['languageCode'] = language_code unless language_code.nil?
490
+ command.query['fieldMask'] = field_mask unless field_mask.nil?
491
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
492
+ command.query['fields'] = fields unless fields.nil?
493
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
494
+ execute_or_queue_command(command, &block)
495
+ end
496
+
497
+ # Deletes a location. Note: If this location has an associated Google+ page, as
498
+ # indicated by a `plus_page_id` in the LocationKey, it cannot be deleted using
499
+ # the API, it
500
+ # must be done using the [Google My Business]
501
+ # (https://www.google.com/local/manage/) website.
502
+ # Returns `NOT_FOUND` if the location does not exist.
503
+ # @param [String] name
504
+ # The name of the location to delete.
505
+ # @param [String] fields
506
+ # Selector specifying which fields to include in a partial response.
507
+ # @param [String] quota_user
508
+ # Available to use for quota purposes for server-side applications. Can be any
509
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
510
+ # @param [Google::Apis::RequestOptions] options
511
+ # Request-specific options
512
+ #
513
+ # @yield [result, err] Result & error if block supplied
514
+ # @yieldparam result [Google::Apis::MybusinessV3::Empty] parsed result object
515
+ # @yieldparam err [StandardError] error object if request failed
516
+ #
517
+ # @return [Google::Apis::MybusinessV3::Empty]
518
+ #
519
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
520
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
521
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
522
+ def delete_account_location(name, fields: nil, quota_user: nil, options: nil, &block)
523
+ command = make_simple_command(:delete, 'v3/{+name}', options)
524
+ command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
525
+ command.response_class = Google::Apis::MybusinessV3::Empty
526
+ command.params['name'] = name unless name.nil?
527
+ command.query['fields'] = fields unless fields.nil?
528
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
529
+ execute_or_queue_command(command, &block)
530
+ end
531
+
532
+ # Finds all of the possible locations that are a match to the specified
533
+ # location. This operation is only valid if the location is unverified.
534
+ # @param [String] name
535
+ # The resource name of the location to find matches for.
536
+ # @param [Google::Apis::MybusinessV3::FindMatchingLocationsRequest] find_matching_locations_request_object
537
+ # @param [String] fields
538
+ # Selector specifying which fields to include in a partial response.
539
+ # @param [String] quota_user
540
+ # Available to use for quota purposes for server-side applications. Can be any
541
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
542
+ # @param [Google::Apis::RequestOptions] options
543
+ # Request-specific options
544
+ #
545
+ # @yield [result, err] Result & error if block supplied
546
+ # @yieldparam result [Google::Apis::MybusinessV3::FindMatchingLocationsResponse] parsed result object
547
+ # @yieldparam err [StandardError] error object if request failed
548
+ #
549
+ # @return [Google::Apis::MybusinessV3::FindMatchingLocationsResponse]
550
+ #
551
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
552
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
553
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
554
+ def find_account_location_matches(name, find_matching_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
555
+ command = make_simple_command(:post, 'v3/{+name}:findMatches', options)
556
+ command.request_representation = Google::Apis::MybusinessV3::FindMatchingLocationsRequest::Representation
557
+ command.request_object = find_matching_locations_request_object
558
+ command.response_representation = Google::Apis::MybusinessV3::FindMatchingLocationsResponse::Representation
559
+ command.response_class = Google::Apis::MybusinessV3::FindMatchingLocationsResponse
560
+ command.params['name'] = name unless name.nil?
561
+ command.query['fields'] = fields unless fields.nil?
562
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
563
+ execute_or_queue_command(command, &block)
564
+ end
565
+
566
+ # Associates a location to a place ID. Any previous association is
567
+ # overwritten. This operation is only valid if the location is unverified.
568
+ # The association must be valid, i.e. appear in the list of
569
+ # FindMatchingLocations.
570
+ # @param [String] name
571
+ # The resource name of the location to associate.
572
+ # @param [Google::Apis::MybusinessV3::AssociateLocationRequest] associate_location_request_object
573
+ # @param [String] fields
574
+ # Selector specifying which fields to include in a partial response.
575
+ # @param [String] quota_user
576
+ # Available to use for quota purposes for server-side applications. Can be any
577
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
578
+ # @param [Google::Apis::RequestOptions] options
579
+ # Request-specific options
580
+ #
581
+ # @yield [result, err] Result & error if block supplied
582
+ # @yieldparam result [Google::Apis::MybusinessV3::Empty] parsed result object
583
+ # @yieldparam err [StandardError] error object if request failed
584
+ #
585
+ # @return [Google::Apis::MybusinessV3::Empty]
586
+ #
587
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
588
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
589
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
590
+ def associate_location(name, associate_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
591
+ command = make_simple_command(:post, 'v3/{+name}:associate', options)
592
+ command.request_representation = Google::Apis::MybusinessV3::AssociateLocationRequest::Representation
593
+ command.request_object = associate_location_request_object
594
+ command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
595
+ command.response_class = Google::Apis::MybusinessV3::Empty
596
+ command.params['name'] = name unless name.nil?
597
+ command.query['fields'] = fields unless fields.nil?
598
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
599
+ execute_or_queue_command(command, &block)
600
+ end
601
+
602
+ # Clears an assocation between a location and its place ID. This
603
+ # operation is only valid if the location is unverified.
604
+ # @param [String] name
605
+ # The resource name of the location to disassociate.
606
+ # @param [Google::Apis::MybusinessV3::ClearLocationAssociationRequest] clear_location_association_request_object
607
+ # @param [String] fields
608
+ # Selector specifying which fields to include in a partial response.
609
+ # @param [String] quota_user
610
+ # Available to use for quota purposes for server-side applications. Can be any
611
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
612
+ # @param [Google::Apis::RequestOptions] options
613
+ # Request-specific options
614
+ #
615
+ # @yield [result, err] Result & error if block supplied
616
+ # @yieldparam result [Google::Apis::MybusinessV3::Empty] parsed result object
617
+ # @yieldparam err [StandardError] error object if request failed
618
+ #
619
+ # @return [Google::Apis::MybusinessV3::Empty]
620
+ #
621
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
622
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
623
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
624
+ def clear_account_location_association(name, clear_location_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
625
+ command = make_simple_command(:post, 'v3/{+name}:clearAssociation', options)
626
+ command.request_representation = Google::Apis::MybusinessV3::ClearLocationAssociationRequest::Representation
627
+ command.request_object = clear_location_association_request_object
628
+ command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
629
+ command.response_class = Google::Apis::MybusinessV3::Empty
630
+ command.params['name'] = name unless name.nil?
631
+ command.query['fields'] = fields unless fields.nil?
632
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
633
+ execute_or_queue_command(command, &block)
634
+ end
635
+
636
+ # Transfer a location from one account to another. The current account that
637
+ # the location is associated with and the destination account must have the
638
+ # same ultimate owner. Returns the Location with its new resource name.
639
+ # @param [String] name
640
+ # The name of the location to transfer.
641
+ # @param [Google::Apis::MybusinessV3::TransferLocationRequest] transfer_location_request_object
642
+ # @param [String] fields
643
+ # Selector specifying which fields to include in a partial response.
644
+ # @param [String] quota_user
645
+ # Available to use for quota purposes for server-side applications. Can be any
646
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
647
+ # @param [Google::Apis::RequestOptions] options
648
+ # Request-specific options
649
+ #
650
+ # @yield [result, err] Result & error if block supplied
651
+ # @yieldparam result [Google::Apis::MybusinessV3::Location] parsed result object
652
+ # @yieldparam err [StandardError] error object if request failed
653
+ #
654
+ # @return [Google::Apis::MybusinessV3::Location]
655
+ #
656
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
657
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
658
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
659
+ def transfer_location(name, transfer_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
660
+ command = make_simple_command(:post, 'v3/{+name}:transfer', options)
661
+ command.request_representation = Google::Apis::MybusinessV3::TransferLocationRequest::Representation
662
+ command.request_object = transfer_location_request_object
663
+ command.response_representation = Google::Apis::MybusinessV3::Location::Representation
664
+ command.response_class = Google::Apis::MybusinessV3::Location
665
+ command.params['name'] = name unless name.nil?
666
+ command.query['fields'] = fields unless fields.nil?
667
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
668
+ execute_or_queue_command(command, &block)
669
+ end
670
+
671
+ # Lists all of the admins for the specified location.
672
+ # @param [String] name
673
+ # The name of the location to list admins of.
674
+ # @param [String] fields
675
+ # Selector specifying which fields to include in a partial response.
676
+ # @param [String] quota_user
677
+ # Available to use for quota purposes for server-side applications. Can be any
678
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
679
+ # @param [Google::Apis::RequestOptions] options
680
+ # Request-specific options
681
+ #
682
+ # @yield [result, err] Result & error if block supplied
683
+ # @yieldparam result [Google::Apis::MybusinessV3::ListLocationAdminsResponse] parsed result object
684
+ # @yieldparam err [StandardError] error object if request failed
685
+ #
686
+ # @return [Google::Apis::MybusinessV3::ListLocationAdminsResponse]
687
+ #
688
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
689
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
690
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
691
+ def list_account_location_admins(name, fields: nil, quota_user: nil, options: nil, &block)
692
+ command = make_simple_command(:get, 'v3/{+name}/admins', options)
693
+ command.response_representation = Google::Apis::MybusinessV3::ListLocationAdminsResponse::Representation
694
+ command.response_class = Google::Apis::MybusinessV3::ListLocationAdminsResponse
695
+ command.params['name'] = name unless name.nil?
696
+ command.query['fields'] = fields unless fields.nil?
697
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
698
+ execute_or_queue_command(command, &block)
699
+ end
700
+
701
+ # Invites the specified user to become an administrator on the specified
702
+ # location. The invitee must accept the invitation in order to be granted
703
+ # access to the location.
704
+ # @param [String] name
705
+ # The resource name. For account admins, this is in the form:
706
+ # `accounts/`account_id`/admins/`admin_id``
707
+ # For location admins, this is in the form:
708
+ # `accounts/`account_id`/locations/`location_id`/admins/`admin_id``
709
+ # @param [Google::Apis::MybusinessV3::Admin] admin_object
710
+ # @param [String] fields
711
+ # Selector specifying which fields to include in a partial response.
712
+ # @param [String] quota_user
713
+ # Available to use for quota purposes for server-side applications. Can be any
714
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
715
+ # @param [Google::Apis::RequestOptions] options
716
+ # Request-specific options
717
+ #
718
+ # @yield [result, err] Result & error if block supplied
719
+ # @yieldparam result [Google::Apis::MybusinessV3::Admin] parsed result object
720
+ # @yieldparam err [StandardError] error object if request failed
721
+ #
722
+ # @return [Google::Apis::MybusinessV3::Admin]
723
+ #
724
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
725
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
726
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
727
+ def create_account_location_admin(name, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
728
+ command = make_simple_command(:post, 'v3/{+name}/admins', options)
729
+ command.request_representation = Google::Apis::MybusinessV3::Admin::Representation
730
+ command.request_object = admin_object
731
+ command.response_representation = Google::Apis::MybusinessV3::Admin::Representation
732
+ command.response_class = Google::Apis::MybusinessV3::Admin
733
+ command.params['name'] = name unless name.nil?
734
+ command.query['fields'] = fields unless fields.nil?
735
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
736
+ execute_or_queue_command(command, &block)
737
+ end
738
+
739
+ # Removes the specified admin as a manager of the specified location.
740
+ # @param [String] name
741
+ # The resource name of the admin to remove from the location.
742
+ # @param [String] fields
743
+ # Selector specifying which fields to include in a partial response.
744
+ # @param [String] quota_user
745
+ # Available to use for quota purposes for server-side applications. Can be any
746
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
747
+ # @param [Google::Apis::RequestOptions] options
748
+ # Request-specific options
749
+ #
750
+ # @yield [result, err] Result & error if block supplied
751
+ # @yieldparam result [Google::Apis::MybusinessV3::Empty] parsed result object
752
+ # @yieldparam err [StandardError] error object if request failed
753
+ #
754
+ # @return [Google::Apis::MybusinessV3::Empty]
755
+ #
756
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
757
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
758
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
759
+ def delete_account_location_admin(name, fields: nil, quota_user: nil, options: nil, &block)
760
+ command = make_simple_command(:delete, 'v3/{+name}', options)
761
+ command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
762
+ command.response_class = Google::Apis::MybusinessV3::Empty
763
+ command.params['name'] = name unless name.nil?
764
+ command.query['fields'] = fields unless fields.nil?
765
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
766
+ execute_or_queue_command(command, &block)
767
+ end
768
+
769
+ # Returns the paginated list of reviews for the specified location.
770
+ # This operation is only valid if the specified location is verified.
771
+ # @param [String] name
772
+ # The name of the location to fetch reviews for.
773
+ # @param [Fixnum] page_size
774
+ # How many reviews to fetch per page. The maximum page_size is 200.
775
+ # @param [String] page_token
776
+ # If specified, it fetches the next ‘page’ of reviews.
777
+ # @param [String] order_by
778
+ # Specifies the field to sort reviews by.
779
+ # If unspecified, the order of reviews returned will
780
+ # default to "update_timedesc".
781
+ # Valid orders to sort by are `rating` and `ratingdesc` and `update_timedesc`.
782
+ # @param [String] fields
783
+ # Selector specifying which fields to include in a partial response.
784
+ # @param [String] quota_user
785
+ # Available to use for quota purposes for server-side applications. Can be any
786
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
787
+ # @param [Google::Apis::RequestOptions] options
788
+ # Request-specific options
789
+ #
790
+ # @yield [result, err] Result & error if block supplied
791
+ # @yieldparam result [Google::Apis::MybusinessV3::ListReviewsResponse] parsed result object
792
+ # @yieldparam err [StandardError] error object if request failed
793
+ #
794
+ # @return [Google::Apis::MybusinessV3::ListReviewsResponse]
795
+ #
796
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
797
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
798
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
799
+ def list_reviews(name, page_size: nil, page_token: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block)
800
+ command = make_simple_command(:get, 'v3/{+name}/reviews', options)
801
+ command.response_representation = Google::Apis::MybusinessV3::ListReviewsResponse::Representation
802
+ command.response_class = Google::Apis::MybusinessV3::ListReviewsResponse
803
+ command.params['name'] = name unless name.nil?
804
+ command.query['pageSize'] = page_size unless page_size.nil?
805
+ command.query['pageToken'] = page_token unless page_token.nil?
806
+ command.query['orderBy'] = order_by unless order_by.nil?
807
+ command.query['fields'] = fields unless fields.nil?
808
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
809
+ execute_or_queue_command(command, &block)
810
+ end
811
+
812
+ # Returns the specified review.
813
+ # This operation is only valid if the specified location is verified.
814
+ # Returns `NOT_FOUND` if the review does not exist, or has been deleted.
815
+ # @param [String] name
816
+ # The name of the review to fetch.
817
+ # @param [String] fields
818
+ # Selector specifying which fields to include in a partial response.
819
+ # @param [String] quota_user
820
+ # Available to use for quota purposes for server-side applications. Can be any
821
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
822
+ # @param [Google::Apis::RequestOptions] options
823
+ # Request-specific options
824
+ #
825
+ # @yield [result, err] Result & error if block supplied
826
+ # @yieldparam result [Google::Apis::MybusinessV3::Review] parsed result object
827
+ # @yieldparam err [StandardError] error object if request failed
828
+ #
829
+ # @return [Google::Apis::MybusinessV3::Review]
830
+ #
831
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
832
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
833
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
834
+ def get_review(name, fields: nil, quota_user: nil, options: nil, &block)
835
+ command = make_simple_command(:get, 'v3/{+name}', options)
836
+ command.response_representation = Google::Apis::MybusinessV3::Review::Representation
837
+ command.response_class = Google::Apis::MybusinessV3::Review
838
+ command.params['name'] = name unless name.nil?
839
+ command.query['fields'] = fields unless fields.nil?
840
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
841
+ execute_or_queue_command(command, &block)
842
+ end
843
+
844
+ # Updates the reply to the specified review.
845
+ # A reply is created if one does not exist.
846
+ # This operation is only valid if the specified location is verified.
847
+ # @param [String] name
848
+ # The name of the review to respond to.
849
+ # @param [Google::Apis::MybusinessV3::ReviewReply] review_reply_object
850
+ # @param [String] fields
851
+ # Selector specifying which fields to include in a partial response.
852
+ # @param [String] quota_user
853
+ # Available to use for quota purposes for server-side applications. Can be any
854
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
855
+ # @param [Google::Apis::RequestOptions] options
856
+ # Request-specific options
857
+ #
858
+ # @yield [result, err] Result & error if block supplied
859
+ # @yieldparam result [Google::Apis::MybusinessV3::ReviewReply] parsed result object
860
+ # @yieldparam err [StandardError] error object if request failed
861
+ #
862
+ # @return [Google::Apis::MybusinessV3::ReviewReply]
863
+ #
864
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
865
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
866
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
867
+ def reply_to_review(name, review_reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
868
+ command = make_simple_command(:post, 'v3/{+name}/reply', options)
869
+ command.request_representation = Google::Apis::MybusinessV3::ReviewReply::Representation
870
+ command.request_object = review_reply_object
871
+ command.response_representation = Google::Apis::MybusinessV3::ReviewReply::Representation
872
+ command.response_class = Google::Apis::MybusinessV3::ReviewReply
873
+ command.params['name'] = name unless name.nil?
874
+ command.query['fields'] = fields unless fields.nil?
875
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
876
+ execute_or_queue_command(command, &block)
877
+ end
878
+
879
+ # Deletes the response to the specified review.
880
+ # This operation is only valid if the specified location is verified.
881
+ # @param [String] name
882
+ # The name of the review reply to delete.
883
+ # @param [String] fields
884
+ # Selector specifying which fields to include in a partial response.
885
+ # @param [String] quota_user
886
+ # Available to use for quota purposes for server-side applications. Can be any
887
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
888
+ # @param [Google::Apis::RequestOptions] options
889
+ # Request-specific options
890
+ #
891
+ # @yield [result, err] Result & error if block supplied
892
+ # @yieldparam result [Google::Apis::MybusinessV3::Empty] parsed result object
893
+ # @yieldparam err [StandardError] error object if request failed
894
+ #
895
+ # @return [Google::Apis::MybusinessV3::Empty]
896
+ #
897
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
898
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
899
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
900
+ def delete_reply(name, fields: nil, quota_user: nil, options: nil, &block)
901
+ command = make_simple_command(:delete, 'v3/{+name}/reply', options)
902
+ command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
903
+ command.response_class = Google::Apis::MybusinessV3::Empty
904
+ command.params['name'] = name unless name.nil?
905
+ command.query['fields'] = fields unless fields.nil?
906
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
907
+ execute_or_queue_command(command, &block)
908
+ end
909
+
910
+ # Returns the list of available attributes that would be available for a
911
+ # location with the given primary category and country.
912
+ # @param [String] name
913
+ # Resource name of the location to lookup available attributes.
914
+ # @param [String] category_id
915
+ # The primary category stable id to find available attributes.
916
+ # @param [String] country
917
+ # The ISO 3166-1 alpha-2 country code to find available attributes.
918
+ # @param [String] language_code
919
+ # The BCP 47 code of language to get attribute display names in. If this
920
+ # language is not available, they will be provided in English.
921
+ # @param [String] fields
922
+ # Selector specifying which fields to include in a partial response.
923
+ # @param [String] quota_user
924
+ # Available to use for quota purposes for server-side applications. Can be any
925
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
926
+ # @param [Google::Apis::RequestOptions] options
927
+ # Request-specific options
928
+ #
929
+ # @yield [result, err] Result & error if block supplied
930
+ # @yieldparam result [Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse] parsed result object
931
+ # @yieldparam err [StandardError] error object if request failed
932
+ #
933
+ # @return [Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse]
934
+ #
935
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
936
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
937
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
938
+ def list_attributes(name: nil, category_id: nil, country: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
939
+ command = make_simple_command(:get, 'v3/attributes', options)
940
+ command.response_representation = Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse::Representation
941
+ command.response_class = Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse
942
+ command.query['name'] = name unless name.nil?
943
+ command.query['categoryId'] = category_id unless category_id.nil?
944
+ command.query['country'] = country unless country.nil?
945
+ command.query['languageCode'] = language_code unless language_code.nil?
946
+ command.query['fields'] = fields unless fields.nil?
947
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
948
+ execute_or_queue_command(command, &block)
949
+ end
950
+
951
+ protected
952
+
953
+ def apply_command_defaults(command)
954
+ command.query['key'] = key unless key.nil?
955
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
956
+ end
957
+ end
958
+ end
959
+ end
960
+ end