[e3d4e0a] | 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\AppHub\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AppHub\ListServiceProjectAttachmentsResponse;
|
---|
| 21 | use Google\Service\AppHub\Operation;
|
---|
| 22 | use Google\Service\AppHub\ServiceProjectAttachment;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "serviceProjectAttachments" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $apphubService = new Google\Service\AppHub(...);
|
---|
| 29 | * $serviceProjectAttachments = $apphubService->projects_locations_serviceProjectAttachments;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsServiceProjectAttachments extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Attaches a service project to the host project.
|
---|
| 36 | * (serviceProjectAttachments.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. Host project ID and location to which service
|
---|
| 39 | * project is being attached. Only global location is supported. Expected
|
---|
| 40 | * format: `projects/{project}/locations/{location}`.
|
---|
| 41 | * @param ServiceProjectAttachment $postBody
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | *
|
---|
| 44 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 45 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 46 | * the server will know to ignore the request if it has already been completed.
|
---|
| 47 | * The server will guarantee that for at least 60 minutes since the first
|
---|
| 48 | * request. For example, consider a situation where you make an initial request
|
---|
| 49 | * and the request times out. If you make the request again with the same
|
---|
| 50 | * request ID, the server can check if original operation with the same request
|
---|
| 51 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 52 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 53 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 54 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 55 | * @opt_param string serviceProjectAttachmentId Required. The service project
|
---|
| 56 | * attachment identifier must contain the project id of the service project
|
---|
| 57 | * specified in the service_project_attachment.service_project field.
|
---|
| 58 | * @return Operation
|
---|
| 59 | * @throws \Google\Service\Exception
|
---|
| 60 | */
|
---|
| 61 | public function create($parent, ServiceProjectAttachment $postBody, $optParams = [])
|
---|
| 62 | {
|
---|
| 63 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 64 | $params = array_merge($params, $optParams);
|
---|
| 65 | return $this->call('create', [$params], Operation::class);
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * Deletes a service project attachment. (serviceProjectAttachments.delete)
|
---|
| 69 | *
|
---|
| 70 | * @param string $name Required. Fully qualified name of the service project
|
---|
| 71 | * attachment to delete. Expected format: `projects/{project}/locations/{locatio
|
---|
| 72 | * n}/serviceProjectAttachments/{serviceProjectAttachment}`.
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | *
|
---|
| 75 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 76 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 77 | * the server will know to ignore the request if it has already been completed.
|
---|
| 78 | * The server will guarantee that for at least 60 minutes after the first
|
---|
| 79 | * request. For example, consider a situation where you make an initial request
|
---|
| 80 | * and the request times out. If you make the request again with the same
|
---|
| 81 | * request ID, the server can check if original operation with the same request
|
---|
| 82 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 83 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 84 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 85 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 86 | * @return Operation
|
---|
| 87 | * @throws \Google\Service\Exception
|
---|
| 88 | */
|
---|
| 89 | public function delete($name, $optParams = [])
|
---|
| 90 | {
|
---|
| 91 | $params = ['name' => $name];
|
---|
| 92 | $params = array_merge($params, $optParams);
|
---|
| 93 | return $this->call('delete', [$params], Operation::class);
|
---|
| 94 | }
|
---|
| 95 | /**
|
---|
| 96 | * Gets a service project attachment. (serviceProjectAttachments.get)
|
---|
| 97 | *
|
---|
| 98 | * @param string $name Required. Fully qualified name of the service project
|
---|
| 99 | * attachment to retrieve. Expected format: `projects/{project}/locations/{locat
|
---|
| 100 | * ion}/serviceProjectAttachments/{serviceProjectAttachment}`.
|
---|
| 101 | * @param array $optParams Optional parameters.
|
---|
| 102 | * @return ServiceProjectAttachment
|
---|
| 103 | * @throws \Google\Service\Exception
|
---|
| 104 | */
|
---|
| 105 | public function get($name, $optParams = [])
|
---|
| 106 | {
|
---|
| 107 | $params = ['name' => $name];
|
---|
| 108 | $params = array_merge($params, $optParams);
|
---|
| 109 | return $this->call('get', [$params], ServiceProjectAttachment::class);
|
---|
| 110 | }
|
---|
| 111 | /**
|
---|
| 112 | * Lists service projects attached to the host project.
|
---|
| 113 | * (serviceProjectAttachments.listProjectsLocationsServiceProjectAttachments)
|
---|
| 114 | *
|
---|
| 115 | * @param string $parent Required. Host project ID and location to list service
|
---|
| 116 | * project attachments. Only global location is supported. Expected format:
|
---|
| 117 | * `projects/{project}/locations/{location}`.
|
---|
| 118 | * @param array $optParams Optional parameters.
|
---|
| 119 | *
|
---|
| 120 | * @opt_param string filter Optional. Filtering results.
|
---|
| 121 | * @opt_param string orderBy Optional. Hint for how to order the results.
|
---|
| 122 | * @opt_param int pageSize Optional. Requested page size. Server may return
|
---|
| 123 | * fewer items than requested. If unspecified, server will pick an appropriate
|
---|
| 124 | * default.
|
---|
| 125 | * @opt_param string pageToken Optional. A token identifying a page of results
|
---|
| 126 | * the server should return.
|
---|
| 127 | * @return ListServiceProjectAttachmentsResponse
|
---|
| 128 | * @throws \Google\Service\Exception
|
---|
| 129 | */
|
---|
| 130 | public function listProjectsLocationsServiceProjectAttachments($parent, $optParams = [])
|
---|
| 131 | {
|
---|
| 132 | $params = ['parent' => $parent];
|
---|
| 133 | $params = array_merge($params, $optParams);
|
---|
| 134 | return $this->call('list', [$params], ListServiceProjectAttachmentsResponse::class);
|
---|
| 135 | }
|
---|
| 136 | }
|
---|
| 137 |
|
---|
| 138 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 139 | class_alias(ProjectsLocationsServiceProjectAttachments::class, 'Google_Service_AppHub_Resource_ProjectsLocationsServiceProjectAttachments');
|
---|