google-apis-cloudsupport_v2beta 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/cloudsupport_v2beta/classes.rb +1134 -0
- data/lib/google/apis/cloudsupport_v2beta/gem_version.rb +28 -0
- data/lib/google/apis/cloudsupport_v2beta/representations.rb +487 -0
- data/lib/google/apis/cloudsupport_v2beta/service.rb +602 -0
- data/lib/google/apis/cloudsupport_v2beta.rb +37 -0
- data/lib/google-apis-cloudsupport_v2beta.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,602 @@
|
|
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 CloudsupportV2beta
|
23
|
+
# Google Cloud Support API
|
24
|
+
#
|
25
|
+
# Manages Google Cloud technical support cases for Customer Care support
|
26
|
+
# offerings.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/cloudsupport_v2beta'
|
30
|
+
#
|
31
|
+
# Cloudsupport = Google::Apis::CloudsupportV2beta # Alias the module
|
32
|
+
# service = Cloudsupport::CloudSupportService.new
|
33
|
+
#
|
34
|
+
# @see https://cloud.google.com/support/docs/apis
|
35
|
+
class CloudSupportService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://cloudsupport.googleapis.com/', '',
|
48
|
+
client_name: 'google-apis-cloudsupport_v2beta',
|
49
|
+
client_version: Google::Apis::CloudsupportV2beta::GEM_VERSION)
|
50
|
+
@batch_path = 'batch'
|
51
|
+
end
|
52
|
+
|
53
|
+
# Create a file attachment on a case or Cloud resource.
|
54
|
+
# @param [String] parent
|
55
|
+
# Required. The resource name of the case to which attachment should be attached.
|
56
|
+
# @param [Google::Apis::CloudsupportV2beta::CreateAttachmentRequest] create_attachment_request_object
|
57
|
+
# @param [String] fields
|
58
|
+
# Selector specifying which fields to include in a partial response.
|
59
|
+
# @param [String] quota_user
|
60
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
61
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
62
|
+
# @param [Google::Apis::RequestOptions] options
|
63
|
+
# Request-specific options
|
64
|
+
#
|
65
|
+
# @yield [result, err] Result & error if block supplied
|
66
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Attachment] parsed result object
|
67
|
+
# @yieldparam err [StandardError] error object if request failed
|
68
|
+
#
|
69
|
+
# @return [Google::Apis::CloudsupportV2beta::Attachment]
|
70
|
+
#
|
71
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
72
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
73
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
74
|
+
def create_attachment(parent, create_attachment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
75
|
+
command = make_simple_command(:post, 'v2beta/{+parent}/attachments', options)
|
76
|
+
command.request_representation = Google::Apis::CloudsupportV2beta::CreateAttachmentRequest::Representation
|
77
|
+
command.request_object = create_attachment_request_object
|
78
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Attachment::Representation
|
79
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Attachment
|
80
|
+
command.params['parent'] = parent unless parent.nil?
|
81
|
+
command.query['fields'] = fields unless fields.nil?
|
82
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
|
+
execute_or_queue_command(command, &block)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Retrieve valid classifications to be used when creating a support case. The
|
87
|
+
# classications are hierarchical, with each classification containing all levels
|
88
|
+
# of the hierarchy, separated by " > ". For example "Technical Issue > Compute >
|
89
|
+
# Compute Engine".
|
90
|
+
# @param [Fixnum] page_size
|
91
|
+
# The maximum number of cases fetched with each request.
|
92
|
+
# @param [String] page_token
|
93
|
+
# A token identifying the page of results to return. If unspecified, the first
|
94
|
+
# page is retrieved.
|
95
|
+
# @param [String] query
|
96
|
+
# An expression written in the Cloud filter language. If non-empty, then only
|
97
|
+
# cases whose fields match the filter are returned. If empty, then no messages
|
98
|
+
# are filtered out.
|
99
|
+
# @param [String] fields
|
100
|
+
# Selector specifying which fields to include in a partial response.
|
101
|
+
# @param [String] quota_user
|
102
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
103
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
104
|
+
# @param [Google::Apis::RequestOptions] options
|
105
|
+
# Request-specific options
|
106
|
+
#
|
107
|
+
# @yield [result, err] Result & error if block supplied
|
108
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse] parsed result object
|
109
|
+
# @yieldparam err [StandardError] error object if request failed
|
110
|
+
#
|
111
|
+
# @return [Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse]
|
112
|
+
#
|
113
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
+
def search_case_classifications(page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
117
|
+
command = make_simple_command(:get, 'v2beta/caseClassifications:search', options)
|
118
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse::Representation
|
119
|
+
command.response_class = Google::Apis::CloudsupportV2beta::SearchCaseClassificationsResponse
|
120
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
121
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
122
|
+
command.query['query'] = query unless query.nil?
|
123
|
+
command.query['fields'] = fields unless fields.nil?
|
124
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
125
|
+
execute_or_queue_command(command, &block)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Close the specified case.
|
129
|
+
# @param [String] name
|
130
|
+
# Required. The fully qualified name of the case resource to be closed.
|
131
|
+
# @param [Google::Apis::CloudsupportV2beta::CloseCaseRequest] close_case_request_object
|
132
|
+
# @param [String] fields
|
133
|
+
# Selector specifying which fields to include in a partial response.
|
134
|
+
# @param [String] quota_user
|
135
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
136
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
137
|
+
# @param [Google::Apis::RequestOptions] options
|
138
|
+
# Request-specific options
|
139
|
+
#
|
140
|
+
# @yield [result, err] Result & error if block supplied
|
141
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Case] parsed result object
|
142
|
+
# @yieldparam err [StandardError] error object if request failed
|
143
|
+
#
|
144
|
+
# @return [Google::Apis::CloudsupportV2beta::Case]
|
145
|
+
#
|
146
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
147
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
148
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
149
|
+
def close_case(name, close_case_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
150
|
+
command = make_simple_command(:post, 'v2beta/{+name}:close', options)
|
151
|
+
command.request_representation = Google::Apis::CloudsupportV2beta::CloseCaseRequest::Representation
|
152
|
+
command.request_object = close_case_request_object
|
153
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation
|
154
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Case
|
155
|
+
command.params['name'] = name unless name.nil?
|
156
|
+
command.query['fields'] = fields unless fields.nil?
|
157
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
158
|
+
execute_or_queue_command(command, &block)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Create a new case and associate it with the given Cloud resource.
|
162
|
+
# @param [String] parent
|
163
|
+
# Required. The name of the Cloud resource under which the case should be
|
164
|
+
# created.
|
165
|
+
# @param [Google::Apis::CloudsupportV2beta::Case] case_object
|
166
|
+
# @param [String] fields
|
167
|
+
# Selector specifying which fields to include in a partial response.
|
168
|
+
# @param [String] quota_user
|
169
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
170
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
171
|
+
# @param [Google::Apis::RequestOptions] options
|
172
|
+
# Request-specific options
|
173
|
+
#
|
174
|
+
# @yield [result, err] Result & error if block supplied
|
175
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Case] parsed result object
|
176
|
+
# @yieldparam err [StandardError] error object if request failed
|
177
|
+
#
|
178
|
+
# @return [Google::Apis::CloudsupportV2beta::Case]
|
179
|
+
#
|
180
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
181
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
182
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
183
|
+
def create_case(parent, case_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
184
|
+
command = make_simple_command(:post, 'v2beta/{+parent}/cases', options)
|
185
|
+
command.request_representation = Google::Apis::CloudsupportV2beta::Case::Representation
|
186
|
+
command.request_object = case_object
|
187
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation
|
188
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Case
|
189
|
+
command.params['parent'] = parent unless parent.nil?
|
190
|
+
command.query['fields'] = fields unless fields.nil?
|
191
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
192
|
+
execute_or_queue_command(command, &block)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Escalate a case. Escalating a case will initiate the Cloud Support escalation
|
196
|
+
# management process. This operation is only available to certain Customer Care
|
197
|
+
# tiers. Go to https://cloud.google.com/support and look for 'Technical support
|
198
|
+
# escalations' in the feature list to find out which tiers are able to perform
|
199
|
+
# escalations.
|
200
|
+
# @param [String] name
|
201
|
+
# Required. The fully qualified name of the Case resource to be escalated.
|
202
|
+
# @param [Google::Apis::CloudsupportV2beta::EscalateCaseRequest] escalate_case_request_object
|
203
|
+
# @param [String] fields
|
204
|
+
# Selector specifying which fields to include in a partial response.
|
205
|
+
# @param [String] quota_user
|
206
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
207
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
208
|
+
# @param [Google::Apis::RequestOptions] options
|
209
|
+
# Request-specific options
|
210
|
+
#
|
211
|
+
# @yield [result, err] Result & error if block supplied
|
212
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Case] parsed result object
|
213
|
+
# @yieldparam err [StandardError] error object if request failed
|
214
|
+
#
|
215
|
+
# @return [Google::Apis::CloudsupportV2beta::Case]
|
216
|
+
#
|
217
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
218
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
219
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
220
|
+
def escalate_case(name, escalate_case_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
221
|
+
command = make_simple_command(:post, 'v2beta/{+name}:escalate', options)
|
222
|
+
command.request_representation = Google::Apis::CloudsupportV2beta::EscalateCaseRequest::Representation
|
223
|
+
command.request_object = escalate_case_request_object
|
224
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation
|
225
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Case
|
226
|
+
command.params['name'] = name unless name.nil?
|
227
|
+
command.query['fields'] = fields unless fields.nil?
|
228
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
229
|
+
execute_or_queue_command(command, &block)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Retrieve the specified case.
|
233
|
+
# @param [String] name
|
234
|
+
# Required. The fully qualified name of a case to be retrieved.
|
235
|
+
# @param [String] fields
|
236
|
+
# Selector specifying which fields to include in a partial response.
|
237
|
+
# @param [String] quota_user
|
238
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
239
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
240
|
+
# @param [Google::Apis::RequestOptions] options
|
241
|
+
# Request-specific options
|
242
|
+
#
|
243
|
+
# @yield [result, err] Result & error if block supplied
|
244
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Case] parsed result object
|
245
|
+
# @yieldparam err [StandardError] error object if request failed
|
246
|
+
#
|
247
|
+
# @return [Google::Apis::CloudsupportV2beta::Case]
|
248
|
+
#
|
249
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
250
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
251
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
252
|
+
def get_case(name, fields: nil, quota_user: nil, options: nil, &block)
|
253
|
+
command = make_simple_command(:get, 'v2beta/{+name}', options)
|
254
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation
|
255
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Case
|
256
|
+
command.params['name'] = name unless name.nil?
|
257
|
+
command.query['fields'] = fields unless fields.nil?
|
258
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
259
|
+
execute_or_queue_command(command, &block)
|
260
|
+
end
|
261
|
+
|
262
|
+
# Retrieve all cases under the specified parent.
|
263
|
+
# @param [String] parent
|
264
|
+
# Required. The fully qualified name of parent resource to list cases under.
|
265
|
+
# @param [String] filter
|
266
|
+
# An expression written in the Cloud filter language. If non-empty, then only
|
267
|
+
# cases whose fields match the filter are returned. If empty, then no messages
|
268
|
+
# are filtered out. Filter strings can use the following fields: - status (
|
269
|
+
# Accepted values: OPEN or CLOSED) - severity (Accepted values: S0, S1, S2, S3,
|
270
|
+
# or S4) - creator.email with the operators equals (=) and AND. Additionally, a
|
271
|
+
# global restriction (with no operator) can be used to search across displayName,
|
272
|
+
# description, and comments (e.g. "my search").
|
273
|
+
# @param [String] order_by
|
274
|
+
# A comma separated list of fields to order by, followed by `asc` or `desc`
|
275
|
+
# postfix. This list is case-insensitive, default sorting order is ascending,
|
276
|
+
# redundant space characters are insignificant. Example: `name asc,update_time,
|
277
|
+
# create_time desc`
|
278
|
+
# @param [Fixnum] page_size
|
279
|
+
# The maximum number of cases fetched with each request. Defaults to 10.
|
280
|
+
# @param [String] page_token
|
281
|
+
# A token identifying the page of results to return. If unspecified, the first
|
282
|
+
# page is retrieved.
|
283
|
+
# @param [String] fields
|
284
|
+
# Selector specifying which fields to include in a partial response.
|
285
|
+
# @param [String] quota_user
|
286
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
287
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
288
|
+
# @param [Google::Apis::RequestOptions] options
|
289
|
+
# Request-specific options
|
290
|
+
#
|
291
|
+
# @yield [result, err] Result & error if block supplied
|
292
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::ListCasesResponse] parsed result object
|
293
|
+
# @yieldparam err [StandardError] error object if request failed
|
294
|
+
#
|
295
|
+
# @return [Google::Apis::CloudsupportV2beta::ListCasesResponse]
|
296
|
+
#
|
297
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
298
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
299
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
300
|
+
def list_cases(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
301
|
+
command = make_simple_command(:get, 'v2beta/{+parent}/cases', options)
|
302
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::ListCasesResponse::Representation
|
303
|
+
command.response_class = Google::Apis::CloudsupportV2beta::ListCasesResponse
|
304
|
+
command.params['parent'] = parent unless parent.nil?
|
305
|
+
command.query['filter'] = filter unless filter.nil?
|
306
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
307
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
308
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
309
|
+
command.query['fields'] = fields unless fields.nil?
|
310
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
311
|
+
execute_or_queue_command(command, &block)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Update the specified case. Only a subset of fields (display_name, description,
|
315
|
+
# time_zone, subscriber_email_addresses, related_resources, severity,
|
316
|
+
# primary_contact, and labels) can be updated.
|
317
|
+
# @param [String] name
|
318
|
+
# The resource name for the case.
|
319
|
+
# @param [Google::Apis::CloudsupportV2beta::Case] case_object
|
320
|
+
# @param [String] update_mask
|
321
|
+
# A field that represents attributes of a case object that should be updated as
|
322
|
+
# part of this request. Supported values are severity, display_name, and
|
323
|
+
# subscriber_email_addresses. If no fields are specified, all supported fields
|
324
|
+
# will be updated. WARNING: If you do not provide a field mask then you may
|
325
|
+
# accidentally clear some fields. For example, if you leave field mask empty and
|
326
|
+
# do not provide a value for subscriber_email_addresses then
|
327
|
+
# subscriber_email_addresses will be updated to empty.
|
328
|
+
# @param [String] fields
|
329
|
+
# Selector specifying which fields to include in a partial response.
|
330
|
+
# @param [String] quota_user
|
331
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
332
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
333
|
+
# @param [Google::Apis::RequestOptions] options
|
334
|
+
# Request-specific options
|
335
|
+
#
|
336
|
+
# @yield [result, err] Result & error if block supplied
|
337
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Case] parsed result object
|
338
|
+
# @yieldparam err [StandardError] error object if request failed
|
339
|
+
#
|
340
|
+
# @return [Google::Apis::CloudsupportV2beta::Case]
|
341
|
+
#
|
342
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
343
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
344
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
345
|
+
def patch_case(name, case_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
346
|
+
command = make_simple_command(:patch, 'v2beta/{+name}', options)
|
347
|
+
command.request_representation = Google::Apis::CloudsupportV2beta::Case::Representation
|
348
|
+
command.request_object = case_object
|
349
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Case::Representation
|
350
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Case
|
351
|
+
command.params['name'] = name unless name.nil?
|
352
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
353
|
+
command.query['fields'] = fields unless fields.nil?
|
354
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
355
|
+
execute_or_queue_command(command, &block)
|
356
|
+
end
|
357
|
+
|
358
|
+
# Search cases using the specified query.
|
359
|
+
# @param [Fixnum] page_size
|
360
|
+
# The maximum number of cases fetched with each request. The default page size
|
361
|
+
# is 10.
|
362
|
+
# @param [String] page_token
|
363
|
+
# A token identifying the page of results to return. If unspecified, the first
|
364
|
+
# page is retrieved.
|
365
|
+
# @param [String] query
|
366
|
+
# An expression written in the Cloud filter language. Filter strings can use the
|
367
|
+
# following fields: - organization (A name of the form organizations/) - project
|
368
|
+
# (A name of the form projects/) - customer (A name of the form customers/) -
|
369
|
+
# state (Accepted values: OPEN or CLOSED) - severity (Accepted values: S0, S1,
|
370
|
+
# S2, S3, or S4) - creator.email with the operators equals (=) and AND.
|
371
|
+
# Additionally, a global restriction (with no key/operator) can be used to
|
372
|
+
# search across display_name, description, and comments (e.g. "my search"). One
|
373
|
+
# of organization, project, or customer field must be specified.
|
374
|
+
# @param [String] fields
|
375
|
+
# Selector specifying which fields to include in a partial response.
|
376
|
+
# @param [String] quota_user
|
377
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
378
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
379
|
+
# @param [Google::Apis::RequestOptions] options
|
380
|
+
# Request-specific options
|
381
|
+
#
|
382
|
+
# @yield [result, err] Result & error if block supplied
|
383
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::SearchCasesResponse] parsed result object
|
384
|
+
# @yieldparam err [StandardError] error object if request failed
|
385
|
+
#
|
386
|
+
# @return [Google::Apis::CloudsupportV2beta::SearchCasesResponse]
|
387
|
+
#
|
388
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
389
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
390
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
391
|
+
def search_cases(page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
392
|
+
command = make_simple_command(:get, 'v2beta/cases:search', options)
|
393
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::SearchCasesResponse::Representation
|
394
|
+
command.response_class = Google::Apis::CloudsupportV2beta::SearchCasesResponse
|
395
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
396
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
397
|
+
command.query['query'] = query unless query.nil?
|
398
|
+
command.query['fields'] = fields unless fields.nil?
|
399
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
400
|
+
execute_or_queue_command(command, &block)
|
401
|
+
end
|
402
|
+
|
403
|
+
# Retrieve all attachments associated with a support case.
|
404
|
+
# @param [String] parent
|
405
|
+
# Required. The resource name of Case object for which attachments should be
|
406
|
+
# listed.
|
407
|
+
# @param [Fixnum] page_size
|
408
|
+
# The maximum number of attachments fetched with each request. If not provided,
|
409
|
+
# the default is 10. The maximum page size that will be returned is 100.
|
410
|
+
# @param [String] page_token
|
411
|
+
# A token identifying the page of results to return. If unspecified, the first
|
412
|
+
# page is retrieved.
|
413
|
+
# @param [String] fields
|
414
|
+
# Selector specifying which fields to include in a partial response.
|
415
|
+
# @param [String] quota_user
|
416
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
417
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
418
|
+
# @param [Google::Apis::RequestOptions] options
|
419
|
+
# Request-specific options
|
420
|
+
#
|
421
|
+
# @yield [result, err] Result & error if block supplied
|
422
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::ListAttachmentsResponse] parsed result object
|
423
|
+
# @yieldparam err [StandardError] error object if request failed
|
424
|
+
#
|
425
|
+
# @return [Google::Apis::CloudsupportV2beta::ListAttachmentsResponse]
|
426
|
+
#
|
427
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
428
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
429
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
430
|
+
def list_case_attachments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
431
|
+
command = make_simple_command(:get, 'v2beta/{+parent}/attachments', options)
|
432
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::ListAttachmentsResponse::Representation
|
433
|
+
command.response_class = Google::Apis::CloudsupportV2beta::ListAttachmentsResponse
|
434
|
+
command.params['parent'] = parent unless parent.nil?
|
435
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
436
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
437
|
+
command.query['fields'] = fields unless fields.nil?
|
438
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
439
|
+
execute_or_queue_command(command, &block)
|
440
|
+
end
|
441
|
+
|
442
|
+
# Add a new comment to the specified Case.
|
443
|
+
# @param [String] parent
|
444
|
+
# Required. The resource name of Case to which this comment should be added.
|
445
|
+
# @param [Google::Apis::CloudsupportV2beta::Comment] comment_object
|
446
|
+
# @param [String] fields
|
447
|
+
# Selector specifying which fields to include in a partial response.
|
448
|
+
# @param [String] quota_user
|
449
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
450
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
451
|
+
# @param [Google::Apis::RequestOptions] options
|
452
|
+
# Request-specific options
|
453
|
+
#
|
454
|
+
# @yield [result, err] Result & error if block supplied
|
455
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Comment] parsed result object
|
456
|
+
# @yieldparam err [StandardError] error object if request failed
|
457
|
+
#
|
458
|
+
# @return [Google::Apis::CloudsupportV2beta::Comment]
|
459
|
+
#
|
460
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
461
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
462
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
463
|
+
def create_case_comment(parent, comment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
464
|
+
command = make_simple_command(:post, 'v2beta/{+parent}/comments', options)
|
465
|
+
command.request_representation = Google::Apis::CloudsupportV2beta::Comment::Representation
|
466
|
+
command.request_object = comment_object
|
467
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Comment::Representation
|
468
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Comment
|
469
|
+
command.params['parent'] = parent unless parent.nil?
|
470
|
+
command.query['fields'] = fields unless fields.nil?
|
471
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
472
|
+
execute_or_queue_command(command, &block)
|
473
|
+
end
|
474
|
+
|
475
|
+
# Retrieve all Comments associated with the Case object.
|
476
|
+
# @param [String] parent
|
477
|
+
# Required. The resource name of Case object for which comments should be listed.
|
478
|
+
# @param [Fixnum] page_size
|
479
|
+
# The maximum number of comments fetched with each request. Defaults to 10.
|
480
|
+
# @param [String] page_token
|
481
|
+
# A token identifying the page of results to return. If unspecified, the first
|
482
|
+
# page is retrieved.
|
483
|
+
# @param [String] fields
|
484
|
+
# Selector specifying which fields to include in a partial response.
|
485
|
+
# @param [String] quota_user
|
486
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
487
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
488
|
+
# @param [Google::Apis::RequestOptions] options
|
489
|
+
# Request-specific options
|
490
|
+
#
|
491
|
+
# @yield [result, err] Result & error if block supplied
|
492
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::ListCommentsResponse] parsed result object
|
493
|
+
# @yieldparam err [StandardError] error object if request failed
|
494
|
+
#
|
495
|
+
# @return [Google::Apis::CloudsupportV2beta::ListCommentsResponse]
|
496
|
+
#
|
497
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
498
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
499
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
500
|
+
def list_case_comments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
501
|
+
command = make_simple_command(:get, 'v2beta/{+parent}/comments', options)
|
502
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::ListCommentsResponse::Representation
|
503
|
+
command.response_class = Google::Apis::CloudsupportV2beta::ListCommentsResponse
|
504
|
+
command.params['parent'] = parent unless parent.nil?
|
505
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
506
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
507
|
+
command.query['fields'] = fields unless fields.nil?
|
508
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
509
|
+
execute_or_queue_command(command, &block)
|
510
|
+
end
|
511
|
+
|
512
|
+
# Download a file attachment on a case. Note: HTTP requests must append "?alt=
|
513
|
+
# media" to the URL.
|
514
|
+
# @param [String] name
|
515
|
+
# The resource name of the attachment to be downloaded.
|
516
|
+
# @param [String] fields
|
517
|
+
# Selector specifying which fields to include in a partial response.
|
518
|
+
# @param [String] quota_user
|
519
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
520
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
521
|
+
# @param [IO, String] download_dest
|
522
|
+
# IO stream or filename to receive content download
|
523
|
+
# @param [Google::Apis::RequestOptions] options
|
524
|
+
# Request-specific options
|
525
|
+
#
|
526
|
+
# @yield [result, err] Result & error if block supplied
|
527
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Media] parsed result object
|
528
|
+
# @yieldparam err [StandardError] error object if request failed
|
529
|
+
#
|
530
|
+
# @return [Google::Apis::CloudsupportV2beta::Media]
|
531
|
+
#
|
532
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
533
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
534
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
535
|
+
def download_medium(name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
536
|
+
if download_dest.nil?
|
537
|
+
command = make_simple_command(:get, 'v2beta/{+name}:download', options)
|
538
|
+
else
|
539
|
+
command = make_download_command(:get, 'v2beta/{+name}:download', options)
|
540
|
+
command.download_dest = download_dest
|
541
|
+
end
|
542
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Media::Representation
|
543
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Media
|
544
|
+
command.params['name'] = name unless name.nil?
|
545
|
+
command.query['fields'] = fields unless fields.nil?
|
546
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
547
|
+
execute_or_queue_command(command, &block)
|
548
|
+
end
|
549
|
+
|
550
|
+
# Create a file attachment on a case or Cloud resource.
|
551
|
+
# @param [String] parent
|
552
|
+
# Required. The resource name of the case to which attachment should be attached.
|
553
|
+
# @param [Google::Apis::CloudsupportV2beta::CreateAttachmentRequest] create_attachment_request_object
|
554
|
+
# @param [String] fields
|
555
|
+
# Selector specifying which fields to include in a partial response.
|
556
|
+
# @param [String] quota_user
|
557
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
558
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
559
|
+
# @param [IO, String] upload_source
|
560
|
+
# IO stream or filename containing content to upload
|
561
|
+
# @param [String] content_type
|
562
|
+
# Content type of the uploaded content.
|
563
|
+
# @param [Google::Apis::RequestOptions] options
|
564
|
+
# Request-specific options
|
565
|
+
#
|
566
|
+
# @yield [result, err] Result & error if block supplied
|
567
|
+
# @yieldparam result [Google::Apis::CloudsupportV2beta::Attachment] parsed result object
|
568
|
+
# @yieldparam err [StandardError] error object if request failed
|
569
|
+
#
|
570
|
+
# @return [Google::Apis::CloudsupportV2beta::Attachment]
|
571
|
+
#
|
572
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
573
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
574
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
575
|
+
def upload_medium(parent, create_attachment_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
576
|
+
if upload_source.nil?
|
577
|
+
command = make_simple_command(:post, 'v2beta/{+parent}/attachments', options)
|
578
|
+
else
|
579
|
+
command = make_upload_command(:post, 'v2beta/{+parent}/attachments', options)
|
580
|
+
command.upload_source = upload_source
|
581
|
+
command.upload_content_type = content_type
|
582
|
+
end
|
583
|
+
command.request_representation = Google::Apis::CloudsupportV2beta::CreateAttachmentRequest::Representation
|
584
|
+
command.request_object = create_attachment_request_object
|
585
|
+
command.response_representation = Google::Apis::CloudsupportV2beta::Attachment::Representation
|
586
|
+
command.response_class = Google::Apis::CloudsupportV2beta::Attachment
|
587
|
+
command.params['parent'] = parent unless parent.nil?
|
588
|
+
command.query['fields'] = fields unless fields.nil?
|
589
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
590
|
+
execute_or_queue_command(command, &block)
|
591
|
+
end
|
592
|
+
|
593
|
+
protected
|
594
|
+
|
595
|
+
def apply_command_defaults(command)
|
596
|
+
command.query['key'] = key unless key.nil?
|
597
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
598
|
+
end
|
599
|
+
end
|
600
|
+
end
|
601
|
+
end
|
602
|
+
end
|
@@ -0,0 +1,37 @@
|
|
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/cloudsupport_v2beta/service.rb'
|
16
|
+
require 'google/apis/cloudsupport_v2beta/classes.rb'
|
17
|
+
require 'google/apis/cloudsupport_v2beta/representations.rb'
|
18
|
+
require 'google/apis/cloudsupport_v2beta/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Google Cloud Support API
|
23
|
+
#
|
24
|
+
# Manages Google Cloud technical support cases for Customer Care support
|
25
|
+
# offerings.
|
26
|
+
#
|
27
|
+
# @see https://cloud.google.com/support/docs/apis
|
28
|
+
module CloudsupportV2beta
|
29
|
+
# Version of the Google Cloud Support API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V2beta'
|
32
|
+
|
33
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
34
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
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/cloudsupport_v2beta"
|