source: vendor/google/apiclient-services/src/NetworkServices/Resource/ProjectsLocationsEndpointPolicies.php

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

Upload 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\NetworkServices\Resource;
19
20use Google\Service\NetworkServices\EndpointPolicy;
21use Google\Service\NetworkServices\ListEndpointPoliciesResponse;
22use Google\Service\NetworkServices\Operation;
23
24/**
25 * The "endpointPolicies" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $networkservicesService = new Google\Service\NetworkServices(...);
29 * $endpointPolicies = $networkservicesService->projects_locations_endpointPolicies;
30 * </code>
31 */
32class ProjectsLocationsEndpointPolicies extends \Google\Service\Resource
33{
34 /**
35 * Creates a new EndpointPolicy in a given project and location.
36 * (endpointPolicies.create)
37 *
38 * @param string $parent Required. The parent resource of the EndpointPolicy.
39 * Must be in the format `projects/locations/global`.
40 * @param EndpointPolicy $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string endpointPolicyId Required. Short name of the EndpointPolicy
44 * resource to be created. E.g. "CustomECS".
45 * @return Operation
46 * @throws \Google\Service\Exception
47 */
48 public function create($parent, EndpointPolicy $postBody, $optParams = [])
49 {
50 $params = ['parent' => $parent, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], Operation::class);
53 }
54 /**
55 * Deletes a single EndpointPolicy. (endpointPolicies.delete)
56 *
57 * @param string $name Required. A name of the EndpointPolicy to delete. Must be
58 * in the format `projects/locations/global/endpointPolicies`.
59 * @param array $optParams Optional parameters.
60 * @return Operation
61 * @throws \Google\Service\Exception
62 */
63 public function delete($name, $optParams = [])
64 {
65 $params = ['name' => $name];
66 $params = array_merge($params, $optParams);
67 return $this->call('delete', [$params], Operation::class);
68 }
69 /**
70 * Gets details of a single EndpointPolicy. (endpointPolicies.get)
71 *
72 * @param string $name Required. A name of the EndpointPolicy to get. Must be in
73 * the format `projects/locations/global/endpointPolicies`.
74 * @param array $optParams Optional parameters.
75 * @return EndpointPolicy
76 * @throws \Google\Service\Exception
77 */
78 public function get($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('get', [$params], EndpointPolicy::class);
83 }
84 /**
85 * Lists EndpointPolicies in a given project and location.
86 * (endpointPolicies.listProjectsLocationsEndpointPolicies)
87 *
88 * @param string $parent Required. The project and location from which the
89 * EndpointPolicies should be listed, specified in the format
90 * `projects/locations/global`.
91 * @param array $optParams Optional parameters.
92 *
93 * @opt_param int pageSize Maximum number of EndpointPolicies to return per
94 * call.
95 * @opt_param string pageToken The value returned by the last
96 * `ListEndpointPoliciesResponse` Indicates that this is a continuation of a
97 * prior `ListEndpointPolicies` call, and that the system should return the next
98 * page of data.
99 * @return ListEndpointPoliciesResponse
100 * @throws \Google\Service\Exception
101 */
102 public function listProjectsLocationsEndpointPolicies($parent, $optParams = [])
103 {
104 $params = ['parent' => $parent];
105 $params = array_merge($params, $optParams);
106 return $this->call('list', [$params], ListEndpointPoliciesResponse::class);
107 }
108 /**
109 * Updates the parameters of a single EndpointPolicy. (endpointPolicies.patch)
110 *
111 * @param string $name Identifier. Name of the EndpointPolicy resource. It
112 * matches pattern
113 * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
114 * @param EndpointPolicy $postBody
115 * @param array $optParams Optional parameters.
116 *
117 * @opt_param string updateMask Optional. Field mask is used to specify the
118 * fields to be overwritten in the EndpointPolicy resource by the update. The
119 * fields specified in the update_mask are relative to the resource, not the
120 * full request. A field will be overwritten if it is in the mask. If the user
121 * does not provide a mask then all fields will be overwritten.
122 * @return Operation
123 * @throws \Google\Service\Exception
124 */
125 public function patch($name, EndpointPolicy $postBody, $optParams = [])
126 {
127 $params = ['name' => $name, 'postBody' => $postBody];
128 $params = array_merge($params, $optParams);
129 return $this->call('patch', [$params], Operation::class);
130 }
131}
132
133// Adding a class alias for backwards compatibility with the previous class name.
134class_alias(ProjectsLocationsEndpointPolicies::class, 'Google_Service_NetworkServices_Resource_ProjectsLocationsEndpointPolicies');
Note: See TracBrowser for help on using the repository browser.