source: vendor/google/apiclient-services/src/NetworkSecurity/Resource/ProjectsLocationsGatewaySecurityPolicies.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: 5.8 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\NetworkSecurity\Resource;
19
20use Google\Service\NetworkSecurity\GatewaySecurityPolicy;
21use Google\Service\NetworkSecurity\ListGatewaySecurityPoliciesResponse;
22use Google\Service\NetworkSecurity\Operation;
23
24/**
25 * The "gatewaySecurityPolicies" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $networksecurityService = new Google\Service\NetworkSecurity(...);
29 * $gatewaySecurityPolicies = $networksecurityService->projects_locations_gatewaySecurityPolicies;
30 * </code>
31 */
32class ProjectsLocationsGatewaySecurityPolicies extends \Google\Service\Resource
33{
34 /**
35 * Creates a new GatewaySecurityPolicy in a given project and location.
36 * (gatewaySecurityPolicies.create)
37 *
38 * @param string $parent Required. The parent resource of the
39 * GatewaySecurityPolicy. Must be in the format
40 * `projects/{project}/locations/{location}`.
41 * @param GatewaySecurityPolicy $postBody
42 * @param array $optParams Optional parameters.
43 *
44 * @opt_param string gatewaySecurityPolicyId Required. Short name of the
45 * GatewaySecurityPolicy resource to be created. This value should be 1-63
46 * characters long, containing only letters, numbers, hyphens, and underscores,
47 * and should not start with a number. E.g. "gateway_security_policy1".
48 * @return Operation
49 * @throws \Google\Service\Exception
50 */
51 public function create($parent, GatewaySecurityPolicy $postBody, $optParams = [])
52 {
53 $params = ['parent' => $parent, 'postBody' => $postBody];
54 $params = array_merge($params, $optParams);
55 return $this->call('create', [$params], Operation::class);
56 }
57 /**
58 * Deletes a single GatewaySecurityPolicy. (gatewaySecurityPolicies.delete)
59 *
60 * @param string $name Required. A name of the GatewaySecurityPolicy to delete.
61 * Must be in the format
62 * `projects/{project}/locations/{location}/gatewaySecurityPolicies`.
63 * @param array $optParams Optional parameters.
64 * @return Operation
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], Operation::class);
72 }
73 /**
74 * Gets details of a single GatewaySecurityPolicy. (gatewaySecurityPolicies.get)
75 *
76 * @param string $name Required. A name of the GatewaySecurityPolicy to get.
77 * Must be in the format
78 * `projects/{project}/locations/{location}/gatewaySecurityPolicies`.
79 * @param array $optParams Optional parameters.
80 * @return GatewaySecurityPolicy
81 * @throws \Google\Service\Exception
82 */
83 public function get($name, $optParams = [])
84 {
85 $params = ['name' => $name];
86 $params = array_merge($params, $optParams);
87 return $this->call('get', [$params], GatewaySecurityPolicy::class);
88 }
89 /**
90 * Lists GatewaySecurityPolicies in a given project and location.
91 * (gatewaySecurityPolicies.listProjectsLocationsGatewaySecurityPolicies)
92 *
93 * @param string $parent Required. The project and location from which the
94 * GatewaySecurityPolicies should be listed, specified in the format
95 * `projects/{project}/locations/{location}`.
96 * @param array $optParams Optional parameters.
97 *
98 * @opt_param int pageSize Maximum number of GatewaySecurityPolicies to return
99 * per call.
100 * @opt_param string pageToken The value returned by the last
101 * 'ListGatewaySecurityPoliciesResponse' Indicates that this is a continuation
102 * of a prior 'ListGatewaySecurityPolicies' call, and that the system should
103 * return the next page of data.
104 * @return ListGatewaySecurityPoliciesResponse
105 * @throws \Google\Service\Exception
106 */
107 public function listProjectsLocationsGatewaySecurityPolicies($parent, $optParams = [])
108 {
109 $params = ['parent' => $parent];
110 $params = array_merge($params, $optParams);
111 return $this->call('list', [$params], ListGatewaySecurityPoliciesResponse::class);
112 }
113 /**
114 * Updates the parameters of a single GatewaySecurityPolicy.
115 * (gatewaySecurityPolicies.patch)
116 *
117 * @param string $name Required. Name of the resource. Name is of the form proje
118 * cts/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_
119 * policy} gateway_security_policy should match the
120 * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
121 * @param GatewaySecurityPolicy $postBody
122 * @param array $optParams Optional parameters.
123 *
124 * @opt_param string updateMask Optional. Field mask is used to specify the
125 * fields to be overwritten in the GatewaySecurityPolicy resource by the update.
126 * The fields specified in the update_mask are relative to the resource, not the
127 * full request. A field will be overwritten if it is in the mask. If the user
128 * does not provide a mask then all fields will be overwritten.
129 * @return Operation
130 * @throws \Google\Service\Exception
131 */
132 public function patch($name, GatewaySecurityPolicy $postBody, $optParams = [])
133 {
134 $params = ['name' => $name, 'postBody' => $postBody];
135 $params = array_merge($params, $optParams);
136 return $this->call('patch', [$params], Operation::class);
137 }
138}
139
140// Adding a class alias for backwards compatibility with the previous class name.
141class_alias(ProjectsLocationsGatewaySecurityPolicies::class, 'Google_Service_NetworkSecurity_Resource_ProjectsLocationsGatewaySecurityPolicies');
Note: See TracBrowser for help on using the repository browser.