Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions
@@ -0,0 +1,52 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\Attachment;
use Google\Service\CloudSupport\CreateAttachmentRequest;
/**
* The "attachments" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $attachments = $cloudsupportService->attachments;
* </code>
*/
class Attachments extends \Google\Service\Resource
{
/**
* Create a file attachment on a case or Cloud resource. The attachment object
* must have the following fields set: filename. (attachments.create)
*
* @param string $parent Required. The resource name of the case (or case
* parent) to which the attachment should be attached.
* @param CreateAttachmentRequest $postBody
* @param array $optParams Optional parameters.
* @return Attachment
*/
public function create($parent, CreateAttachmentRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Attachment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Attachments::class, 'Google_Service_CloudSupport_Resource_Attachments');
@@ -0,0 +1,71 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\SearchCaseClassificationsResponse;
/**
* The "caseClassifications" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $caseClassifications = $cloudsupportService->caseClassifications;
* </code>
*/
class CaseClassifications extends \Google\Service\Resource
{
/**
* Retrieve valid classifications to use when creating a support case.
* Classifications are hierarchical. Each classification is a string containing
* all levels of the hierarchy separated by `" > "`. For example, `"Technical
* Issue > Compute > Compute Engine"`. Classification IDs returned by this
* endpoint are valid for at least six months. When a classification is
* deactivated, this endpoint immediately stops returning it. After six months,
* `case.create` requests using the classification will fail. EXAMPLES: cURL:
* ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-
* token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?
* query=display_name:"*Compute%20Engine*"' ``` Python: ```python import
* googleapiclient.discovery supportApiService =
* googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", di
* scoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?versi
* on=v2", ) request = supportApiService.caseClassifications().search(
* query='display_name:"*Compute Engine*"' ) print(request.execute()) ```
* (caseClassifications.search)
*
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of classifications fetched with
* each request.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is retrieved.
* @opt_param string query An expression used to filter case classifications. If
* it's an empty string, then no filtering happens. Otherwise, case
* classifications will be returned that match the filter.
* @return SearchCaseClassificationsResponse
* @throws \Google\Service\Exception
*/
public function search($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('search', [$params], SearchCaseClassificationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CaseClassifications::class, 'Google_Service_CloudSupport_Resource_CaseClassifications');
@@ -0,0 +1,275 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\CloseCaseRequest;
use Google\Service\CloudSupport\CloudsupportCase;
use Google\Service\CloudSupport\EscalateCaseRequest;
use Google\Service\CloudSupport\ListCasesResponse;
use Google\Service\CloudSupport\SearchCasesResponse;
/**
* The "cases" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $cases = $cloudsupportService->cases;
* </code>
*/
class Cases extends \Google\Service\Resource
{
/**
* Close a case. EXAMPLES: cURL: ```shell case="projects/some-
* project/cases/43595344" curl \ --request POST \ --header "Authorization:
* Bearer $(gcloud auth print-access-token)" \
* "https://cloudsupport.googleapis.com/v2/$case:close" ``` Python: ```python
* import googleapiclient.discovery api_version = "v2" supportApiService =
* googleapiclient.discovery.build( serviceName="cloudsupport",
* version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.co
* m/$discovery/rest?version={api_version}", ) request =
* supportApiService.cases().close( name="projects/some-project/cases/43595344"
* ) print(request.execute()) ``` (cases.close)
*
* @param string $name Required. The name of the case to close.
* @param CloseCaseRequest $postBody
* @param array $optParams Optional parameters.
* @return CloudsupportCase
* @throws \Google\Service\Exception
*/
public function close($name, CloseCaseRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('close', [$params], CloudsupportCase::class);
}
/**
* Create a new case and associate it with a parent. It must have the following
* fields set: `display_name`, `description`, `classification`, and `priority`.
* If you're just testing the API and don't want to route your case to an agent,
* set `testCase=true`. EXAMPLES: cURL: ```shell parent="projects/some-project"
* curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-
* access-token)" \ --header 'Content-Type: application/json' \ --data '{
* "display_name": "Test case created by me.", "description": "a random test
* case, feel free to close", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCG
* P8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3M
* URR7DHII0GRCDTQM8" }, "time_zone": "-07:00", "subscriber_email_addresses": [
* "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \
* "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python
* import googleapiclient.discovery api_version = "v2" supportApiService =
* googleapiclient.discovery.build( serviceName="cloudsupport",
* version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.co
* m/$discovery/rest?version={api_version}", ) request =
* supportApiService.cases().create( parent="projects/some-project", body={
* "displayName": "A Test Case", "description": "This is a test case.",
* "testCase": True, "priority": "P2", "classification": { "id": "100IK2AKCLHMGR
* J9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN888
* 0G08I1H3MURR7DHII0GRCDTQM8" }, }, ) print(request.execute()) ```
* (cases.create)
*
* @param string $parent Required. The name of the parent under which the case
* should be created.
* @param CloudsupportCase $postBody
* @param array $optParams Optional parameters.
* @return CloudsupportCase
* @throws \Google\Service\Exception
*/
public function create($parent, CloudsupportCase $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CloudsupportCase::class);
}
/**
* Escalate a case, starting the Google Cloud Support escalation management
* process. This operation is only available for some support services. Go to
* https://cloud.google.com/support and look for 'Technical support escalations'
* in the feature list to find out which ones let you do that. EXAMPLES: cURL:
* ```shell case="projects/some-project/cases/43595344" curl \ --request POST \
* --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header
* "Content-Type: application/json" \ --data '{ "escalation": { "reason":
* "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \
* "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` Python: ```python
* import googleapiclient.discovery api_version = "v2" supportApiService =
* googleapiclient.discovery.build( serviceName="cloudsupport",
* version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.co
* m/$discovery/rest?version={api_version}", ) request =
* supportApiService.cases().escalate( name="projects/some-
* project/cases/43595344", body={ "escalation": { "reason": "BUSINESS_IMPACT",
* "justification": "This is a test escalation.", }, }, )
* print(request.execute()) ``` (cases.escalate)
*
* @param string $name Required. The name of the case to be escalated.
* @param EscalateCaseRequest $postBody
* @param array $optParams Optional parameters.
* @return CloudsupportCase
* @throws \Google\Service\Exception
*/
public function escalate($name, EscalateCaseRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('escalate', [$params], CloudsupportCase::class);
}
/**
* Retrieve a case. EXAMPLES: cURL: ```shell case="projects/some-
* project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth
* print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ```
* Python: ```python import googleapiclient.discovery api_version = "v2"
* supportApiService = googleapiclient.discovery.build(
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
* //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
* request = supportApiService.cases().get( name="projects/some-
* project/cases/43595344", ) print(request.execute()) ``` (cases.get)
*
* @param string $name Required. The full name of a case to be retrieved.
* @param array $optParams Optional parameters.
* @return CloudsupportCase
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CloudsupportCase::class);
}
/**
* Retrieve all cases under a parent, but not its children. For example, listing
* cases under an organization only returns the cases that are directly parented
* by that organization. To retrieve cases under an organization and its
* projects, use `cases.search`. EXAMPLES: cURL: ```shell parent="projects/some-
* project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-
* token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python:
* ```python import googleapiclient.discovery api_version = "v2"
* supportApiService = googleapiclient.discovery.build(
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
* //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
* request = supportApiService.cases().list(parent="projects/some-project")
* print(request.execute()) ``` (cases.listCases)
*
* @param string $parent Required. The name of a parent to list cases under.
* @param array $optParams Optional parameters.
*
* @opt_param string filter An expression used to filter cases. If it's an empty
* string, then no filtering happens. Otherwise, the endpoint returns the cases
* that match the filter. Expressions use the following fields separated by
* `AND` and specified with `=`: - `state`: Can be `OPEN` or `CLOSED`. -
* `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple
* values for priority using the `OR` operator. For example, `priority=P1 OR
* priority=P2`. - `creator.email`: The email address of the case creator.
* EXAMPLES: - `state=CLOSED` - `state=OPEN AND
* creator.email="tester@example.com"` - `state=OPEN AND (priority=P0 OR
* priority=P1)`
* @opt_param int pageSize The maximum number of cases fetched with each
* request. Defaults to 10.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is retrieved.
* @return ListCasesResponse
* @throws \Google\Service\Exception
*/
public function listCases($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCasesResponse::class);
}
/**
* Update a case. Only some fields can be updated. EXAMPLES: cURL: ```shell
* case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header
* "Authorization: Bearer $(gcloud auth print-access-token)" \ --header
* "Content-Type: application/json" \ --data '{ "priority": "P1" }' \
* "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ```
* Python: ```python import googleapiclient.discovery api_version = "v2"
* supportApiService = googleapiclient.discovery.build(
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
* //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
* request = supportApiService.cases().patch( name="projects/some-
* project/cases/43112854", body={ "displayName": "This is Now a New Title",
* "priority": "P2", }, ) print(request.execute()) ``` (cases.patch)
*
* @param string $name The resource name for the case.
* @param CloudsupportCase $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask A list of attributes of the case that should be
* updated. Supported values are `priority`, `display_name`, and
* `subscriber_email_addresses`. If no fields are specified, all supported
* fields are updated. Be careful - if you do not provide a field mask, then you
* might accidentally clear some fields. For example, if you leave the field
* mask empty and do not provide a value for `subscriber_email_addresses`, then
* `subscriber_email_addresses` is updated to empty.
* @return CloudsupportCase
* @throws \Google\Service\Exception
*/
public function patch($name, CloudsupportCase $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], CloudsupportCase::class);
}
/**
* Search for cases using a query. EXAMPLES: cURL: ```shell
* parent="projects/some-project" curl \ --header "Authorization: Bearer
* $(gcloud auth print-access-token)" \
* "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` Python:
* ```python import googleapiclient.discovery api_version = "v2"
* supportApiService = googleapiclient.discovery.build(
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
* //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
* request = supportApiService.cases().search( parent="projects/some-project",
* query="state=OPEN" ) print(request.execute()) ``` (cases.search)
*
* @param string $parent The name of the parent resource to search for cases
* under.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of cases fetched with each
* request. The default page size is 10.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is retrieved.
* @opt_param string query An expression used to filter cases. Expressions use
* the following fields separated by `AND` and specified with `=`: -
* `organization`: An organization name in the form `organizations/`. -
* `project`: A project name in the form `projects/`. - `state`: Can be `OPEN`
* or `CLOSED`. - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You can
* specify multiple values for priority using the `OR` operator. For example,
* `priority=P1 OR priority=P2`. - `creator.email`: The email address of the
* case creator. You must specify either `organization` or `project`. To search
* across `displayName`, `description`, and comments, use a global restriction
* with no keyword or operator. For example, `"my search"`. To search only cases
* updated after a certain date, use `update_time` restricted with that
* particular date, time, and timezone in ISO datetime format. For example,
* `update_time>"2020-01-01T00:00:00-05:00"`. `update_time` only supports the
* greater than operator (`>`). Examples: -
* `organization="organizations/123456789"` - `project="projects/my-project-id"`
* - `project="projects/123456789"` - `organization="organizations/123456789"
* AND state=CLOSED` - `project="projects/my-project-id" AND
* creator.email="tester@example.com"` - `project="projects/my-project-id" AND
* (priority=P0 OR priority=P1)`
* @return SearchCasesResponse
* @throws \Google\Service\Exception
*/
public function search($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('search', [$params], SearchCasesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Cases::class, 'Google_Service_CloudSupport_Resource_Cases');
@@ -0,0 +1,68 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\ListAttachmentsResponse;
/**
* The "attachments" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $attachments = $cloudsupportService->cases_attachments;
* </code>
*/
class CasesAttachments extends \Google\Service\Resource
{
/**
* List all the attachments associated with a support case. EXAMPLES: cURL:
* ```shell case="projects/some-project/cases/23598314" curl \ --header
* "Authorization: Bearer $(gcloud auth print-access-token)" \
* "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` Python:
* ```python import googleapiclient.discovery api_version = "v2"
* supportApiService = googleapiclient.discovery.build(
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
* //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
* request = ( supportApiService.cases() .attachments()
* .list(parent="projects/some-project/cases/43595344") )
* print(request.execute()) ``` (attachments.listCasesAttachments)
*
* @param string $parent Required. The name of the case for which attachments
* should be listed.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of attachments fetched with each
* request. If not provided, the default is 10. The maximum page size that will
* be returned is 100. The size of each page can be smaller than the requested
* page size and can include zero. For example, you could request 100
* attachments on one page, receive 0, and then on the next page, receive 90.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is retrieved.
* @return ListAttachmentsResponse
* @throws \Google\Service\Exception
*/
public function listCasesAttachments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListAttachmentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CasesAttachments::class, 'Google_Service_CloudSupport_Resource_CasesAttachments');
@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\Comment;
use Google\Service\CloudSupport\ListCommentsResponse;
/**
* The "comments" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $comments = $cloudsupportService->cases_comments;
* </code>
*/
class CasesComments extends \Google\Service\Resource
{
/**
* Add a new comment to a case. The comment must have the following fields set:
* `body`. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43591344"
* curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-
* access-token)" \ --header 'Content-Type: application/json' \ --data '{
* "body": "This is a test comment." }' \
* "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python
* import googleapiclient.discovery api_version = "v2" supportApiService =
* googleapiclient.discovery.build( serviceName="cloudsupport",
* version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.co
* m/$discovery/rest?version={api_version}", ) request = (
* supportApiService.cases() .comments() .create( parent="projects/some-
* project/cases/43595344", body={"body": "This is a test comment."}, ) )
* print(request.execute()) ``` (comments.create)
*
* @param string $parent Required. The name of the case to which the comment
* should be added.
* @param Comment $postBody
* @param array $optParams Optional parameters.
* @return Comment
* @throws \Google\Service\Exception
*/
public function create($parent, Comment $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Comment::class);
}
/**
* List all the comments associated with a case. EXAMPLES: cURL: ```shell
* case="projects/some-project/cases/43595344" curl \ --header "Authorization:
* Bearer $(gcloud auth print-access-token)" \
* "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python
* import googleapiclient.discovery api_version = "v2" supportApiService =
* googleapiclient.discovery.build( serviceName="cloudsupport",
* version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.co
* m/$discovery/rest?version={api_version}", ) request = (
* supportApiService.cases() .comments() .list(parent="projects/some-
* project/cases/43595344") ) print(request.execute()) ```
* (comments.listCasesComments)
*
* @param string $parent Required. The name of the case for which to list
* comments.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of comments to fetch. Defaults to
* 10.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is returned.
* @return ListCommentsResponse
* @throws \Google\Service\Exception
*/
public function listCasesComments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCommentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CasesComments::class, 'Google_Service_CloudSupport_Resource_CasesComments');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
/**
* The "customers" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $customers = $cloudsupportService->customers;
* </code>
*/
class Customers extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Customers::class, 'Google_Service_CloudSupport_Resource_Customers');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
/**
* The "cases" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $cases = $cloudsupportService->customers_cases;
* </code>
*/
class CustomersCases extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CustomersCases::class, 'Google_Service_CloudSupport_Resource_CustomersCases');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\Comment;
use Google\Service\CloudSupport\ListCommentsResponse;
/**
* The "comments" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $comments = $cloudsupportService->customers_cases_comments;
* </code>
*/
class CustomersCasesComments extends \Google\Service\Resource
{
/**
* Add a new comment to the specified Case. The comment object must have the
* following fields set: body. (comments.create)
*
* @param string $parent Required. The resource name of Case to which this
* comment should be added.
* @param Comment $postBody
* @param array $optParams Optional parameters.
* @return Comment
*/
public function create($parent, Comment $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Comment::class);
}
/**
* Retrieve all Comments associated with the Case object.
* (comments.listCustomersCasesComments)
*
* @param string $parent Required. The resource name of Case object for which
* comments should be listed.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of comments fetched with each
* request. Defaults to 10.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is retrieved.
* @return ListCommentsResponse
*/
public function listCustomersCasesComments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCommentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CustomersCasesComments::class, 'Google_Service_CloudSupport_Resource_CustomersCasesComments');
@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\Attachment;
use Google\Service\CloudSupport\CreateAttachmentRequest;
use Google\Service\CloudSupport\Media as MediaModel;
/**
* The "media" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $media = $cloudsupportService->media;
* </code>
*/
class Media extends \Google\Service\Resource
{
/**
* Download a file attached to a case. Note: HTTP requests must append
* "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-
* project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header
* "Authorization: Bearer $(gcloud auth print-access-token)" \
* "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python:
* ```python import googleapiclient.discovery api_version = "v2"
* supportApiService = googleapiclient.discovery.build(
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
* //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
* request = supportApiService.media().download( name="projects/some-
* project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri =
* request.uri.split("?")[0] + "?alt=media" print(request.execute()) ```
* (media.download)
*
* @param string $name The name of the file attachment to download.
* @param array $optParams Optional parameters.
* @return MediaModel
* @throws \Google\Service\Exception
*/
public function download($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('download', [$params], MediaModel::class);
}
/**
* Create a file attachment on a case or Cloud resource. The attachment must
* have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo
* "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt"
* case="projects/some-project/cases/43594844" curl \ --header "Authorization:
* Bearer $(gcloud auth print-access-token)" \ --data-binary
* @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2beta/$c
* ase/attachments?attachment.filename=uploaded_via_curl.txt" ``` Python:
* ```python import googleapiclient.discovery api_version = "v2"
* supportApiService = googleapiclient.discovery.build(
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
* //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
* file_path = "./example_file.txt" with open(file_path, "w") as file:
* file.write( "This text is inside a file I'm going to upload using the Cloud
* Support API.", ) request = supportApiService.media().upload(
* parent="projects/some-project/cases/43595344", media_body=file_path )
* request.uri = request.uri.split("?")[0] +
* "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ```
* (media.upload)
*
* @param string $parent Required. The name of the case or Cloud resource to
* which the attachment should be attached.
* @param CreateAttachmentRequest $postBody
* @param array $optParams Optional parameters.
* @return Attachment
* @throws \Google\Service\Exception
*/
public function upload($parent, CreateAttachmentRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('upload', [$params], Attachment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Media::class, 'Google_Service_CloudSupport_Resource_Media');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
/**
* The "organizations" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $organizations = $cloudsupportService->organizations;
* </code>
*/
class Organizations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Organizations::class, 'Google_Service_CloudSupport_Resource_Organizations');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
/**
* The "cases" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $cases = $cloudsupportService->organizations_cases;
* </code>
*/
class OrganizationsCases extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsCases::class, 'Google_Service_CloudSupport_Resource_OrganizationsCases');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\Comment;
use Google\Service\CloudSupport\ListCommentsResponse;
/**
* The "comments" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $comments = $cloudsupportService->organizations_cases_comments;
* </code>
*/
class OrganizationsCasesComments extends \Google\Service\Resource
{
/**
* Add a new comment to the specified Case. The comment object must have the
* following fields set: body. (comments.create)
*
* @param string $parent Required. The resource name of Case to which this
* comment should be added.
* @param Comment $postBody
* @param array $optParams Optional parameters.
* @return Comment
*/
public function create($parent, Comment $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Comment::class);
}
/**
* Retrieve all Comments associated with the Case object.
* (comments.listOrganizationsCasesComments)
*
* @param string $parent Required. The resource name of Case object for which
* comments should be listed.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of comments fetched with each
* request. Defaults to 10.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is retrieved.
* @return ListCommentsResponse
*/
public function listOrganizationsCasesComments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCommentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsCasesComments::class, 'Google_Service_CloudSupport_Resource_OrganizationsCasesComments');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $projects = $cloudsupportService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_CloudSupport_Resource_Projects');
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
/**
* The "cases" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $cases = $cloudsupportService->projects_cases;
* </code>
*/
class ProjectsCases extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsCases::class, 'Google_Service_CloudSupport_Resource_ProjectsCases');
@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\CloudSupport\Resource;
use Google\Service\CloudSupport\Comment;
use Google\Service\CloudSupport\ListCommentsResponse;
/**
* The "comments" collection of methods.
* Typical usage is:
* <code>
* $cloudsupportService = new Google\Service\CloudSupport(...);
* $comments = $cloudsupportService->projects_cases_comments;
* </code>
*/
class ProjectsCasesComments extends \Google\Service\Resource
{
/**
* Add a new comment to the specified Case. The comment object must have the
* following fields set: body. (comments.create)
*
* @param string $parent Required. The resource name of Case to which this
* comment should be added.
* @param Comment $postBody
* @param array $optParams Optional parameters.
* @return Comment
*/
public function create($parent, Comment $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Comment::class);
}
/**
* Retrieve all Comments associated with the Case object.
* (comments.listProjectsCasesComments)
*
* @param string $parent Required. The resource name of Case object for which
* comments should be listed.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of comments fetched with each
* request. Defaults to 10.
* @opt_param string pageToken A token identifying the page of results to
* return. If unspecified, the first page is retrieved.
* @return ListCommentsResponse
*/
public function listProjectsCasesComments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCommentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsCasesComments::class, 'Google_Service_CloudSupport_Resource_ProjectsCasesComments');