source: vendor/google/apiclient-services/src/NetworkManagement/Resource/ProjectsLocationsNetworkmanagementGlobalConnectivityTests.php

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

Upload project files

  • Property mode set to 100644
File size: 12.4 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\NetworkManagement\Resource;
19
20use Google\Service\NetworkManagement\ConnectivityTest;
21use Google\Service\NetworkManagement\ListConnectivityTestsResponse;
22use Google\Service\NetworkManagement\Operation;
23use Google\Service\NetworkManagement\Policy;
24use Google\Service\NetworkManagement\RerunConnectivityTestRequest;
25use Google\Service\NetworkManagement\SetIamPolicyRequest;
26use Google\Service\NetworkManagement\TestIamPermissionsRequest;
27use Google\Service\NetworkManagement\TestIamPermissionsResponse;
28
29/**
30 * The "connectivityTests" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $networkmanagementService = new Google\Service\NetworkManagement(...);
34 * $connectivityTests = $networkmanagementService->projects_locations_global_connectivityTests;
35 * </code>
36 */
37class ProjectsLocationsNetworkmanagementGlobalConnectivityTests extends \Google\Service\Resource
38{
39 /**
40 * Creates a new Connectivity Test. After you create a test, the reachability
41 * analysis is performed as part of the long running operation, which completes
42 * when the analysis completes. If the endpoint specifications in
43 * `ConnectivityTest` are invalid (for example, containing non-existent
44 * resources in the network, or you don't have read permissions to the network
45 * configurations of listed projects), then the reachability result returns a
46 * value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are
47 * incomplete, the reachability result returns a value of AMBIGUOUS. For more
48 * information, see the Connectivity Test documentation.
49 * (connectivityTests.create)
50 *
51 * @param string $parent Required. The parent resource of the Connectivity Test
52 * to create: `projects/{project_id}/locations/global`
53 * @param ConnectivityTest $postBody
54 * @param array $optParams Optional parameters.
55 *
56 * @opt_param string testId Required. The logical name of the Connectivity Test
57 * in your project with the following restrictions: * Must contain only
58 * lowercase letters, numbers, and hyphens. * Must start with a letter. * Must
59 * be between 1-40 characters. * Must end with a number or a letter. * Must be
60 * unique within the customer project
61 * @return Operation
62 * @throws \Google\Service\Exception
63 */
64 public function create($parent, ConnectivityTest $postBody, $optParams = [])
65 {
66 $params = ['parent' => $parent, 'postBody' => $postBody];
67 $params = array_merge($params, $optParams);
68 return $this->call('create', [$params], Operation::class);
69 }
70 /**
71 * Deletes a specific `ConnectivityTest`. (connectivityTests.delete)
72 *
73 * @param string $name Required. Connectivity Test resource name using the form:
74 * `projects/{project_id}/locations/global/connectivityTests/{test_id}`
75 * @param array $optParams Optional parameters.
76 * @return Operation
77 * @throws \Google\Service\Exception
78 */
79 public function delete($name, $optParams = [])
80 {
81 $params = ['name' => $name];
82 $params = array_merge($params, $optParams);
83 return $this->call('delete', [$params], Operation::class);
84 }
85 /**
86 * Gets the details of a specific Connectivity Test. (connectivityTests.get)
87 *
88 * @param string $name Required. `ConnectivityTest` resource name using the
89 * form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`
90 * @param array $optParams Optional parameters.
91 * @return ConnectivityTest
92 * @throws \Google\Service\Exception
93 */
94 public function get($name, $optParams = [])
95 {
96 $params = ['name' => $name];
97 $params = array_merge($params, $optParams);
98 return $this->call('get', [$params], ConnectivityTest::class);
99 }
100 /**
101 * Gets the access control policy for a resource. Returns an empty policy if the
102 * resource exists and does not have a policy set.
103 * (connectivityTests.getIamPolicy)
104 *
105 * @param string $resource REQUIRED: The resource for which the policy is being
106 * requested. See [Resource
107 * names](https://cloud.google.com/apis/design/resource_names) for the
108 * appropriate value for this field.
109 * @param array $optParams Optional parameters.
110 *
111 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
112 * version that will be used to format the policy. Valid values are 0, 1, and 3.
113 * Requests specifying an invalid value will be rejected. Requests for policies
114 * with any conditional role bindings must specify version 3. Policies with no
115 * conditional role bindings may specify any valid value or leave the field
116 * unset. The policy in the response might use the policy version that you
117 * specified, or it might use a lower policy version. For example, if you
118 * specify version 3, but the policy has no conditional role bindings, the
119 * response uses version 1. To learn which resources support conditions in their
120 * IAM policies, see the [IAM
121 * documentation](https://cloud.google.com/iam/help/conditions/resource-
122 * policies).
123 * @return Policy
124 * @throws \Google\Service\Exception
125 */
126 public function getIamPolicy($resource, $optParams = [])
127 {
128 $params = ['resource' => $resource];
129 $params = array_merge($params, $optParams);
130 return $this->call('getIamPolicy', [$params], Policy::class);
131 }
132 /**
133 * Lists all Connectivity Tests owned by a project. (connectivityTests.listProje
134 * ctsLocationsNetworkmanagementGlobalConnectivityTests)
135 *
136 * @param string $parent Required. The parent resource of the Connectivity
137 * Tests: `projects/{project_id}/locations/global`
138 * @param array $optParams Optional parameters.
139 *
140 * @opt_param string filter Lists the `ConnectivityTests` that match the filter
141 * expression. A filter expression filters the resources listed in the response.
142 * The expression must be of the form ` ` where operators: `<`, `>`, `<=`, `>=`,
143 * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is
144 * roughly synonymous with equality). can refer to a proto or JSON field, or a
145 * synthetic field. Field names can be camelCase or snake_case. Examples: -
146 * Filter by name: name =
147 * "projects/proj-1/locations/global/connectivityTests/test-1 - Filter by
148 * labels: - Resources that have a key called `foo` labels.foo:* - Resources
149 * that have a key called `foo` whose value is `bar` labels.foo = bar
150 * @opt_param string orderBy Field to use to sort the list.
151 * @opt_param int pageSize Number of `ConnectivityTests` to return.
152 * @opt_param string pageToken Page token from an earlier query, as returned in
153 * `next_page_token`.
154 * @return ListConnectivityTestsResponse
155 * @throws \Google\Service\Exception
156 */
157 public function listProjectsLocationsNetworkmanagementGlobalConnectivityTests($parent, $optParams = [])
158 {
159 $params = ['parent' => $parent];
160 $params = array_merge($params, $optParams);
161 return $this->call('list', [$params], ListConnectivityTestsResponse::class);
162 }
163 /**
164 * Updates the configuration of an existing `ConnectivityTest`. After you update
165 * a test, the reachability analysis is performed as part of the long running
166 * operation, which completes when the analysis completes. The Reachability
167 * state in the test resource is updated with the new result. If the endpoint
168 * specifications in `ConnectivityTest` are invalid (for example, they contain
169 * non-existent resources in the network, or the user does not have read
170 * permissions to the network configurations of listed projects), then the
171 * reachability result returns a value of UNKNOWN. If the endpoint
172 * specifications in `ConnectivityTest` are incomplete, the reachability result
173 * returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest`
174 * for more details. (connectivityTests.patch)
175 *
176 * @param string $name Identifier. Unique name of the resource using the form:
177 * `projects/{project_id}/locations/global/connectivityTests/{test_id}`
178 * @param ConnectivityTest $postBody
179 * @param array $optParams Optional parameters.
180 *
181 * @opt_param string updateMask Required. Mask of fields to update. At least one
182 * path must be supplied in this field.
183 * @return Operation
184 * @throws \Google\Service\Exception
185 */
186 public function patch($name, ConnectivityTest $postBody, $optParams = [])
187 {
188 $params = ['name' => $name, 'postBody' => $postBody];
189 $params = array_merge($params, $optParams);
190 return $this->call('patch', [$params], Operation::class);
191 }
192 /**
193 * Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the
194 * reachability analysis is performed as part of the long running operation,
195 * which completes when the analysis completes. Even though the test
196 * configuration remains the same, the reachability result may change due to
197 * underlying network configuration changes. If the endpoint specifications in
198 * `ConnectivityTest` become invalid (for example, specified resources are
199 * deleted in the network, or you lost read permissions to the network
200 * configurations of listed projects), then the reachability result returns a
201 * value of `UNKNOWN`. (connectivityTests.rerun)
202 *
203 * @param string $name Required. Connectivity Test resource name using the form:
204 * `projects/{project_id}/locations/global/connectivityTests/{test_id}`
205 * @param RerunConnectivityTestRequest $postBody
206 * @param array $optParams Optional parameters.
207 * @return Operation
208 * @throws \Google\Service\Exception
209 */
210 public function rerun($name, RerunConnectivityTestRequest $postBody, $optParams = [])
211 {
212 $params = ['name' => $name, 'postBody' => $postBody];
213 $params = array_merge($params, $optParams);
214 return $this->call('rerun', [$params], Operation::class);
215 }
216 /**
217 * Sets the access control policy on the specified resource. Replaces any
218 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
219 * `PERMISSION_DENIED` errors. (connectivityTests.setIamPolicy)
220 *
221 * @param string $resource REQUIRED: The resource for which the policy is being
222 * specified. See [Resource
223 * names](https://cloud.google.com/apis/design/resource_names) for the
224 * appropriate value for this field.
225 * @param SetIamPolicyRequest $postBody
226 * @param array $optParams Optional parameters.
227 * @return Policy
228 * @throws \Google\Service\Exception
229 */
230 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
231 {
232 $params = ['resource' => $resource, 'postBody' => $postBody];
233 $params = array_merge($params, $optParams);
234 return $this->call('setIamPolicy', [$params], Policy::class);
235 }
236 /**
237 * Returns permissions that a caller has on the specified resource. If the
238 * resource does not exist, this will return an empty set of permissions, not a
239 * `NOT_FOUND` error. Note: This operation is designed to be used for building
240 * permission-aware UIs and command-line tools, not for authorization checking.
241 * This operation may "fail open" without warning.
242 * (connectivityTests.testIamPermissions)
243 *
244 * @param string $resource REQUIRED: The resource for which the policy detail is
245 * being requested. See [Resource
246 * names](https://cloud.google.com/apis/design/resource_names) for the
247 * appropriate value for this field.
248 * @param TestIamPermissionsRequest $postBody
249 * @param array $optParams Optional parameters.
250 * @return TestIamPermissionsResponse
251 * @throws \Google\Service\Exception
252 */
253 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
254 {
255 $params = ['resource' => $resource, 'postBody' => $postBody];
256 $params = array_merge($params, $optParams);
257 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
258 }
259}
260
261// Adding a class alias for backwards compatibility with the previous class name.
262class_alias(ProjectsLocationsNetworkmanagementGlobalConnectivityTests::class, 'Google_Service_NetworkManagement_Resource_ProjectsLocationsNetworkmanagementGlobalConnectivityTests');
Note: See TracBrowser for help on using the repository browser.