1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\CloudSupport\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudSupport\SearchCaseClassificationsResponse;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * The "caseClassifications" collection of methods.
|
---|
24 | * Typical usage is:
|
---|
25 | * <code>
|
---|
26 | * $cloudsupportService = new Google\Service\CloudSupport(...);
|
---|
27 | * $caseClassifications = $cloudsupportService->caseClassifications;
|
---|
28 | * </code>
|
---|
29 | */
|
---|
30 | class CaseClassifications extends \Google\Service\Resource
|
---|
31 | {
|
---|
32 | /**
|
---|
33 | * Retrieve valid classifications to use when creating a support case.
|
---|
34 | * Classifications are hierarchical. Each classification is a string containing
|
---|
35 | * all levels of the hierarchy separated by `" > "`. For example, `"Technical
|
---|
36 | * Issue > Compute > Compute Engine"`. Classification IDs returned by this
|
---|
37 | * endpoint are valid for at least six months. When a classification is
|
---|
38 | * deactivated, this endpoint immediately stops returning it. After six months,
|
---|
39 | * `case.create` requests using the classification will fail. EXAMPLES: cURL:
|
---|
40 | * ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-
|
---|
41 | * token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?
|
---|
42 | * query=display_name:"*Compute%20Engine*"' ``` Python: ```python import
|
---|
43 | * googleapiclient.discovery supportApiService =
|
---|
44 | * googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", di
|
---|
45 | * scoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?versi
|
---|
46 | * on=v2", ) request = supportApiService.caseClassifications().search(
|
---|
47 | * query='display_name:"*Compute Engine*"' ) print(request.execute()) ```
|
---|
48 | * (caseClassifications.search)
|
---|
49 | *
|
---|
50 | * @param array $optParams Optional parameters.
|
---|
51 | *
|
---|
52 | * @opt_param int pageSize The maximum number of classifications fetched with
|
---|
53 | * each request.
|
---|
54 | * @opt_param string pageToken A token identifying the page of results to
|
---|
55 | * return. If unspecified, the first page is retrieved.
|
---|
56 | * @opt_param string query An expression used to filter case classifications. If
|
---|
57 | * it's an empty string, then no filtering happens. Otherwise, case
|
---|
58 | * classifications will be returned that match the filter.
|
---|
59 | * @return SearchCaseClassificationsResponse
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function search($optParams = [])
|
---|
63 | {
|
---|
64 | $params = [];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('search', [$params], SearchCaseClassificationsResponse::class);
|
---|
67 | }
|
---|
68 | }
|
---|
69 |
|
---|
70 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
71 | class_alias(CaseClassifications::class, 'Google_Service_CloudSupport_Resource_CaseClassifications');
|
---|