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\Sasportal\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Sasportal\SasPortalDeployment;
|
---|
21 | use Google\Service\Sasportal\SasPortalEmpty;
|
---|
22 | use Google\Service\Sasportal\SasPortalListDeploymentsResponse;
|
---|
23 | use Google\Service\Sasportal\SasPortalMoveDeploymentRequest;
|
---|
24 | use Google\Service\Sasportal\SasPortalOperation;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "deployments" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $sasportalService = new Google\Service\Sasportal(...);
|
---|
31 | * $deployments = $sasportalService->nodes_deployments;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class NodesDeployments extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Deletes a deployment. (deployments.delete)
|
---|
38 | *
|
---|
39 | * @param string $name Required. The name of the deployment.
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return SasPortalEmpty
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function delete($name, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['name' => $name];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('delete', [$params], SasPortalEmpty::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Returns a requested deployment. (deployments.get)
|
---|
52 | *
|
---|
53 | * @param string $name Required. The name of the deployment.
|
---|
54 | * @param array $optParams Optional parameters.
|
---|
55 | * @return SasPortalDeployment
|
---|
56 | * @throws \Google\Service\Exception
|
---|
57 | */
|
---|
58 | public function get($name, $optParams = [])
|
---|
59 | {
|
---|
60 | $params = ['name' => $name];
|
---|
61 | $params = array_merge($params, $optParams);
|
---|
62 | return $this->call('get', [$params], SasPortalDeployment::class);
|
---|
63 | }
|
---|
64 | /**
|
---|
65 | * Lists deployments. (deployments.listNodesDeployments)
|
---|
66 | *
|
---|
67 | * @param string $parent Required. The parent resource name, for example,
|
---|
68 | * "nodes/1", customer/1/nodes/2.
|
---|
69 | * @param array $optParams Optional parameters.
|
---|
70 | *
|
---|
71 | * @opt_param string filter The filter expression. The filter should have the
|
---|
72 | * following format: "DIRECT_CHILDREN" or format: "direct_children". The filter
|
---|
73 | * is case insensitive. If empty, then no deployments are filtered.
|
---|
74 | * @opt_param int pageSize The maximum number of deployments to return in the
|
---|
75 | * response.
|
---|
76 | * @opt_param string pageToken A pagination token returned from a previous call
|
---|
77 | * to ListDeployments that indicates where this listing should continue from.
|
---|
78 | * @return SasPortalListDeploymentsResponse
|
---|
79 | * @throws \Google\Service\Exception
|
---|
80 | */
|
---|
81 | public function listNodesDeployments($parent, $optParams = [])
|
---|
82 | {
|
---|
83 | $params = ['parent' => $parent];
|
---|
84 | $params = array_merge($params, $optParams);
|
---|
85 | return $this->call('list', [$params], SasPortalListDeploymentsResponse::class);
|
---|
86 | }
|
---|
87 | /**
|
---|
88 | * Moves a deployment under another node or customer. (deployments.move)
|
---|
89 | *
|
---|
90 | * @param string $name Required. The name of the deployment to move.
|
---|
91 | * @param SasPortalMoveDeploymentRequest $postBody
|
---|
92 | * @param array $optParams Optional parameters.
|
---|
93 | * @return SasPortalOperation
|
---|
94 | * @throws \Google\Service\Exception
|
---|
95 | */
|
---|
96 | public function move($name, SasPortalMoveDeploymentRequest $postBody, $optParams = [])
|
---|
97 | {
|
---|
98 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
99 | $params = array_merge($params, $optParams);
|
---|
100 | return $this->call('move', [$params], SasPortalOperation::class);
|
---|
101 | }
|
---|
102 | /**
|
---|
103 | * Updates an existing deployment. (deployments.patch)
|
---|
104 | *
|
---|
105 | * @param string $name Output only. Resource name.
|
---|
106 | * @param SasPortalDeployment $postBody
|
---|
107 | * @param array $optParams Optional parameters.
|
---|
108 | *
|
---|
109 | * @opt_param string updateMask Fields to be updated.
|
---|
110 | * @return SasPortalDeployment
|
---|
111 | * @throws \Google\Service\Exception
|
---|
112 | */
|
---|
113 | public function patch($name, SasPortalDeployment $postBody, $optParams = [])
|
---|
114 | {
|
---|
115 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
116 | $params = array_merge($params, $optParams);
|
---|
117 | return $this->call('patch', [$params], SasPortalDeployment::class);
|
---|
118 | }
|
---|
119 | }
|
---|
120 |
|
---|
121 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
122 | class_alias(NodesDeployments::class, 'Google_Service_Sasportal_Resource_NodesDeployments');
|
---|