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 |
|
---|
18 | namespace Google\Service\NetworkSecurity\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\NetworkSecurity\ListSecurityProfileGroupsResponse;
|
---|
21 | use Google\Service\NetworkSecurity\Operation;
|
---|
22 | use Google\Service\NetworkSecurity\SecurityProfileGroup;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "securityProfileGroups" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $networksecurityService = new Google\Service\NetworkSecurity(...);
|
---|
29 | * $securityProfileGroups = $networksecurityService->organizations_locations_securityProfileGroups;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class OrganizationsLocationsSecurityProfileGroups extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new SecurityProfileGroup in a given organization and location.
|
---|
36 | * (securityProfileGroups.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The parent resource of the
|
---|
39 | * SecurityProfileGroup. Must be in the format
|
---|
40 | * `projects|organizations/locations/{location}`.
|
---|
41 | * @param SecurityProfileGroup $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | *
|
---|
44 | * @opt_param string securityProfileGroupId Required. Short name of the
|
---|
45 | * SecurityProfileGroup 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. "security_profile_group1".
|
---|
48 | * @return Operation
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function create($parent, SecurityProfileGroup $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 SecurityProfileGroup. (securityProfileGroups.delete)
|
---|
59 | *
|
---|
60 | * @param string $name Required. A name of the SecurityProfileGroup to delete.
|
---|
61 | * Must be in the format `projects|organizations/locations/{location}/securityPr
|
---|
62 | * ofileGroups/{security_profile_group}`.
|
---|
63 | * @param array $optParams Optional parameters.
|
---|
64 | *
|
---|
65 | * @opt_param string etag Optional. If client provided etag is out of date,
|
---|
66 | * delete will return FAILED_PRECONDITION error.
|
---|
67 | * @return Operation
|
---|
68 | * @throws \Google\Service\Exception
|
---|
69 | */
|
---|
70 | public function delete($name, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['name' => $name];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('delete', [$params], Operation::class);
|
---|
75 | }
|
---|
76 | /**
|
---|
77 | * Gets details of a single SecurityProfileGroup. (securityProfileGroups.get)
|
---|
78 | *
|
---|
79 | * @param string $name Required. A name of the SecurityProfileGroup to get. Must
|
---|
80 | * be in the format `projects|organizations/locations/{location}/securityProfile
|
---|
81 | * Groups/{security_profile_group}`.
|
---|
82 | * @param array $optParams Optional parameters.
|
---|
83 | * @return SecurityProfileGroup
|
---|
84 | * @throws \Google\Service\Exception
|
---|
85 | */
|
---|
86 | public function get($name, $optParams = [])
|
---|
87 | {
|
---|
88 | $params = ['name' => $name];
|
---|
89 | $params = array_merge($params, $optParams);
|
---|
90 | return $this->call('get', [$params], SecurityProfileGroup::class);
|
---|
91 | }
|
---|
92 | /**
|
---|
93 | * Lists SecurityProfileGroups in a given organization and location.
|
---|
94 | * (securityProfileGroups.listOrganizationsLocationsSecurityProfileGroups)
|
---|
95 | *
|
---|
96 | * @param string $parent Required. The project or organization and location from
|
---|
97 | * which the SecurityProfileGroups should be listed, specified in the format
|
---|
98 | * `projects|organizations/locations/{location}`.
|
---|
99 | * @param array $optParams Optional parameters.
|
---|
100 | *
|
---|
101 | * @opt_param int pageSize Maximum number of SecurityProfileGroups to return per
|
---|
102 | * call.
|
---|
103 | * @opt_param string pageToken The value returned by the last
|
---|
104 | * `ListSecurityProfileGroupsResponse` Indicates that this is a continuation of
|
---|
105 | * a prior `ListSecurityProfileGroups` call, and that the system should return
|
---|
106 | * the next page of data.
|
---|
107 | * @return ListSecurityProfileGroupsResponse
|
---|
108 | * @throws \Google\Service\Exception
|
---|
109 | */
|
---|
110 | public function listOrganizationsLocationsSecurityProfileGroups($parent, $optParams = [])
|
---|
111 | {
|
---|
112 | $params = ['parent' => $parent];
|
---|
113 | $params = array_merge($params, $optParams);
|
---|
114 | return $this->call('list', [$params], ListSecurityProfileGroupsResponse::class);
|
---|
115 | }
|
---|
116 | /**
|
---|
117 | * Updates the parameters of a single SecurityProfileGroup.
|
---|
118 | * (securityProfileGroups.patch)
|
---|
119 | *
|
---|
120 | * @param string $name Immutable. Identifier. Name of the SecurityProfileGroup
|
---|
121 | * resource. It matches pattern `projects|organizations/locations/{location}/sec
|
---|
122 | * urityProfileGroups/{security_profile_group}`.
|
---|
123 | * @param SecurityProfileGroup $postBody
|
---|
124 | * @param array $optParams Optional parameters.
|
---|
125 | *
|
---|
126 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
127 | * fields to be overwritten in the SecurityProfileGroup resource by the update.
|
---|
128 | * The fields specified in the update_mask are relative to the resource, not the
|
---|
129 | * full request. A field will be overwritten if it is in the mask.
|
---|
130 | * @return Operation
|
---|
131 | * @throws \Google\Service\Exception
|
---|
132 | */
|
---|
133 | public function patch($name, SecurityProfileGroup $postBody, $optParams = [])
|
---|
134 | {
|
---|
135 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
136 | $params = array_merge($params, $optParams);
|
---|
137 | return $this->call('patch', [$params], Operation::class);
|
---|
138 | }
|
---|
139 | }
|
---|
140 |
|
---|
141 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
142 | class_alias(OrganizationsLocationsSecurityProfileGroups::class, 'Google_Service_NetworkSecurity_Resource_OrganizationsLocationsSecurityProfileGroups');
|
---|