source: vendor/google/apiclient-services/src/Storagetransfer/Resource/ProjectsAgentPools.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload new project files

  • Property mode set to 100644
File size: 5.2 KB
Line 
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\Storagetransfer\Resource;
19
20use Google\Service\Storagetransfer\AgentPool;
21use Google\Service\Storagetransfer\ListAgentPoolsResponse;
22use Google\Service\Storagetransfer\StoragetransferEmpty;
23
24/**
25 * The "agentPools" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $storagetransferService = new Google\Service\Storagetransfer(...);
29 * $agentPools = $storagetransferService->projects_agentPools;
30 * </code>
31 */
32class ProjectsAgentPools extends \Google\Service\Resource
33{
34 /**
35 * Creates an agent pool resource. (agentPools.create)
36 *
37 * @param string $projectId Required. The ID of the Google Cloud project that
38 * owns the agent pool.
39 * @param AgentPool $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string agentPoolId Required. The ID of the agent pool to create.
43 * The `agent_pool_id` must meet the following requirements: * Length of 128
44 * characters or less. * Not start with the string `goog`. * Start with a
45 * lowercase ASCII character, followed by: * Zero or more: lowercase Latin
46 * alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores
47 * (`_`), or tildes (`~`). * One or more numerals or lowercase ASCII characters.
48 * As expressed by the regular expression:
49 * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
50 * @return AgentPool
51 * @throws \Google\Service\Exception
52 */
53 public function create($projectId, AgentPool $postBody, $optParams = [])
54 {
55 $params = ['projectId' => $projectId, 'postBody' => $postBody];
56 $params = array_merge($params, $optParams);
57 return $this->call('create', [$params], AgentPool::class);
58 }
59 /**
60 * Deletes an agent pool. (agentPools.delete)
61 *
62 * @param string $name Required. The name of the agent pool to delete.
63 * @param array $optParams Optional parameters.
64 * @return StoragetransferEmpty
65 * @throws \Google\Service\Exception
66 */
67 public function delete($name, $optParams = [])
68 {
69 $params = ['name' => $name];
70 $params = array_merge($params, $optParams);
71 return $this->call('delete', [$params], StoragetransferEmpty::class);
72 }
73 /**
74 * Gets an agent pool. (agentPools.get)
75 *
76 * @param string $name Required. The name of the agent pool to get.
77 * @param array $optParams Optional parameters.
78 * @return AgentPool
79 * @throws \Google\Service\Exception
80 */
81 public function get($name, $optParams = [])
82 {
83 $params = ['name' => $name];
84 $params = array_merge($params, $optParams);
85 return $this->call('get', [$params], AgentPool::class);
86 }
87 /**
88 * Lists agent pools. (agentPools.listProjectsAgentPools)
89 *
90 * @param string $projectId Required. The ID of the Google Cloud project that
91 * owns the job.
92 * @param array $optParams Optional parameters.
93 *
94 * @opt_param string filter An optional list of query parameters specified as
95 * JSON text in the form of:
96 * `{"agentPoolNames":["agentpool1","agentpool2",...]}` Since `agentPoolNames`
97 * support multiple values, its values must be specified with array notation.
98 * When the filter is either empty or not provided, the list returns all agent
99 * pools for the project.
100 * @opt_param int pageSize The list page size. The max allowed value is `256`.
101 * @opt_param string pageToken The list page token.
102 * @return ListAgentPoolsResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listProjectsAgentPools($projectId, $optParams = [])
106 {
107 $params = ['projectId' => $projectId];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], ListAgentPoolsResponse::class);
110 }
111 /**
112 * Updates an existing agent pool resource. (agentPools.patch)
113 *
114 * @param string $name Required. Specifies a unique string that identifies the
115 * agent pool. Format: `projects/{project_id}/agentPools/{agent_pool_id}`
116 * @param AgentPool $postBody
117 * @param array $optParams Optional parameters.
118 *
119 * @opt_param string updateMask The [field mask]
120 * (https://developers.google.com/protocol-
121 * buffers/docs/reference/google.protobuf) of the fields in `agentPool` to
122 * update in this request. The following `agentPool` fields can be updated: *
123 * display_name * bandwidth_limit
124 * @return AgentPool
125 * @throws \Google\Service\Exception
126 */
127 public function patch($name, AgentPool $postBody, $optParams = [])
128 {
129 $params = ['name' => $name, 'postBody' => $postBody];
130 $params = array_merge($params, $optParams);
131 return $this->call('patch', [$params], AgentPool::class);
132 }
133}
134
135// Adding a class alias for backwards compatibility with the previous class name.
136class_alias(ProjectsAgentPools::class, 'Google_Service_Storagetransfer_Resource_ProjectsAgentPools');
Note: See TracBrowser for help on using the repository browser.