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