source: vendor/google/apiclient-services/src/NetworkSecurity/Resource/OrganizationsLocationsSecurityProfiles.php

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

Upload project files

  • Property mode set to 100644
File size: 5.7 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\ListSecurityProfilesResponse;
21use Google\Service\NetworkSecurity\Operation;
22use Google\Service\NetworkSecurity\SecurityProfile;
23
24/**
25 * The "securityProfiles" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $networksecurityService = new Google\Service\NetworkSecurity(...);
29 * $securityProfiles = $networksecurityService->organizations_locations_securityProfiles;
30 * </code>
31 */
32class OrganizationsLocationsSecurityProfiles extends \Google\Service\Resource
33{
34 /**
35 * Creates a new SecurityProfile in a given organization and location.
36 * (securityProfiles.create)
37 *
38 * @param string $parent Required. The parent resource of the SecurityProfile.
39 * Must be in the format `projects|organizations/locations/{location}`.
40 * @param SecurityProfile $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string securityProfileId Required. Short name of the
44 * SecurityProfile resource to be created. This value should be 1-63 characters
45 * long, containing only letters, numbers, hyphens, and underscores, and should
46 * not start with a number. E.g. "security_profile1".
47 * @return Operation
48 * @throws \Google\Service\Exception
49 */
50 public function create($parent, SecurityProfile $postBody, $optParams = [])
51 {
52 $params = ['parent' => $parent, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('create', [$params], Operation::class);
55 }
56 /**
57 * Deletes a single SecurityProfile. (securityProfiles.delete)
58 *
59 * @param string $name Required. A name of the SecurityProfile to delete. Must
60 * be in the format `projects|organizations/locations/{location}/securityProfile
61 * s/{security_profile_id}`.
62 * @param array $optParams Optional parameters.
63 *
64 * @opt_param string etag Optional. If client provided etag is out of date,
65 * delete will return FAILED_PRECONDITION error.
66 * @return Operation
67 * @throws \Google\Service\Exception
68 */
69 public function delete($name, $optParams = [])
70 {
71 $params = ['name' => $name];
72 $params = array_merge($params, $optParams);
73 return $this->call('delete', [$params], Operation::class);
74 }
75 /**
76 * Gets details of a single SecurityProfile. (securityProfiles.get)
77 *
78 * @param string $name Required. A name of the SecurityProfile to get. Must be
79 * in the format `projects|organizations/locations/{location}/securityProfiles/{
80 * security_profile_id}`.
81 * @param array $optParams Optional parameters.
82 * @return SecurityProfile
83 * @throws \Google\Service\Exception
84 */
85 public function get($name, $optParams = [])
86 {
87 $params = ['name' => $name];
88 $params = array_merge($params, $optParams);
89 return $this->call('get', [$params], SecurityProfile::class);
90 }
91 /**
92 * Lists SecurityProfiles in a given organization and location.
93 * (securityProfiles.listOrganizationsLocationsSecurityProfiles)
94 *
95 * @param string $parent Required. The project or organization and location from
96 * which the SecurityProfiles should be listed, specified in the format
97 * `projects|organizations/locations/{location}`.
98 * @param array $optParams Optional parameters.
99 *
100 * @opt_param int pageSize Maximum number of SecurityProfiles to return per
101 * call.
102 * @opt_param string pageToken The value returned by the last
103 * `ListSecurityProfilesResponse` Indicates that this is a continuation of a
104 * prior `ListSecurityProfiles` call, and that the system should return the next
105 * page of data.
106 * @return ListSecurityProfilesResponse
107 * @throws \Google\Service\Exception
108 */
109 public function listOrganizationsLocationsSecurityProfiles($parent, $optParams = [])
110 {
111 $params = ['parent' => $parent];
112 $params = array_merge($params, $optParams);
113 return $this->call('list', [$params], ListSecurityProfilesResponse::class);
114 }
115 /**
116 * Updates the parameters of a single SecurityProfile. (securityProfiles.patch)
117 *
118 * @param string $name Immutable. Identifier. Name of the SecurityProfile
119 * resource. It matches pattern `projects|organizations/locations/{location}/sec
120 * urityProfiles/{security_profile}`.
121 * @param SecurityProfile $postBody
122 * @param array $optParams Optional parameters.
123 *
124 * @opt_param string updateMask Required. Field mask is used to specify the
125 * fields to be overwritten in the SecurityProfile resource by the update. The
126 * 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.
128 * @return Operation
129 * @throws \Google\Service\Exception
130 */
131 public function patch($name, SecurityProfile $postBody, $optParams = [])
132 {
133 $params = ['name' => $name, 'postBody' => $postBody];
134 $params = array_merge($params, $optParams);
135 return $this->call('patch', [$params], Operation::class);
136 }
137}
138
139// Adding a class alias for backwards compatibility with the previous class name.
140class_alias(OrganizationsLocationsSecurityProfiles::class, 'Google_Service_NetworkSecurity_Resource_OrganizationsLocationsSecurityProfiles');
Note: See TracBrowser for help on using the repository browser.