google-apis-cloudchannel_v1 0.1.0

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.
@@ -0,0 +1,1756 @@
1
+ # Copyright 2020 Google LLC
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 CloudchannelV1
23
+ # Cloud Channel API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/cloudchannel_v1'
29
+ #
30
+ # Cloudchannel = Google::Apis::CloudchannelV1 # Alias the module
31
+ # service = Cloudchannel::CloudchannelService.new
32
+ #
33
+ # @see https://cloud.google.com/channel
34
+ class CloudchannelService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://cloudchannel.googleapis.com/', '',
47
+ client_name: 'google-apis-cloudchannel_v1',
48
+ client_version: Google::Apis::CloudchannelV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Confirms the existence of Cloud Identity accounts, based on the domain and
53
+ # whether the Cloud Identity accounts are owned by the reseller. Possible Error
54
+ # Codes: * PERMISSION_DENIED: If the reseller account making the request and the
55
+ # reseller account being queried for are different. * INVALID_ARGUMENT: Missing
56
+ # or invalid required parameters in the request. * INVALID_VALUE: Invalid domain
57
+ # value in the request. Return Value: List of CloudIdentityCustomerAccount
58
+ # resources for the domain. List may be empty. Note: in the v1alpha1 version of
59
+ # the API, a NOT_FOUND error is returned if no CloudIdentityCustomerAccount
60
+ # resources match the domain.
61
+ # @param [String] parent
62
+ # Required. The resource name of the reseller account. The parent takes the
63
+ # format: accounts/`account_id`
64
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest] google_cloud_channel_v1_check_cloud_identity_accounts_exist_request_object
65
+ # @param [String] fields
66
+ # Selector specifying which fields to include in a partial response.
67
+ # @param [String] quota_user
68
+ # Available to use for quota purposes for server-side applications. Can be any
69
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
70
+ # @param [Google::Apis::RequestOptions] options
71
+ # Request-specific options
72
+ #
73
+ # @yield [result, err] Result & error if block supplied
74
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1CheckCloudIdentityAccountsExistResponse] parsed result object
75
+ # @yieldparam err [StandardError] error object if request failed
76
+ #
77
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1CheckCloudIdentityAccountsExistResponse]
78
+ #
79
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
82
+ def check_account_cloud_identity_accounts_exist(parent, google_cloud_channel_v1_check_cloud_identity_accounts_exist_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
83
+ command = make_simple_command(:post, 'v1/{+parent}:checkCloudIdentityAccountsExist', options)
84
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest::Representation
85
+ command.request_object = google_cloud_channel_v1_check_cloud_identity_accounts_exist_request_object
86
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1CheckCloudIdentityAccountsExistResponse::Representation
87
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1CheckCloudIdentityAccountsExistResponse
88
+ command.params['parent'] = parent unless parent.nil?
89
+ command.query['fields'] = fields unless fields.nil?
90
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
91
+ execute_or_queue_command(command, &block)
92
+ end
93
+
94
+ # Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic
95
+ # created for this Channel Services account. Possible Error Codes: *
96
+ # PERMISSION_DENIED: If the reseller account making the request and the reseller
97
+ # account being provided are different, or if the account is not a super admin. *
98
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request. *
99
+ # NOT_FOUND: If the topic resource doesn't exist. * INTERNAL: Any non-user error
100
+ # related to a technical issue in the backend. In this case, contact Cloud
101
+ # Channel support. * UNKNOWN: Any non-user error related to a technical issue in
102
+ # the backend. In this case, contact Cloud Channel support. Return Value: List
103
+ # of service email addresses if successful, otherwise error is returned.
104
+ # @param [String] account
105
+ # Required. Resource name of the account.
106
+ # @param [Fixnum] page_size
107
+ # Optional. The maximum number of service accounts to return. The service may
108
+ # return fewer than this value. If unspecified, at most 100 service accounts
109
+ # will be returned. The maximum value is 1000; values above 1000 will be coerced
110
+ # to 1000.
111
+ # @param [String] page_token
112
+ # Optional. A page token, received from a previous `ListSubscribers` call.
113
+ # Provide this to retrieve the subsequent page. When paginating, all other
114
+ # parameters provided to `ListSubscribers` must match the call that provided the
115
+ # page token.
116
+ # @param [String] fields
117
+ # Selector specifying which fields to include in a partial response.
118
+ # @param [String] quota_user
119
+ # Available to use for quota purposes for server-side applications. Can be any
120
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
121
+ # @param [Google::Apis::RequestOptions] options
122
+ # Request-specific options
123
+ #
124
+ # @yield [result, err] Result & error if block supplied
125
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSubscribersResponse] parsed result object
126
+ # @yieldparam err [StandardError] error object if request failed
127
+ #
128
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSubscribersResponse]
129
+ #
130
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
131
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
132
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
133
+ def list_account_subscribers(account, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
134
+ command = make_simple_command(:get, 'v1/{+account}:listSubscribers', options)
135
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSubscribersResponse::Representation
136
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSubscribersResponse
137
+ command.params['account'] = account unless account.nil?
138
+ command.query['pageSize'] = page_size unless page_size.nil?
139
+ command.query['pageToken'] = page_token unless page_token.nil?
140
+ command.query['fields'] = fields unless fields.nil?
141
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
142
+ execute_or_queue_command(command, &block)
143
+ end
144
+
145
+ # List TransferableOffers of a customer based on Cloud Identity ID or Customer
146
+ # Name in the request. This method is used when a reseller gets the entitlement
147
+ # information of a customer that is not owned. The reseller should provide the
148
+ # customer's Cloud Identity ID or Customer Name. Possible Error Codes: *
149
+ # PERMISSION_DENIED: Appears because of one of the following: * If the customer
150
+ # doesn't belong to the reseller and no auth token or invalid auth token is
151
+ # supplied. * If the reseller account making the request and the reseller
152
+ # account being queried for are different. * INVALID_ARGUMENT: Missing or
153
+ # invalid required parameters in the request. Return Value: List of
154
+ # TransferableOffer for the given customer and SKU.
155
+ # @param [String] parent
156
+ # Required. The resource name of the reseller's account.
157
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableOffersRequest] google_cloud_channel_v1_list_transferable_offers_request_object
158
+ # @param [String] fields
159
+ # Selector specifying which fields to include in a partial response.
160
+ # @param [String] quota_user
161
+ # Available to use for quota purposes for server-side applications. Can be any
162
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
163
+ # @param [Google::Apis::RequestOptions] options
164
+ # Request-specific options
165
+ #
166
+ # @yield [result, err] Result & error if block supplied
167
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableOffersResponse] parsed result object
168
+ # @yieldparam err [StandardError] error object if request failed
169
+ #
170
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableOffersResponse]
171
+ #
172
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
173
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
174
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
175
+ def list_account_transferable_offers(parent, google_cloud_channel_v1_list_transferable_offers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
176
+ command = make_simple_command(:post, 'v1/{+parent}:listTransferableOffers', options)
177
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableOffersRequest::Representation
178
+ command.request_object = google_cloud_channel_v1_list_transferable_offers_request_object
179
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableOffersResponse::Representation
180
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableOffersResponse
181
+ command.params['parent'] = parent unless parent.nil?
182
+ command.query['fields'] = fields unless fields.nil?
183
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
184
+ execute_or_queue_command(command, &block)
185
+ end
186
+
187
+ # List TransferableSkus of a customer based on Cloud Identity ID or Customer
188
+ # Name in the request. This method is used when a reseller lists the
189
+ # entitlements information of a customer that is not owned. The reseller should
190
+ # provide the customer's Cloud Identity ID or Customer Name. Possible Error
191
+ # Codes: * PERMISSION_DENIED: Appears because of one of the following - * The
192
+ # customer doesn't belong to the reseller and no auth token. * The supplied auth
193
+ # token is invalid. * The reseller account making the request and the queries
194
+ # reseller account are different. * INVALID_ARGUMENT: Missing or invalid
195
+ # required parameters in the request. Return Value: List of TransferableSku for
196
+ # the given customer.
197
+ # @param [String] parent
198
+ # Required. The resource name of the reseller's account. The parent takes the
199
+ # format: accounts/`account_id`
200
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableSkusRequest] google_cloud_channel_v1_list_transferable_skus_request_object
201
+ # @param [String] fields
202
+ # Selector specifying which fields to include in a partial response.
203
+ # @param [String] quota_user
204
+ # Available to use for quota purposes for server-side applications. Can be any
205
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
206
+ # @param [Google::Apis::RequestOptions] options
207
+ # Request-specific options
208
+ #
209
+ # @yield [result, err] Result & error if block supplied
210
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableSkusResponse] parsed result object
211
+ # @yieldparam err [StandardError] error object if request failed
212
+ #
213
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableSkusResponse]
214
+ #
215
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
216
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
217
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
218
+ def list_account_transferable_skus(parent, google_cloud_channel_v1_list_transferable_skus_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
219
+ command = make_simple_command(:post, 'v1/{+parent}:listTransferableSkus', options)
220
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableSkusRequest::Representation
221
+ command.request_object = google_cloud_channel_v1_list_transferable_skus_request_object
222
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableSkusResponse::Representation
223
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListTransferableSkusResponse
224
+ command.params['parent'] = parent unless parent.nil?
225
+ command.query['fields'] = fields unless fields.nil?
226
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
227
+ execute_or_queue_command(command, &block)
228
+ end
229
+
230
+ # Registers a service account with subscriber privileges on the Cloud Pub/Sub
231
+ # topic created for this Channel Services account. Once you create a subscriber,
232
+ # you will get the events as per SubscriberEvent Possible Error Codes: *
233
+ # PERMISSION_DENIED: If the reseller account making the request and the reseller
234
+ # account being provided are different, or if the impersonated user is not a
235
+ # super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the
236
+ # request. * INTERNAL: Any non-user error related to a technical issue in the
237
+ # backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user
238
+ # error related to a technical issue in the backend. In this case, contact Cloud
239
+ # Channel support. Return Value: Topic name with service email address
240
+ # registered if successful, otherwise error is returned.
241
+ # @param [String] account
242
+ # Required. Resource name of the account.
243
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1RegisterSubscriberRequest] google_cloud_channel_v1_register_subscriber_request_object
244
+ # @param [String] fields
245
+ # Selector specifying which fields to include in a partial response.
246
+ # @param [String] quota_user
247
+ # Available to use for quota purposes for server-side applications. Can be any
248
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
249
+ # @param [Google::Apis::RequestOptions] options
250
+ # Request-specific options
251
+ #
252
+ # @yield [result, err] Result & error if block supplied
253
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1RegisterSubscriberResponse] parsed result object
254
+ # @yieldparam err [StandardError] error object if request failed
255
+ #
256
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1RegisterSubscriberResponse]
257
+ #
258
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
259
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
260
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
261
+ def register_account(account, google_cloud_channel_v1_register_subscriber_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
262
+ command = make_simple_command(:post, 'v1/{+account}:register', options)
263
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1RegisterSubscriberRequest::Representation
264
+ command.request_object = google_cloud_channel_v1_register_subscriber_request_object
265
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1RegisterSubscriberResponse::Representation
266
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1RegisterSubscriberResponse
267
+ command.params['account'] = account unless account.nil?
268
+ command.query['fields'] = fields unless fields.nil?
269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
270
+ execute_or_queue_command(command, &block)
271
+ end
272
+
273
+ # Unregisters a service account with subscriber privileges on the Cloud Pub/Sub
274
+ # topic created for this Channel Services account. If there are no more service
275
+ # account left with sunbscriber privileges, the topic will be deleted. You can
276
+ # check this by calling ListSubscribers api. Possible Error Codes: *
277
+ # PERMISSION_DENIED: If the reseller account making the request and the reseller
278
+ # account being provided are different, or if the impersonated user is not a
279
+ # super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the
280
+ # request. * NOT_FOUND: If the topic resource doesn't exist. * INTERNAL: Any non-
281
+ # user error related to a technical issue in the backend. In this case, contact
282
+ # Cloud Channel support. * UNKNOWN: Any non-user error related to a technical
283
+ # issue in the backend. In this case, contact Cloud Channel support. Return
284
+ # Value: Topic name from which service email address has been unregistered if
285
+ # successful, otherwise error is returned. If the service email was already not
286
+ # associated with the topic, the success response will be returned.
287
+ # @param [String] account
288
+ # Required. Resource name of the account.
289
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1UnregisterSubscriberRequest] google_cloud_channel_v1_unregister_subscriber_request_object
290
+ # @param [String] fields
291
+ # Selector specifying which fields to include in a partial response.
292
+ # @param [String] quota_user
293
+ # Available to use for quota purposes for server-side applications. Can be any
294
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
295
+ # @param [Google::Apis::RequestOptions] options
296
+ # Request-specific options
297
+ #
298
+ # @yield [result, err] Result & error if block supplied
299
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1UnregisterSubscriberResponse] parsed result object
300
+ # @yieldparam err [StandardError] error object if request failed
301
+ #
302
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1UnregisterSubscriberResponse]
303
+ #
304
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
305
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
306
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
307
+ def unregister_account(account, google_cloud_channel_v1_unregister_subscriber_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
308
+ command = make_simple_command(:post, 'v1/{+account}:unregister', options)
309
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1UnregisterSubscriberRequest::Representation
310
+ command.request_object = google_cloud_channel_v1_unregister_subscriber_request_object
311
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1UnregisterSubscriberResponse::Representation
312
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1UnregisterSubscriberResponse
313
+ command.params['account'] = account unless account.nil?
314
+ command.query['fields'] = fields unless fields.nil?
315
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
316
+ execute_or_queue_command(command, &block)
317
+ end
318
+
319
+ # Initiates a channel partner link between a distributor and a reseller or
320
+ # between resellers in an n-tier reseller channel. To accept the invite, the
321
+ # invited partner should follow the invite_link_uri provided in the response. If
322
+ # the link creation is accepted, a valid link is set up between the two involved
323
+ # parties. To call this method, you must be a distributor. Possible Error Codes:
324
+ # * PERMISSION_DENIED: If the reseller account making the request and the
325
+ # reseller account being queried for are different. * INVALID_ARGUMENT: Missing
326
+ # or invalid required parameters in the request. * ALREADY_EXISTS: If the
327
+ # ChannelPartnerLink sent in the request already exists. * NOT_FOUND: If no
328
+ # Cloud Identity customer exists for domain provided. * INTERNAL: Any non-user
329
+ # error related to a technical issue in the backend. In this case, contact Cloud
330
+ # Channel support. * UNKNOWN: Any non-user error related to a technical issue in
331
+ # the backend. In this case, contact Cloud Channel support. Return Value: Newly
332
+ # created ChannelPartnerLink resource if successful, otherwise error is returned.
333
+ # @param [String] parent
334
+ # Required. The resource name of reseller's account for which to create a
335
+ # channel partner link. The parent takes the format: accounts/`account_id`
336
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink] google_cloud_channel_v1_channel_partner_link_object
337
+ # @param [String] fields
338
+ # Selector specifying which fields to include in a partial response.
339
+ # @param [String] quota_user
340
+ # Available to use for quota purposes for server-side applications. Can be any
341
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
342
+ # @param [Google::Apis::RequestOptions] options
343
+ # Request-specific options
344
+ #
345
+ # @yield [result, err] Result & error if block supplied
346
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink] parsed result object
347
+ # @yieldparam err [StandardError] error object if request failed
348
+ #
349
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink]
350
+ #
351
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
352
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
353
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
354
+ def create_account_channel_partner_link(parent, google_cloud_channel_v1_channel_partner_link_object = nil, fields: nil, quota_user: nil, options: nil, &block)
355
+ command = make_simple_command(:post, 'v1/{+parent}/channelPartnerLinks', options)
356
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink::Representation
357
+ command.request_object = google_cloud_channel_v1_channel_partner_link_object
358
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink::Representation
359
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink
360
+ command.params['parent'] = parent unless parent.nil?
361
+ command.query['fields'] = fields unless fields.nil?
362
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
363
+ execute_or_queue_command(command, &block)
364
+ end
365
+
366
+ # Returns a requested ChannelPartnerLink resource. To call this method, you must
367
+ # be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller
368
+ # account making the request and the reseller account being queried for are
369
+ # different. * INVALID_ARGUMENT: Missing or invalid required parameters in the
370
+ # request. * NOT_FOUND: ChannelPartnerLink resource not found. Results due
371
+ # invalid channel partner link name. Return Value: ChannelPartnerLink resource
372
+ # if found, otherwise returns an error.
373
+ # @param [String] name
374
+ # Required. The resource name of the channel partner link to retrieve. The name
375
+ # takes the format: accounts/`account_id`/channelPartnerLinks/`id` where `id` is
376
+ # the Cloud Identity ID of the partner.
377
+ # @param [String] view
378
+ # Optional. The level of granularity the ChannelPartnerLink will display.
379
+ # @param [String] fields
380
+ # Selector specifying which fields to include in a partial response.
381
+ # @param [String] quota_user
382
+ # Available to use for quota purposes for server-side applications. Can be any
383
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
384
+ # @param [Google::Apis::RequestOptions] options
385
+ # Request-specific options
386
+ #
387
+ # @yield [result, err] Result & error if block supplied
388
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink] parsed result object
389
+ # @yieldparam err [StandardError] error object if request failed
390
+ #
391
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink]
392
+ #
393
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
394
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
395
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
396
+ def get_account_channel_partner_link(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
397
+ command = make_simple_command(:get, 'v1/{+name}', options)
398
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink::Representation
399
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink
400
+ command.params['name'] = name unless name.nil?
401
+ command.query['view'] = view unless view.nil?
402
+ command.query['fields'] = fields unless fields.nil?
403
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
404
+ execute_or_queue_command(command, &block)
405
+ end
406
+
407
+ # List ChannelPartnerLinks belonging to a distributor. To call this method, you
408
+ # must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the
409
+ # reseller account making the request and the reseller account being queried for
410
+ # are different. * INVALID_ARGUMENT: Missing or invalid required parameters in
411
+ # the request. Return Value: If successful, returns the list of
412
+ # ChannelPartnerLink resources for the distributor account, otherwise returns an
413
+ # error.
414
+ # @param [String] parent
415
+ # Required. The resource name of the reseller account for listing channel
416
+ # partner links. The parent takes the format: accounts/`account_id`
417
+ # @param [Fixnum] page_size
418
+ # Optional. Requested page size. Server might return fewer results than
419
+ # requested. If unspecified, server will pick a default size (25). The maximum
420
+ # value is 200, values above 200 will be coerced to 200.
421
+ # @param [String] page_token
422
+ # Optional. A token identifying a page of results, if other than the first one.
423
+ # Typically obtained via ListChannelPartnerLinksResponse.next_page_token of the
424
+ # previous CloudChannelService.ListChannelPartnerLinks call.
425
+ # @param [String] view
426
+ # Optional. The level of granularity the ChannelPartnerLink will display.
427
+ # @param [String] fields
428
+ # Selector specifying which fields to include in a partial response.
429
+ # @param [String] quota_user
430
+ # Available to use for quota purposes for server-side applications. Can be any
431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
432
+ # @param [Google::Apis::RequestOptions] options
433
+ # Request-specific options
434
+ #
435
+ # @yield [result, err] Result & error if block supplied
436
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListChannelPartnerLinksResponse] parsed result object
437
+ # @yieldparam err [StandardError] error object if request failed
438
+ #
439
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListChannelPartnerLinksResponse]
440
+ #
441
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
442
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
443
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
444
+ def list_account_channel_partner_links(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
445
+ command = make_simple_command(:get, 'v1/{+parent}/channelPartnerLinks', options)
446
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListChannelPartnerLinksResponse::Representation
447
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListChannelPartnerLinksResponse
448
+ command.params['parent'] = parent unless parent.nil?
449
+ command.query['pageSize'] = page_size unless page_size.nil?
450
+ command.query['pageToken'] = page_token unless page_token.nil?
451
+ command.query['view'] = view unless view.nil?
452
+ command.query['fields'] = fields unless fields.nil?
453
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
454
+ execute_or_queue_command(command, &block)
455
+ end
456
+
457
+ # Updates a channel partner link. A distributor calls this method to change a
458
+ # link's status. For example, suspend a partner link. To call this method, you
459
+ # must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the
460
+ # reseller account making the request and the reseller account being queried for
461
+ # are different. * INVALID_ARGUMENT: It can happen in following scenarios - *
462
+ # Missing or invalid required parameters in the request. * Updating link state
463
+ # from invited to active or suspended. * Sending reseller_cloud_identity_id,
464
+ # invite_url or name in update mask. * NOT_FOUND: ChannelPartnerLink resource
465
+ # not found. * INTERNAL: Any non-user error related to a technical issue in the
466
+ # backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user
467
+ # error related to a technical issue in the backend. In this case, contact Cloud
468
+ # Channel support. Return Value: If successful, the updated ChannelPartnerLink
469
+ # resource, otherwise returns an error.
470
+ # @param [String] name
471
+ # Required. The resource name of the channel partner link to cancel. The name
472
+ # takes the format: accounts/`account_id`/channelPartnerLinks/`id` where `id` is
473
+ # the Cloud Identity ID of the partner.
474
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1UpdateChannelPartnerLinkRequest] google_cloud_channel_v1_update_channel_partner_link_request_object
475
+ # @param [String] fields
476
+ # Selector specifying which fields to include in a partial response.
477
+ # @param [String] quota_user
478
+ # Available to use for quota purposes for server-side applications. Can be any
479
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
480
+ # @param [Google::Apis::RequestOptions] options
481
+ # Request-specific options
482
+ #
483
+ # @yield [result, err] Result & error if block supplied
484
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink] parsed result object
485
+ # @yieldparam err [StandardError] error object if request failed
486
+ #
487
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink]
488
+ #
489
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
490
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
491
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
492
+ def patch_account_channel_partner_link(name, google_cloud_channel_v1_update_channel_partner_link_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
493
+ command = make_simple_command(:patch, 'v1/{+name}', options)
494
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1UpdateChannelPartnerLinkRequest::Representation
495
+ command.request_object = google_cloud_channel_v1_update_channel_partner_link_request_object
496
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink::Representation
497
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChannelPartnerLink
498
+ command.params['name'] = name unless name.nil?
499
+ command.query['fields'] = fields unless fields.nil?
500
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
501
+ execute_or_queue_command(command, &block)
502
+ end
503
+
504
+ # Creates a new Customer resource under the reseller or distributor account.
505
+ # Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the
506
+ # request and the reseller account being queried for are different. *
507
+ # INVALID_ARGUMENT: It can happen in following scenarios - * Missing or invalid
508
+ # required parameters in the request. * Domain field value doesn't match the
509
+ # domain specified in primary email. Return Value: If successful, the newly
510
+ # created Customer resource, otherwise returns an error.
511
+ # @param [String] parent
512
+ # Required. The resource name of reseller account in which to create the
513
+ # customer. The parent takes the format: accounts/`account_id`
514
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer] google_cloud_channel_v1_customer_object
515
+ # @param [String] fields
516
+ # Selector specifying which fields to include in a partial response.
517
+ # @param [String] quota_user
518
+ # Available to use for quota purposes for server-side applications. Can be any
519
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
520
+ # @param [Google::Apis::RequestOptions] options
521
+ # Request-specific options
522
+ #
523
+ # @yield [result, err] Result & error if block supplied
524
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer] parsed result object
525
+ # @yieldparam err [StandardError] error object if request failed
526
+ #
527
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer]
528
+ #
529
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
530
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
531
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
532
+ def create_account_customer(parent, google_cloud_channel_v1_customer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
533
+ command = make_simple_command(:post, 'v1/{+parent}/customers', options)
534
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer::Representation
535
+ command.request_object = google_cloud_channel_v1_customer_object
536
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer::Representation
537
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer
538
+ command.params['parent'] = parent unless parent.nil?
539
+ command.query['fields'] = fields unless fields.nil?
540
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
541
+ execute_or_queue_command(command, &block)
542
+ end
543
+
544
+ # Deletes the given Customer permanently and irreversibly. Possible Error Codes:
545
+ # * PERMISSION_DENIED: If the account making the request does not own this
546
+ # customer. * INVALID_ARGUMENT: Missing or invalid required parameters in the
547
+ # request. * FAILED_PRECONDITION: If the customer has existing entitlements. *
548
+ # NOT_FOUND: No Customer resource found for the name specified in the request.
549
+ # @param [String] name
550
+ # Required. The resource name of the customer to delete.
551
+ # @param [String] fields
552
+ # Selector specifying which fields to include in a partial response.
553
+ # @param [String] quota_user
554
+ # Available to use for quota purposes for server-side applications. Can be any
555
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
556
+ # @param [Google::Apis::RequestOptions] options
557
+ # Request-specific options
558
+ #
559
+ # @yield [result, err] Result & error if block supplied
560
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleProtobufEmpty] parsed result object
561
+ # @yieldparam err [StandardError] error object if request failed
562
+ #
563
+ # @return [Google::Apis::CloudchannelV1::GoogleProtobufEmpty]
564
+ #
565
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
566
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
567
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
568
+ def delete_account_customer(name, fields: nil, quota_user: nil, options: nil, &block)
569
+ command = make_simple_command(:delete, 'v1/{+name}', options)
570
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleProtobufEmpty::Representation
571
+ command.response_class = Google::Apis::CloudchannelV1::GoogleProtobufEmpty
572
+ command.params['name'] = name unless name.nil?
573
+ command.query['fields'] = fields unless fields.nil?
574
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
575
+ execute_or_queue_command(command, &block)
576
+ end
577
+
578
+ # Returns a requested Customer resource. Possible Error Codes: *
579
+ # PERMISSION_DENIED: If the reseller account making the request and the reseller
580
+ # account being queried for are different. * INVALID_ARGUMENT: Missing or
581
+ # invalid required parameters in the request. * NOT_FOUND: If the customer
582
+ # resource doesn't exist. Usually the result of an invalid name parameter.
583
+ # Return Value: Customer resource if found, error otherwise.
584
+ # @param [String] name
585
+ # Required. The resource name of the customer to retrieve. The name takes the
586
+ # format: accounts/`account_id`/customers/`customer_id`
587
+ # @param [String] fields
588
+ # Selector specifying which fields to include in a partial response.
589
+ # @param [String] quota_user
590
+ # Available to use for quota purposes for server-side applications. Can be any
591
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
592
+ # @param [Google::Apis::RequestOptions] options
593
+ # Request-specific options
594
+ #
595
+ # @yield [result, err] Result & error if block supplied
596
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer] parsed result object
597
+ # @yieldparam err [StandardError] error object if request failed
598
+ #
599
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer]
600
+ #
601
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
602
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
603
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
604
+ def get_account_customer(name, fields: nil, quota_user: nil, options: nil, &block)
605
+ command = make_simple_command(:get, 'v1/{+name}', options)
606
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer::Representation
607
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer
608
+ command.params['name'] = name unless name.nil?
609
+ command.query['fields'] = fields unless fields.nil?
610
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
611
+ execute_or_queue_command(command, &block)
612
+ end
613
+
614
+ # List downstream Customers. Possible Error Codes: * PERMISSION_DENIED: If the
615
+ # reseller account making the request and the reseller account being queried for
616
+ # are different. * INVALID_ARGUMENT: Missing or invalid required parameters in
617
+ # the request. Return Value: List of Customers pertaining to the reseller or
618
+ # empty list if there are none.
619
+ # @param [String] parent
620
+ # Required. The resource name of the reseller account from which to list
621
+ # customers. The parent takes the format: accounts/`account_id`.
622
+ # @param [Fixnum] page_size
623
+ # Optional. The maximum number of customers to return. The service may return
624
+ # fewer than this value. If unspecified, at most 10 customers will be returned.
625
+ # The maximum value is 50; values about 50 will be coerced to 50.
626
+ # @param [String] page_token
627
+ # Optional. A token identifying a page of results, if other than the first one.
628
+ # Typically obtained via ListCustomersResponse.next_page_token of the previous
629
+ # CloudChannelService.ListCustomers call.
630
+ # @param [String] fields
631
+ # Selector specifying which fields to include in a partial response.
632
+ # @param [String] quota_user
633
+ # Available to use for quota purposes for server-side applications. Can be any
634
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
635
+ # @param [Google::Apis::RequestOptions] options
636
+ # Request-specific options
637
+ #
638
+ # @yield [result, err] Result & error if block supplied
639
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListCustomersResponse] parsed result object
640
+ # @yieldparam err [StandardError] error object if request failed
641
+ #
642
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListCustomersResponse]
643
+ #
644
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
645
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
646
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
647
+ def list_account_customers(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
648
+ command = make_simple_command(:get, 'v1/{+parent}/customers', options)
649
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListCustomersResponse::Representation
650
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListCustomersResponse
651
+ command.params['parent'] = parent unless parent.nil?
652
+ command.query['pageSize'] = page_size unless page_size.nil?
653
+ command.query['pageToken'] = page_token unless page_token.nil?
654
+ command.query['fields'] = fields unless fields.nil?
655
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
656
+ execute_or_queue_command(command, &block)
657
+ end
658
+
659
+ # Lists the Purchasable Offers for the following cases: * Offers that can be
660
+ # newly purchased for a customer * Offers that can be changed to, for an
661
+ # entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn'
662
+ # t belong to the reseller * INVALID_ARGUMENT: Missing or invalid required
663
+ # parameters in the request.
664
+ # @param [String] customer
665
+ # Required. The resource name of the customer for which to list Offers. Format:
666
+ # accounts/`account_id`/customers/`customer_id`.
667
+ # @param [String] change_offer_purchase_entitlement
668
+ # Required. Resource name of the entitlement. Format: accounts/`account_id`/
669
+ # customers/`customer_id`/entitlements/`entitlement_id`
670
+ # @param [String] change_offer_purchase_new_sku
671
+ # Optional. Resource name of the SKU that is being changed to. Should be
672
+ # provided if upgrading or downgrading an entitlement. Format: products/`
673
+ # product_id`/skus/`sku_id`
674
+ # @param [String] create_entitlement_purchase_sku
675
+ # Required. SKU that the result should be restricted to. Format: products/`
676
+ # product_id`/skus/`sku_id`.
677
+ # @param [String] language_code
678
+ # Optional. The BCP-47 language code, such as "en-US". If specified, the
679
+ # response will be localized to the corresponding language code. Default is "en-
680
+ # US".
681
+ # @param [Fixnum] page_size
682
+ # Optional. Requested page size. Server might return fewer results than
683
+ # requested. If unspecified, at most 100 Offers will be returned. The maximum
684
+ # value is 1000; values above 1000 will be coerced to 1000.
685
+ # @param [String] page_token
686
+ # Optional. A token identifying a page of results, if other than the first one.
687
+ # @param [String] fields
688
+ # Selector specifying which fields to include in a partial response.
689
+ # @param [String] quota_user
690
+ # Available to use for quota purposes for server-side applications. Can be any
691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
692
+ # @param [Google::Apis::RequestOptions] options
693
+ # Request-specific options
694
+ #
695
+ # @yield [result, err] Result & error if block supplied
696
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse] parsed result object
697
+ # @yieldparam err [StandardError] error object if request failed
698
+ #
699
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse]
700
+ #
701
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
702
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
703
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
704
+ def list_account_customer_purchasable_offers(customer, change_offer_purchase_entitlement: nil, change_offer_purchase_new_sku: nil, create_entitlement_purchase_sku: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
705
+ command = make_simple_command(:get, 'v1/{+customer}:listPurchasableOffers', options)
706
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse::Representation
707
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse
708
+ command.params['customer'] = customer unless customer.nil?
709
+ command.query['changeOfferPurchase.entitlement'] = change_offer_purchase_entitlement unless change_offer_purchase_entitlement.nil?
710
+ command.query['changeOfferPurchase.newSku'] = change_offer_purchase_new_sku unless change_offer_purchase_new_sku.nil?
711
+ command.query['createEntitlementPurchase.sku'] = create_entitlement_purchase_sku unless create_entitlement_purchase_sku.nil?
712
+ command.query['languageCode'] = language_code unless language_code.nil?
713
+ command.query['pageSize'] = page_size unless page_size.nil?
714
+ command.query['pageToken'] = page_token unless page_token.nil?
715
+ command.query['fields'] = fields unless fields.nil?
716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
720
+ # Lists the Purchasable SKUs for following cases: * SKUs that can be newly
721
+ # purchased for a customer * SKUs that can be upgraded/downgraded to, for an
722
+ # entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn'
723
+ # t belong to the reseller * INVALID_ARGUMENT: Missing or invalid required
724
+ # parameters in the request.
725
+ # @param [String] customer
726
+ # Required. The resource name of the customer for which to list SKUs. Format:
727
+ # accounts/`account_id`/customers/`customer_id`.
728
+ # @param [String] change_offer_purchase_change_type
729
+ # Required. Change Type for the entitlement.
730
+ # @param [String] change_offer_purchase_entitlement
731
+ # Required. Resource name of the entitlement. Format: accounts/`account_id`/
732
+ # customers/`customer_id`/entitlements/`entitlement_id`
733
+ # @param [String] create_entitlement_purchase_product
734
+ # Required. List SKUs belonging to this Product. Format: products/`product_id`.
735
+ # Supports products/- to retrieve SKUs for all products.
736
+ # @param [String] language_code
737
+ # Optional. The BCP-47 language code, such as "en-US". If specified, the
738
+ # response will be localized to the corresponding language code. Default is "en-
739
+ # US".
740
+ # @param [Fixnum] page_size
741
+ # Optional. Requested page size. Server might return fewer results than
742
+ # requested. If unspecified, at most 100 SKUs will be returned. The maximum
743
+ # value is 1000; values above 1000 will be coerced to 1000.
744
+ # @param [String] page_token
745
+ # Optional. A token identifying a page of results, if other than the first one.
746
+ # @param [String] fields
747
+ # Selector specifying which fields to include in a partial response.
748
+ # @param [String] quota_user
749
+ # Available to use for quota purposes for server-side applications. Can be any
750
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
751
+ # @param [Google::Apis::RequestOptions] options
752
+ # Request-specific options
753
+ #
754
+ # @yield [result, err] Result & error if block supplied
755
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableSkusResponse] parsed result object
756
+ # @yieldparam err [StandardError] error object if request failed
757
+ #
758
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableSkusResponse]
759
+ #
760
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
761
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
762
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
763
+ def list_account_customer_purchasable_skus(customer, change_offer_purchase_change_type: nil, change_offer_purchase_entitlement: nil, create_entitlement_purchase_product: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
764
+ command = make_simple_command(:get, 'v1/{+customer}:listPurchasableSkus', options)
765
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableSkusResponse::Representation
766
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableSkusResponse
767
+ command.params['customer'] = customer unless customer.nil?
768
+ command.query['changeOfferPurchase.changeType'] = change_offer_purchase_change_type unless change_offer_purchase_change_type.nil?
769
+ command.query['changeOfferPurchase.entitlement'] = change_offer_purchase_entitlement unless change_offer_purchase_entitlement.nil?
770
+ command.query['createEntitlementPurchase.product'] = create_entitlement_purchase_product unless create_entitlement_purchase_product.nil?
771
+ command.query['languageCode'] = language_code unless language_code.nil?
772
+ command.query['pageSize'] = page_size unless page_size.nil?
773
+ command.query['pageToken'] = page_token unless page_token.nil?
774
+ command.query['fields'] = fields unless fields.nil?
775
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
776
+ execute_or_queue_command(command, &block)
777
+ end
778
+
779
+ # Updates an existing Customer resource belonging to the reseller or distributor.
780
+ # Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the
781
+ # request and the reseller account being queried for are different. *
782
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request. *
783
+ # NOT_FOUND: No Customer resource found for the name specified in the request.
784
+ # Return Value: If successful, the updated Customer resource, otherwise returns
785
+ # an error.
786
+ # @param [String] name
787
+ # Output only. Resource name of the customer. Format: accounts/`account_id`/
788
+ # customers/`customer_id`
789
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer] google_cloud_channel_v1_customer_object
790
+ # @param [String] update_mask
791
+ # The update mask that applies to the resource. Optional.
792
+ # @param [String] fields
793
+ # Selector specifying which fields to include in a partial response.
794
+ # @param [String] quota_user
795
+ # Available to use for quota purposes for server-side applications. Can be any
796
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
797
+ # @param [Google::Apis::RequestOptions] options
798
+ # Request-specific options
799
+ #
800
+ # @yield [result, err] Result & error if block supplied
801
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer] parsed result object
802
+ # @yieldparam err [StandardError] error object if request failed
803
+ #
804
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer]
805
+ #
806
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
807
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
808
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
809
+ def patch_account_customer(name, google_cloud_channel_v1_customer_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
810
+ command = make_simple_command(:patch, 'v1/{+name}', options)
811
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer::Representation
812
+ command.request_object = google_cloud_channel_v1_customer_object
813
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer::Representation
814
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Customer
815
+ command.params['name'] = name unless name.nil?
816
+ command.query['updateMask'] = update_mask unless update_mask.nil?
817
+ command.query['fields'] = fields unless fields.nil?
818
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
819
+ execute_or_queue_command(command, &block)
820
+ end
821
+
822
+ # Creates a Cloud Identity for the given customer using the customer's
823
+ # information or the information provided here, if present. Possible Error Codes:
824
+ # * PERMISSION_DENIED: If the customer doesn't belong to the reseller. *
825
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request. *
826
+ # NOT_FOUND: If the customer is not found for the reseller. * ALREADY_EXISTS: If
827
+ # the customer's primary email already exists. In this case, retry after
828
+ # changing the customer's primary contact email. * INTERNAL: Any non-user error
829
+ # related to a technical issue in the backend. Contact Cloud Channel support in
830
+ # this case. * UNKNOWN: Any non-user error related to a technical issue in the
831
+ # backend. Contact Cloud Channel support in this case. Return Value: Long
832
+ # Running Operation ID. To get the results of the operation, call the
833
+ # GetOperation method of CloudChannelOperationsService. The Operation metadata
834
+ # will contain an instance of OperationMetadata.
835
+ # @param [String] customer
836
+ # Required. Resource name of the customer. Format: accounts/`account_id`/
837
+ # customers/`customer_id`
838
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ProvisionCloudIdentityRequest] google_cloud_channel_v1_provision_cloud_identity_request_object
839
+ # @param [String] fields
840
+ # Selector specifying which fields to include in a partial response.
841
+ # @param [String] quota_user
842
+ # Available to use for quota purposes for server-side applications. Can be any
843
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
844
+ # @param [Google::Apis::RequestOptions] options
845
+ # Request-specific options
846
+ #
847
+ # @yield [result, err] Result & error if block supplied
848
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
849
+ # @yieldparam err [StandardError] error object if request failed
850
+ #
851
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
852
+ #
853
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
854
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
855
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
856
+ def provision_account_customer_cloud_identity(customer, google_cloud_channel_v1_provision_cloud_identity_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
857
+ command = make_simple_command(:post, 'v1/{+customer}:provisionCloudIdentity', options)
858
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ProvisionCloudIdentityRequest::Representation
859
+ command.request_object = google_cloud_channel_v1_provision_cloud_identity_request_object
860
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
861
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
862
+ command.params['customer'] = customer unless customer.nil?
863
+ command.query['fields'] = fields unless fields.nil?
864
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
865
+ execute_or_queue_command(command, &block)
866
+ end
867
+
868
+ # Transfers customer entitlements to new reseller. Possible Error Codes: *
869
+ # PERMISSION_DENIED: If the customer doesn't belong to the reseller. *
870
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request. *
871
+ # NOT_FOUND: If the customer or offer resource is not found for the reseller. *
872
+ # ALREADY_EXISTS: If the SKU has been already transferred for the customer. *
873
+ # CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the
874
+ # following cases: * Transferring a SKU that requires domain verification and
875
+ # the domain has not been verified. * Transferring an Add-On SKU like Vault or
876
+ # Drive without transferring the pre-requisite SKU, such as G Suite Basic. *
877
+ # Applicable only for developer accounts: reseller and resold domain must follow
878
+ # the domain naming convention as follows: * Domain names must start with goog-
879
+ # test. * Resold domain names must include the reseller domain. * All
880
+ # transferring entitlements must be specified. * INTERNAL: Any non-user error
881
+ # related to a technical issue in the backend. Please contact Cloud Channel
882
+ # Support in this case. * UNKNOWN: Any non-user error related to a technical
883
+ # issue in the backend. Please contact Cloud Channel Support in this case.
884
+ # Return Value: Long Running Operation ID. To get the results of the operation,
885
+ # call the GetOperation method of CloudChannelOperationsService. The Operation
886
+ # metadata will contain an instance of OperationMetadata.
887
+ # @param [String] parent
888
+ # Required. The resource name of reseller's customer account where the
889
+ # entitlements transfer to. The parent takes the format: accounts/`account_id`/
890
+ # customers/`customer_id`
891
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1TransferEntitlementsRequest] google_cloud_channel_v1_transfer_entitlements_request_object
892
+ # @param [String] fields
893
+ # Selector specifying which fields to include in a partial response.
894
+ # @param [String] quota_user
895
+ # Available to use for quota purposes for server-side applications. Can be any
896
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
897
+ # @param [Google::Apis::RequestOptions] options
898
+ # Request-specific options
899
+ #
900
+ # @yield [result, err] Result & error if block supplied
901
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
902
+ # @yieldparam err [StandardError] error object if request failed
903
+ #
904
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
905
+ #
906
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
907
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
908
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
909
+ def transfer_account_customer_entitlements(parent, google_cloud_channel_v1_transfer_entitlements_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
910
+ command = make_simple_command(:post, 'v1/{+parent}:transferEntitlements', options)
911
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1TransferEntitlementsRequest::Representation
912
+ command.request_object = google_cloud_channel_v1_transfer_entitlements_request_object
913
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
914
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
915
+ command.params['parent'] = parent unless parent.nil?
916
+ command.query['fields'] = fields unless fields.nil?
917
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
918
+ execute_or_queue_command(command, &block)
919
+ end
920
+
921
+ # Transfers customer entitlements from current reseller to Google. Possible
922
+ # Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the
923
+ # reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the
924
+ # request. * NOT_FOUND: If the customer or offer resource is not found for the
925
+ # reseller. * ALREADY_EXISTS: If the SKU has been already transferred for the
926
+ # customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen
927
+ # in the following cases: * Transferring a SKU that requires domain verification
928
+ # and the domain has not been verified. * Transferring an Add-On SKU like Vault
929
+ # or Drive without purchasing the pre-requisite SKU, such as G Suite Basic. *
930
+ # Applicable only for developer accounts: reseller and resold domain must follow
931
+ # the domain naming convention as follows: * Domain names must start with goog-
932
+ # test. * Resold domain names must include the reseller domain. * INTERNAL: Any
933
+ # non-user error related to a technical issue in the backend. Please contact
934
+ # Cloud Channel Support in this case. * UNKNOWN: Any non-user error related to a
935
+ # technical issue in the backend. Please contact Cloud Channel Support in this
936
+ # case. Return Value: Long Running Operation ID. To get the results of the
937
+ # operation, call the GetOperation method of CloudChannelOperationsService. The
938
+ # response will contain google.protobuf.Empty on success. The Operation metadata
939
+ # will contain an instance of OperationMetadata.
940
+ # @param [String] parent
941
+ # Required. The resource name of reseller's customer account where the
942
+ # entitlements transfer from. The parent takes the format: accounts/`account_id`/
943
+ # customers/`customer_id`
944
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1TransferEntitlementsToGoogleRequest] google_cloud_channel_v1_transfer_entitlements_to_google_request_object
945
+ # @param [String] fields
946
+ # Selector specifying which fields to include in a partial response.
947
+ # @param [String] quota_user
948
+ # Available to use for quota purposes for server-side applications. Can be any
949
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
950
+ # @param [Google::Apis::RequestOptions] options
951
+ # Request-specific options
952
+ #
953
+ # @yield [result, err] Result & error if block supplied
954
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
955
+ # @yieldparam err [StandardError] error object if request failed
956
+ #
957
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
958
+ #
959
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
960
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
961
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
962
+ def transfer_account_customer_entitlements_to_google(parent, google_cloud_channel_v1_transfer_entitlements_to_google_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
963
+ command = make_simple_command(:post, 'v1/{+parent}:transferEntitlementsToGoogle', options)
964
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1TransferEntitlementsToGoogleRequest::Representation
965
+ command.request_object = google_cloud_channel_v1_transfer_entitlements_to_google_request_object
966
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
967
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
968
+ command.params['parent'] = parent unless parent.nil?
969
+ command.query['fields'] = fields unless fields.nil?
970
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
971
+ execute_or_queue_command(command, &block)
972
+ end
973
+
974
+ # Activates a previously suspended entitlement. The entitlement must be in a
975
+ # suspended state for it to be activated. Entitlements suspended for pending ToS
976
+ # acceptance can't be activated using this method. An entitlement activation is
977
+ # a long-running operation and can result in updates to the state of the
978
+ # customer entitlement. Possible Error Codes: * PERMISSION_DENIED: If the
979
+ # customer doesn't belong to the reseller or if the reseller account making the
980
+ # request and reseller account being queried for are different. *
981
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request. *
982
+ # NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED:
983
+ # Can't activate an entitlement that is pending TOS acceptance. Only reseller
984
+ # initiated suspensions can be activated. * NOT_SUSPENDED: Can't activate
985
+ # entitlements that are already in ACTIVE state. Can only activate suspended
986
+ # entitlements. * INTERNAL: Any non-user error related to a technical issue in
987
+ # the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-
988
+ # user error related to a technical issue in the backend. In this case, contact
989
+ # Cloud Channel support. Return Value: Long Running Operation ID. To get the
990
+ # results of the operation, call the GetOperation method of
991
+ # CloudChannelOperationsService. The Operation metadata will contain an instance
992
+ # of OperationMetadata.
993
+ # @param [String] name
994
+ # Required. The resource name of the entitlement to activate. The name takes the
995
+ # format: accounts/`account_id`/customers/`customer_id`/entitlements/`
996
+ # entitlement_id`
997
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ActivateEntitlementRequest] google_cloud_channel_v1_activate_entitlement_request_object
998
+ # @param [String] fields
999
+ # Selector specifying which fields to include in a partial response.
1000
+ # @param [String] quota_user
1001
+ # Available to use for quota purposes for server-side applications. Can be any
1002
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1003
+ # @param [Google::Apis::RequestOptions] options
1004
+ # Request-specific options
1005
+ #
1006
+ # @yield [result, err] Result & error if block supplied
1007
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1008
+ # @yieldparam err [StandardError] error object if request failed
1009
+ #
1010
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1011
+ #
1012
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1013
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1014
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1015
+ def activate_account_customer_entitlement(name, google_cloud_channel_v1_activate_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1016
+ command = make_simple_command(:post, 'v1/{+name}:activate', options)
1017
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ActivateEntitlementRequest::Representation
1018
+ command.request_object = google_cloud_channel_v1_activate_entitlement_request_object
1019
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1020
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1021
+ command.params['name'] = name unless name.nil?
1022
+ command.query['fields'] = fields unless fields.nil?
1023
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1024
+ execute_or_queue_command(command, &block)
1025
+ end
1026
+
1027
+ # Cancels a previously fulfilled entitlement. An entitlement cancellation is a
1028
+ # long-running operation. Possible Error Codes: * PERMISSION_DENIED: If the
1029
+ # customer doesn't belong to the reseller or if the reseller account making the
1030
+ # request and reseller account being queried for are different. *
1031
+ # FAILED_PRECONDITION: If there are any Google Cloud projects linked to the
1032
+ # Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT:
1033
+ # Missing or invalid required parameters in the request. * NOT_FOUND:
1034
+ # Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only
1035
+ # allowed for Google Workspace add-ons or entitlements for Google Cloud's
1036
+ # development platform. * INTERNAL: Any non-user error related to a technical
1037
+ # issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN:
1038
+ # Any non-user error related to a technical issue in the backend. In this case,
1039
+ # contact Cloud Channel support. Return Value: Long Running Operation ID. To get
1040
+ # the results of the operation, call the GetOperation method of
1041
+ # CloudChannelOperationsService. The response will contain google.protobuf.Empty
1042
+ # on success. The Operation metadata will contain an instance of
1043
+ # OperationMetadata.
1044
+ # @param [String] name
1045
+ # Required. The resource name of the entitlement to cancel. The name takes the
1046
+ # format: accounts/`account_id`/customers/`customer_id`/entitlements/`
1047
+ # entitlement_id`
1048
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1CancelEntitlementRequest] google_cloud_channel_v1_cancel_entitlement_request_object
1049
+ # @param [String] fields
1050
+ # Selector specifying which fields to include in a partial response.
1051
+ # @param [String] quota_user
1052
+ # Available to use for quota purposes for server-side applications. Can be any
1053
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1054
+ # @param [Google::Apis::RequestOptions] options
1055
+ # Request-specific options
1056
+ #
1057
+ # @yield [result, err] Result & error if block supplied
1058
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1059
+ # @yieldparam err [StandardError] error object if request failed
1060
+ #
1061
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1062
+ #
1063
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1064
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1065
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1066
+ def cancel_account_customer_entitlement(name, google_cloud_channel_v1_cancel_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1067
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1068
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1CancelEntitlementRequest::Representation
1069
+ command.request_object = google_cloud_channel_v1_cancel_entitlement_request_object
1070
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1071
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1072
+ command.params['name'] = name unless name.nil?
1073
+ command.query['fields'] = fields unless fields.nil?
1074
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1075
+ execute_or_queue_command(command, &block)
1076
+ end
1077
+
1078
+ # Updates the Offer for an existing customer entitlement. An entitlement update
1079
+ # is a long-running operation and results in updates to the entitlement as a
1080
+ # result of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the
1081
+ # customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or
1082
+ # invalid required parameters in the request. * NOT_FOUND: Offer or Entitlement
1083
+ # resource not found. * INTERNAL: Any non-user error related to a technical
1084
+ # issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN:
1085
+ # Any non-user error related to a technical issue in the backend. In this case,
1086
+ # contact Cloud Channel support. Return Value: Long Running Operation ID. To get
1087
+ # the results of the operation, call the GetOperation method of
1088
+ # CloudChannelOperationsService. The Operation metadata will contain an instance
1089
+ # of OperationMetadata.
1090
+ # @param [String] name
1091
+ # Required. The name of the entitlement to update. Format: accounts/`account_id`/
1092
+ # customers/`customer_id`/entitlements/`entitlement_id`
1093
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChangeOfferRequest] google_cloud_channel_v1_change_offer_request_object
1094
+ # @param [String] fields
1095
+ # Selector specifying which fields to include in a partial response.
1096
+ # @param [String] quota_user
1097
+ # Available to use for quota purposes for server-side applications. Can be any
1098
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1099
+ # @param [Google::Apis::RequestOptions] options
1100
+ # Request-specific options
1101
+ #
1102
+ # @yield [result, err] Result & error if block supplied
1103
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1104
+ # @yieldparam err [StandardError] error object if request failed
1105
+ #
1106
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1107
+ #
1108
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1109
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1110
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1111
+ def change_account_customer_entitlement_offer(name, google_cloud_channel_v1_change_offer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1112
+ command = make_simple_command(:post, 'v1/{+name}:changeOffer', options)
1113
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChangeOfferRequest::Representation
1114
+ command.request_object = google_cloud_channel_v1_change_offer_request_object
1115
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1116
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1117
+ command.params['name'] = name unless name.nil?
1118
+ command.query['fields'] = fields unless fields.nil?
1119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1120
+ execute_or_queue_command(command, &block)
1121
+ end
1122
+
1123
+ # Change parameters of the entitlement An entitlement parameters update is a
1124
+ # long-running operation and results in updates to the entitlement as a result
1125
+ # of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the customer
1126
+ # doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid
1127
+ # required parameters in the request. For example, if the number of seats being
1128
+ # changed to is greater than the allowed number of max seats for the resource.
1129
+ # Or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement
1130
+ # resource not found. * INTERNAL: Any non-user error related to a technical
1131
+ # issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN:
1132
+ # Any non-user error related to a technical issue in the backend. In this case,
1133
+ # contact Cloud Channel support. Return Value: Long Running Operation ID. To get
1134
+ # the results of the operation, call the GetOperation method of
1135
+ # CloudChannelOperationsService. The Operation metadata will contain an instance
1136
+ # of OperationMetadata.
1137
+ # @param [String] name
1138
+ # Required. The name of the entitlement to update. The name takes the format:
1139
+ # accounts/`account_id`/customers/`customer_id`/entitlements/`entitlement_id`
1140
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChangeParametersRequest] google_cloud_channel_v1_change_parameters_request_object
1141
+ # @param [String] fields
1142
+ # Selector specifying which fields to include in a partial response.
1143
+ # @param [String] quota_user
1144
+ # Available to use for quota purposes for server-side applications. Can be any
1145
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1146
+ # @param [Google::Apis::RequestOptions] options
1147
+ # Request-specific options
1148
+ #
1149
+ # @yield [result, err] Result & error if block supplied
1150
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1151
+ # @yieldparam err [StandardError] error object if request failed
1152
+ #
1153
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1154
+ #
1155
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1156
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1157
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1158
+ def change_account_customer_entitlement_parameters(name, google_cloud_channel_v1_change_parameters_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1159
+ command = make_simple_command(:post, 'v1/{+name}:changeParameters', options)
1160
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChangeParametersRequest::Representation
1161
+ command.request_object = google_cloud_channel_v1_change_parameters_request_object
1162
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1163
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1164
+ command.params['name'] = name unless name.nil?
1165
+ command.query['fields'] = fields unless fields.nil?
1166
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1167
+ execute_or_queue_command(command, &block)
1168
+ end
1169
+
1170
+ # Updates the renewal settings for an existing customer entitlement. An
1171
+ # entitlement update is a long-running operation and results in updates to the
1172
+ # entitlement as a result of fulfillment. Possible Error Codes: *
1173
+ # PERMISSION_DENIED: If the customer doesn't belong to the reseller. *
1174
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request. *
1175
+ # NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal
1176
+ # Settings are only applicable for a commitment plan. Can't enable or disable
1177
+ # renewal for non-commitment plans. * INTERNAL: Any non user error related to a
1178
+ # technical issue in the backend. In this case, contact Cloud Channel support. *
1179
+ # UNKNOWN: Any non user error related to a technical issue in the backend. In
1180
+ # this case, contact Cloud Channel support. Return Value: Long Running Operation
1181
+ # ID. To get the results of the operation, call the GetOperation method of
1182
+ # CloudChannelOperationsService. The Operation metadata will contain an instance
1183
+ # of OperationMetadata.
1184
+ # @param [String] name
1185
+ # Required. The name of the entitlement to update. The name takes the format:
1186
+ # accounts/`account_id`/customers/`customer_id`/entitlements/`entitlement_id`
1187
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChangeRenewalSettingsRequest] google_cloud_channel_v1_change_renewal_settings_request_object
1188
+ # @param [String] fields
1189
+ # Selector specifying which fields to include in a partial response.
1190
+ # @param [String] quota_user
1191
+ # Available to use for quota purposes for server-side applications. Can be any
1192
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1193
+ # @param [Google::Apis::RequestOptions] options
1194
+ # Request-specific options
1195
+ #
1196
+ # @yield [result, err] Result & error if block supplied
1197
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1198
+ # @yieldparam err [StandardError] error object if request failed
1199
+ #
1200
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1201
+ #
1202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1205
+ def change_account_customer_entitlement_renewal_settings(name, google_cloud_channel_v1_change_renewal_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1206
+ command = make_simple_command(:post, 'v1/{+name}:changeRenewalSettings', options)
1207
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ChangeRenewalSettingsRequest::Representation
1208
+ command.request_object = google_cloud_channel_v1_change_renewal_settings_request_object
1209
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1210
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1211
+ command.params['name'] = name unless name.nil?
1212
+ command.query['fields'] = fields unless fields.nil?
1213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1214
+ execute_or_queue_command(command, &block)
1215
+ end
1216
+
1217
+ # Creates an entitlement for a customer. Possible Error Codes: *
1218
+ # PERMISSION_DENIED: If the customer doesn't belong to the reseller. *
1219
+ # INVALID_ARGUMENT: It can happen in below scenarios - * Missing or invalid
1220
+ # required parameters in the request. * Cannot purchase an entitlement if there
1221
+ # is already an entitlement for customer, for a SKU from the same product family.
1222
+ # * INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is valid. If
1223
+ # it is valid, then contact Google Channel support for further troubleshooting. *
1224
+ # NOT_FOUND: If the customer or offer resource is not found for the reseller. *
1225
+ # ALREADY_EXISTS: This failure can happen in the following cases: * If the SKU
1226
+ # has been already purchased for the customer. * If the customer's primary email
1227
+ # already exists. In this case retry after changing the customer's primary
1228
+ # contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can
1229
+ # happen in the following cases: * Purchasing a SKU that requires domain
1230
+ # verification and the domain has not been verified. * Purchasing an Add-On SKU
1231
+ # like Vault or Drive without purchasing the pre-requisite SKU, such as Google
1232
+ # Workspace Business Starter. * Applicable only for developer accounts: reseller
1233
+ # and resold domain. Must meet the following domain naming requirements: *
1234
+ # Domain names must start with goog-test. * Resold domain names must include the
1235
+ # reseller domain. * INTERNAL: Any non-user error related to a technical issue
1236
+ # in the backend. Contact Cloud Channel Support in this case. * UNKNOWN: Any non-
1237
+ # user error related to a technical issue in the backend. Contact Cloud Channel
1238
+ # Support in this case. Return Value: Long Running Operation ID. To get the
1239
+ # results of the operation, call the GetOperation method of
1240
+ # CloudChannelOperationsService. The Operation metadata will contain an instance
1241
+ # of OperationMetadata.
1242
+ # @param [String] parent
1243
+ # Required. The resource name of reseller's customer account in which to create
1244
+ # the entitlement. The parent takes the format: accounts/`account_id`/customers/`
1245
+ # customer_id`
1246
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1CreateEntitlementRequest] google_cloud_channel_v1_create_entitlement_request_object
1247
+ # @param [String] fields
1248
+ # Selector specifying which fields to include in a partial response.
1249
+ # @param [String] quota_user
1250
+ # Available to use for quota purposes for server-side applications. Can be any
1251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1252
+ # @param [Google::Apis::RequestOptions] options
1253
+ # Request-specific options
1254
+ #
1255
+ # @yield [result, err] Result & error if block supplied
1256
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1257
+ # @yieldparam err [StandardError] error object if request failed
1258
+ #
1259
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1260
+ #
1261
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1262
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1263
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1264
+ def create_account_customer_entitlement(parent, google_cloud_channel_v1_create_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1265
+ command = make_simple_command(:post, 'v1/{+parent}/entitlements', options)
1266
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1CreateEntitlementRequest::Representation
1267
+ command.request_object = google_cloud_channel_v1_create_entitlement_request_object
1268
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1269
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1270
+ command.params['parent'] = parent unless parent.nil?
1271
+ command.query['fields'] = fields unless fields.nil?
1272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1273
+ execute_or_queue_command(command, &block)
1274
+ end
1275
+
1276
+ # Returns a requested Entitlement resource. Possible Error Codes: *
1277
+ # PERMISSION_DENIED: If the customer doesn't belong to the reseller. *
1278
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request. *
1279
+ # NOT_FOUND: If the entitlement is not found for the customer. Return Value: If
1280
+ # found, the requested Entitlement resource, otherwise returns an error.
1281
+ # @param [String] name
1282
+ # Required. The resource name of the entitlement to retrieve. The name takes the
1283
+ # format: accounts/`account_id`/customers/`customer_id`/entitlements/`id`
1284
+ # @param [String] fields
1285
+ # Selector specifying which fields to include in a partial response.
1286
+ # @param [String] quota_user
1287
+ # Available to use for quota purposes for server-side applications. Can be any
1288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1289
+ # @param [Google::Apis::RequestOptions] options
1290
+ # Request-specific options
1291
+ #
1292
+ # @yield [result, err] Result & error if block supplied
1293
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Entitlement] parsed result object
1294
+ # @yieldparam err [StandardError] error object if request failed
1295
+ #
1296
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1Entitlement]
1297
+ #
1298
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1299
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1300
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1301
+ def get_account_customer_entitlement(name, fields: nil, quota_user: nil, options: nil, &block)
1302
+ command = make_simple_command(:get, 'v1/{+name}', options)
1303
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Entitlement::Representation
1304
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1Entitlement
1305
+ command.params['name'] = name unless name.nil?
1306
+ command.query['fields'] = fields unless fields.nil?
1307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1308
+ execute_or_queue_command(command, &block)
1309
+ end
1310
+
1311
+ # List Entitlements belonging to a customer. Possible Error Codes: *
1312
+ # PERMISSION_DENIED: If the customer doesn't belong to the reseller. *
1313
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request.
1314
+ # Return Value: List of Entitlements belonging to the customer, or empty list if
1315
+ # there are none.
1316
+ # @param [String] parent
1317
+ # Required. The resource name of the reseller's customer account for which to
1318
+ # list entitlements. The parent takes the format: accounts/`account_id`/
1319
+ # customers/`customer_id`
1320
+ # @param [Fixnum] page_size
1321
+ # Optional. Requested page size. Server might return fewer results than
1322
+ # requested. If unspecified, at most 50 entitlements will be returned. The
1323
+ # maximum value is 100; values above 100 will be coerced to 100.
1324
+ # @param [String] page_token
1325
+ # Optional. A token identifying a page of results, if other than the first one.
1326
+ # Typically obtained via ListEntitlementsResponse.next_page_token of the
1327
+ # previous CloudChannelService.ListEntitlements call.
1328
+ # @param [String] fields
1329
+ # Selector specifying which fields to include in a partial response.
1330
+ # @param [String] quota_user
1331
+ # Available to use for quota purposes for server-side applications. Can be any
1332
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1333
+ # @param [Google::Apis::RequestOptions] options
1334
+ # Request-specific options
1335
+ #
1336
+ # @yield [result, err] Result & error if block supplied
1337
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListEntitlementsResponse] parsed result object
1338
+ # @yieldparam err [StandardError] error object if request failed
1339
+ #
1340
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListEntitlementsResponse]
1341
+ #
1342
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1343
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1344
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1345
+ def list_account_customer_entitlements(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1346
+ command = make_simple_command(:get, 'v1/{+parent}/entitlements', options)
1347
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListEntitlementsResponse::Representation
1348
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListEntitlementsResponse
1349
+ command.params['parent'] = parent unless parent.nil?
1350
+ command.query['pageSize'] = page_size unless page_size.nil?
1351
+ command.query['pageToken'] = page_token unless page_token.nil?
1352
+ command.query['fields'] = fields unless fields.nil?
1353
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1354
+ execute_or_queue_command(command, &block)
1355
+ end
1356
+
1357
+ # Starts paid service for a trial entitlement. Starts paid service for a trial
1358
+ # entitlement immediately. This method is only applicable if a plan has already
1359
+ # been set up for a trial entitlement but has some trial days remaining.
1360
+ # Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to
1361
+ # the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in
1362
+ # the request. * NOT_FOUND: Entitlement resource not found. *
1363
+ # FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on
1364
+ # trial plans. * INTERNAL: Any non-user error related to a technical issue in
1365
+ # the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-
1366
+ # user error related to a technical issue in the backend. In this case, contact
1367
+ # Cloud Channel support. Return Value: Long Running Operation ID. To get the
1368
+ # results of the operation, call the GetOperation method of
1369
+ # CloudChannelOperationsService. The Operation metadata will contain an instance
1370
+ # of OperationMetadata.
1371
+ # @param [String] name
1372
+ # Required. The name of the entitlement for which paid service is being started.
1373
+ # The name takes the format: accounts/`account_id`/customers/`customer_id`/
1374
+ # entitlements/`entitlement_id`
1375
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1StartPaidServiceRequest] google_cloud_channel_v1_start_paid_service_request_object
1376
+ # @param [String] fields
1377
+ # Selector specifying which fields to include in a partial response.
1378
+ # @param [String] quota_user
1379
+ # Available to use for quota purposes for server-side applications. Can be any
1380
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1381
+ # @param [Google::Apis::RequestOptions] options
1382
+ # Request-specific options
1383
+ #
1384
+ # @yield [result, err] Result & error if block supplied
1385
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1386
+ # @yieldparam err [StandardError] error object if request failed
1387
+ #
1388
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1389
+ #
1390
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1391
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1392
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1393
+ def start_account_customer_entitlement_paid_service(name, google_cloud_channel_v1_start_paid_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1394
+ command = make_simple_command(:post, 'v1/{+name}:startPaidService', options)
1395
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1StartPaidServiceRequest::Representation
1396
+ command.request_object = google_cloud_channel_v1_start_paid_service_request_object
1397
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1398
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1399
+ command.params['name'] = name unless name.nil?
1400
+ command.query['fields'] = fields unless fields.nil?
1401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1402
+ execute_or_queue_command(command, &block)
1403
+ end
1404
+
1405
+ # Suspends a previously fulfilled entitlement. An entitlement suspension is a
1406
+ # long-running operation. Possible Error Codes: * PERMISSION_DENIED: If the
1407
+ # customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or
1408
+ # invalid required parameters in the request. * NOT_FOUND: Entitlement resource
1409
+ # not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user
1410
+ # error related to a technical issue in the backend. In this case, contact Cloud
1411
+ # Channel support. * UNKNOWN: Any non-user error related to a technical issue in
1412
+ # the backend. In this case, contact Cloud Channel support. Return Value: Long
1413
+ # Running Operation ID. To get the results of the operation, call the
1414
+ # GetOperation method of CloudChannelOperationsService. The Operation metadata
1415
+ # will contain an instance of OperationMetadata.
1416
+ # @param [String] name
1417
+ # Required. The resource name of the entitlement to suspend. The name takes the
1418
+ # format: accounts/`account_id`/customers/`customer_id`/entitlements/`
1419
+ # entitlement_id`
1420
+ # @param [Google::Apis::CloudchannelV1::GoogleCloudChannelV1SuspendEntitlementRequest] google_cloud_channel_v1_suspend_entitlement_request_object
1421
+ # @param [String] fields
1422
+ # Selector specifying which fields to include in a partial response.
1423
+ # @param [String] quota_user
1424
+ # Available to use for quota purposes for server-side applications. Can be any
1425
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1426
+ # @param [Google::Apis::RequestOptions] options
1427
+ # Request-specific options
1428
+ #
1429
+ # @yield [result, err] Result & error if block supplied
1430
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1431
+ # @yieldparam err [StandardError] error object if request failed
1432
+ #
1433
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1434
+ #
1435
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1436
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1437
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1438
+ def suspend_account_customer_entitlement(name, google_cloud_channel_v1_suspend_entitlement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1439
+ command = make_simple_command(:post, 'v1/{+name}:suspend', options)
1440
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1SuspendEntitlementRequest::Representation
1441
+ command.request_object = google_cloud_channel_v1_suspend_entitlement_request_object
1442
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1443
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1444
+ command.params['name'] = name unless name.nil?
1445
+ command.query['fields'] = fields unless fields.nil?
1446
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1447
+ execute_or_queue_command(command, &block)
1448
+ end
1449
+
1450
+ # Lists the Offers the reseller can sell. Possible Error Codes: *
1451
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request.
1452
+ # @param [String] parent
1453
+ # Required. The resource name of the reseller account from which to list Offers.
1454
+ # The parent takes the format: accounts/`account_id`.
1455
+ # @param [String] filter
1456
+ # Optional. The expression to filter results by name (name of the Offer), sku.
1457
+ # name (name of the SKU) or sku.product.name (name of the Product). Example 1:
1458
+ # sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=
1459
+ # accounts/a1/offers/o1
1460
+ # @param [String] language_code
1461
+ # Optional. The BCP-47 language code, such as "en-US". If specified, the
1462
+ # response will be localized to the corresponding language code. Default is "en-
1463
+ # US".
1464
+ # @param [Fixnum] page_size
1465
+ # Optional. Requested page size. Server might return fewer results than
1466
+ # requested. If unspecified, at most 500 Offers will be returned. The maximum
1467
+ # value is 1000; values above 1000 will be coerced to 1000.
1468
+ # @param [String] page_token
1469
+ # Optional. A token identifying a page of results, if other than the first one.
1470
+ # @param [String] fields
1471
+ # Selector specifying which fields to include in a partial response.
1472
+ # @param [String] quota_user
1473
+ # Available to use for quota purposes for server-side applications. Can be any
1474
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1475
+ # @param [Google::Apis::RequestOptions] options
1476
+ # Request-specific options
1477
+ #
1478
+ # @yield [result, err] Result & error if block supplied
1479
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListOffersResponse] parsed result object
1480
+ # @yieldparam err [StandardError] error object if request failed
1481
+ #
1482
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListOffersResponse]
1483
+ #
1484
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1485
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1486
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1487
+ def list_account_offers(parent, filter: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1488
+ command = make_simple_command(:get, 'v1/{+parent}/offers', options)
1489
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListOffersResponse::Representation
1490
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListOffersResponse
1491
+ command.params['parent'] = parent unless parent.nil?
1492
+ command.query['filter'] = filter unless filter.nil?
1493
+ command.query['languageCode'] = language_code unless language_code.nil?
1494
+ command.query['pageSize'] = page_size unless page_size.nil?
1495
+ command.query['pageToken'] = page_token unless page_token.nil?
1496
+ command.query['fields'] = fields unless fields.nil?
1497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1498
+ execute_or_queue_command(command, &block)
1499
+ end
1500
+
1501
+ # Starts asynchronous cancellation on a long-running operation. The server makes
1502
+ # a best effort to cancel the operation, but success is not guaranteed. If the
1503
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1504
+ # Clients can use Operations.GetOperation or other methods to check whether the
1505
+ # cancellation succeeded or whether the operation completed despite cancellation.
1506
+ # On successful cancellation, the operation is not deleted; instead, it becomes
1507
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1508
+ # corresponding to `Code.CANCELLED`.
1509
+ # @param [String] name
1510
+ # The name of the operation resource to be cancelled.
1511
+ # @param [Google::Apis::CloudchannelV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_object
1512
+ # @param [String] fields
1513
+ # Selector specifying which fields to include in a partial response.
1514
+ # @param [String] quota_user
1515
+ # Available to use for quota purposes for server-side applications. Can be any
1516
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1517
+ # @param [Google::Apis::RequestOptions] options
1518
+ # Request-specific options
1519
+ #
1520
+ # @yield [result, err] Result & error if block supplied
1521
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleProtobufEmpty] parsed result object
1522
+ # @yieldparam err [StandardError] error object if request failed
1523
+ #
1524
+ # @return [Google::Apis::CloudchannelV1::GoogleProtobufEmpty]
1525
+ #
1526
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1527
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1528
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1529
+ def cancel_operation(name, google_longrunning_cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1530
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1531
+ command.request_representation = Google::Apis::CloudchannelV1::GoogleLongrunningCancelOperationRequest::Representation
1532
+ command.request_object = google_longrunning_cancel_operation_request_object
1533
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleProtobufEmpty::Representation
1534
+ command.response_class = Google::Apis::CloudchannelV1::GoogleProtobufEmpty
1535
+ command.params['name'] = name unless name.nil?
1536
+ command.query['fields'] = fields unless fields.nil?
1537
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1538
+ execute_or_queue_command(command, &block)
1539
+ end
1540
+
1541
+ # Deletes a long-running operation. This method indicates that the client is no
1542
+ # longer interested in the operation result. It does not cancel the operation.
1543
+ # If the server doesn't support this method, it returns `google.rpc.Code.
1544
+ # UNIMPLEMENTED`.
1545
+ # @param [String] name
1546
+ # The name of the operation resource to be deleted.
1547
+ # @param [String] fields
1548
+ # Selector specifying which fields to include in a partial response.
1549
+ # @param [String] quota_user
1550
+ # Available to use for quota purposes for server-side applications. Can be any
1551
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1552
+ # @param [Google::Apis::RequestOptions] options
1553
+ # Request-specific options
1554
+ #
1555
+ # @yield [result, err] Result & error if block supplied
1556
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleProtobufEmpty] parsed result object
1557
+ # @yieldparam err [StandardError] error object if request failed
1558
+ #
1559
+ # @return [Google::Apis::CloudchannelV1::GoogleProtobufEmpty]
1560
+ #
1561
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1562
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1563
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1564
+ def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1565
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1566
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleProtobufEmpty::Representation
1567
+ command.response_class = Google::Apis::CloudchannelV1::GoogleProtobufEmpty
1568
+ command.params['name'] = name unless name.nil?
1569
+ command.query['fields'] = fields unless fields.nil?
1570
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1571
+ execute_or_queue_command(command, &block)
1572
+ end
1573
+
1574
+ # Gets the latest state of a long-running operation. Clients can use this method
1575
+ # to poll the operation result at intervals as recommended by the API service.
1576
+ # @param [String] name
1577
+ # The name of the operation resource.
1578
+ # @param [String] fields
1579
+ # Selector specifying which fields to include in a partial response.
1580
+ # @param [String] quota_user
1581
+ # Available to use for quota purposes for server-side applications. Can be any
1582
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1583
+ # @param [Google::Apis::RequestOptions] options
1584
+ # Request-specific options
1585
+ #
1586
+ # @yield [result, err] Result & error if block supplied
1587
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningOperation] parsed result object
1588
+ # @yieldparam err [StandardError] error object if request failed
1589
+ #
1590
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningOperation]
1591
+ #
1592
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1593
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1594
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1595
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1596
+ command = make_simple_command(:get, 'v1/{+name}', options)
1597
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningOperation::Representation
1598
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningOperation
1599
+ command.params['name'] = name unless name.nil?
1600
+ command.query['fields'] = fields unless fields.nil?
1601
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1602
+ execute_or_queue_command(command, &block)
1603
+ end
1604
+
1605
+ # Lists operations that match the specified filter in the request. If the server
1606
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
1607
+ # binding allows API services to override the binding to use different resource
1608
+ # name schemes, such as `users/*/operations`. To override the binding, API
1609
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
1610
+ # service configuration. For backwards compatibility, the default name includes
1611
+ # the operations collection id, however overriding users must ensure the name
1612
+ # binding is the parent resource, without the operations collection id.
1613
+ # @param [String] name
1614
+ # The name of the operation's parent resource.
1615
+ # @param [String] filter
1616
+ # The standard list filter.
1617
+ # @param [Fixnum] page_size
1618
+ # The standard list page size.
1619
+ # @param [String] page_token
1620
+ # The standard list page token.
1621
+ # @param [String] fields
1622
+ # Selector specifying which fields to include in a partial response.
1623
+ # @param [String] quota_user
1624
+ # Available to use for quota purposes for server-side applications. Can be any
1625
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1626
+ # @param [Google::Apis::RequestOptions] options
1627
+ # Request-specific options
1628
+ #
1629
+ # @yield [result, err] Result & error if block supplied
1630
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleLongrunningListOperationsResponse] parsed result object
1631
+ # @yieldparam err [StandardError] error object if request failed
1632
+ #
1633
+ # @return [Google::Apis::CloudchannelV1::GoogleLongrunningListOperationsResponse]
1634
+ #
1635
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1636
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1637
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1638
+ def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1639
+ command = make_simple_command(:get, 'v1/{+name}', options)
1640
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleLongrunningListOperationsResponse::Representation
1641
+ command.response_class = Google::Apis::CloudchannelV1::GoogleLongrunningListOperationsResponse
1642
+ command.params['name'] = name unless name.nil?
1643
+ command.query['filter'] = filter unless filter.nil?
1644
+ command.query['pageSize'] = page_size unless page_size.nil?
1645
+ command.query['pageToken'] = page_token unless page_token.nil?
1646
+ command.query['fields'] = fields unless fields.nil?
1647
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1648
+ execute_or_queue_command(command, &block)
1649
+ end
1650
+
1651
+ # Lists the Products the reseller is authorized to sell. Possible Error Codes: *
1652
+ # INVALID_ARGUMENT: Missing or invalid required parameters in the request.
1653
+ # @param [String] account
1654
+ # Required. The resource name of the reseller account. Format: accounts/`
1655
+ # account_id`.
1656
+ # @param [String] language_code
1657
+ # Optional. The BCP-47 language code, such as "en-US". If specified, the
1658
+ # response will be localized to the corresponding language code. Default is "en-
1659
+ # US".
1660
+ # @param [Fixnum] page_size
1661
+ # Optional. Requested page size. Server might return fewer results than
1662
+ # requested. If unspecified, at most 100 Products will be returned. The maximum
1663
+ # value is 1000; values above 1000 will be coerced to 1000.
1664
+ # @param [String] page_token
1665
+ # Optional. A token identifying a page of results, if other than the first one.
1666
+ # @param [String] fields
1667
+ # Selector specifying which fields to include in a partial response.
1668
+ # @param [String] quota_user
1669
+ # Available to use for quota purposes for server-side applications. Can be any
1670
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1671
+ # @param [Google::Apis::RequestOptions] options
1672
+ # Request-specific options
1673
+ #
1674
+ # @yield [result, err] Result & error if block supplied
1675
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListProductsResponse] parsed result object
1676
+ # @yieldparam err [StandardError] error object if request failed
1677
+ #
1678
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListProductsResponse]
1679
+ #
1680
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1681
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1682
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1683
+ def list_products(account: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1684
+ command = make_simple_command(:get, 'v1/products', options)
1685
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListProductsResponse::Representation
1686
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListProductsResponse
1687
+ command.query['account'] = account unless account.nil?
1688
+ command.query['languageCode'] = language_code unless language_code.nil?
1689
+ command.query['pageSize'] = page_size unless page_size.nil?
1690
+ command.query['pageToken'] = page_token unless page_token.nil?
1691
+ command.query['fields'] = fields unless fields.nil?
1692
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1693
+ execute_or_queue_command(command, &block)
1694
+ end
1695
+
1696
+ # Lists the SKUs for a product the reseller is authorized to sell. Possible
1697
+ # Error Codes: * INVALID_ARGUMENT: Missing or invalid required parameters in the
1698
+ # request.
1699
+ # @param [String] parent
1700
+ # Required. The resource name of the Product for which to list SKUs. The parent
1701
+ # takes the format: products/`product_id`. Supports products/- to retrieve SKUs
1702
+ # for all products.
1703
+ # @param [String] account
1704
+ # Required. Resource name of the reseller. Format: accounts/`account_id`.
1705
+ # @param [String] language_code
1706
+ # Optional. The BCP-47 language code, such as "en-US". If specified, the
1707
+ # response will be localized to the corresponding language code. Default is "en-
1708
+ # US".
1709
+ # @param [Fixnum] page_size
1710
+ # Optional. Requested page size. Server might return fewer results than
1711
+ # requested. If unspecified, at most 100 SKUs will be returned. The maximum
1712
+ # value is 1000; values above 1000 will be coerced to 1000.
1713
+ # @param [String] page_token
1714
+ # Optional. A token identifying a page of results, if other than the first one.
1715
+ # Optional.
1716
+ # @param [String] fields
1717
+ # Selector specifying which fields to include in a partial response.
1718
+ # @param [String] quota_user
1719
+ # Available to use for quota purposes for server-side applications. Can be any
1720
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1721
+ # @param [Google::Apis::RequestOptions] options
1722
+ # Request-specific options
1723
+ #
1724
+ # @yield [result, err] Result & error if block supplied
1725
+ # @yieldparam result [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSkusResponse] parsed result object
1726
+ # @yieldparam err [StandardError] error object if request failed
1727
+ #
1728
+ # @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSkusResponse]
1729
+ #
1730
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1731
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1732
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1733
+ def list_product_skus(parent, account: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1734
+ command = make_simple_command(:get, 'v1/{+parent}/skus', options)
1735
+ command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSkusResponse::Representation
1736
+ command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListSkusResponse
1737
+ command.params['parent'] = parent unless parent.nil?
1738
+ command.query['account'] = account unless account.nil?
1739
+ command.query['languageCode'] = language_code unless language_code.nil?
1740
+ command.query['pageSize'] = page_size unless page_size.nil?
1741
+ command.query['pageToken'] = page_token unless page_token.nil?
1742
+ command.query['fields'] = fields unless fields.nil?
1743
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1744
+ execute_or_queue_command(command, &block)
1745
+ end
1746
+
1747
+ protected
1748
+
1749
+ def apply_command_defaults(command)
1750
+ command.query['key'] = key unless key.nil?
1751
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1752
+ end
1753
+ end
1754
+ end
1755
+ end
1756
+ end