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\Apigee\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Apigee\GoogleCloudApigeeV1ListSecurityProfilesV2Response;
|
---|
21 | use Google\Service\Apigee\GoogleCloudApigeeV1SecurityProfileV2;
|
---|
22 | use Google\Service\Apigee\GoogleProtobufEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "securityProfilesV2" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
29 | * $securityProfilesV2 = $apigeeService->organizations_securityProfilesV2;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class OrganizationsSecurityProfilesV2 extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Create a security profile v2. (securityProfilesV2.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The parent resource name. Format:
|
---|
38 | * `organizations/{org}`
|
---|
39 | * @param GoogleCloudApigeeV1SecurityProfileV2 $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string securityProfileV2Id Required. The security profile id.
|
---|
43 | * @return GoogleCloudApigeeV1SecurityProfileV2
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($parent, GoogleCloudApigeeV1SecurityProfileV2 $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], GoogleCloudApigeeV1SecurityProfileV2::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Delete a security profile v2. (securityProfilesV2.delete)
|
---|
54 | *
|
---|
55 | * @param string $name Required. The name of the security profile v2 to delete.
|
---|
56 | * Format: `organizations/{org}/securityProfilesV2/{profile}`
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | * @return GoogleProtobufEmpty
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function delete($name, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['name' => $name];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * Get a security profile v2. (securityProfilesV2.get)
|
---|
69 | *
|
---|
70 | * @param string $name Required. The name of the security profile v2 to get.
|
---|
71 | * Format: `organizations/{org}/securityProfilesV2/{profile}`
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | * @return GoogleCloudApigeeV1SecurityProfileV2
|
---|
74 | * @throws \Google\Service\Exception
|
---|
75 | */
|
---|
76 | public function get($name, $optParams = [])
|
---|
77 | {
|
---|
78 | $params = ['name' => $name];
|
---|
79 | $params = array_merge($params, $optParams);
|
---|
80 | return $this->call('get', [$params], GoogleCloudApigeeV1SecurityProfileV2::class);
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * List security profiles v2.
|
---|
84 | * (securityProfilesV2.listOrganizationsSecurityProfilesV2)
|
---|
85 | *
|
---|
86 | * @param string $parent Required. For a specific organization, list of all the
|
---|
87 | * security profiles. Format: `organizations/{org}`
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | *
|
---|
90 | * @opt_param int pageSize Optional. The maximum number of profiles to return
|
---|
91 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
92 | * `ListSecurityProfilesV2` call. Provide this to retrieve the subsequent page.
|
---|
93 | * @return GoogleCloudApigeeV1ListSecurityProfilesV2Response
|
---|
94 | * @throws \Google\Service\Exception
|
---|
95 | */
|
---|
96 | public function listOrganizationsSecurityProfilesV2($parent, $optParams = [])
|
---|
97 | {
|
---|
98 | $params = ['parent' => $parent];
|
---|
99 | $params = array_merge($params, $optParams);
|
---|
100 | return $this->call('list', [$params], GoogleCloudApigeeV1ListSecurityProfilesV2Response::class);
|
---|
101 | }
|
---|
102 | /**
|
---|
103 | * Update a security profile V2. (securityProfilesV2.patch)
|
---|
104 | *
|
---|
105 | * @param string $name Identifier. Name of the security profile v2 resource.
|
---|
106 | * Format: organizations/{org}/securityProfilesV2/{profile}
|
---|
107 | * @param GoogleCloudApigeeV1SecurityProfileV2 $postBody
|
---|
108 | * @param array $optParams Optional parameters.
|
---|
109 | *
|
---|
110 | * @opt_param string updateMask Optional. The list of fields to update. Valid
|
---|
111 | * fields to update are `description` and `profileAssessmentConfigs`.
|
---|
112 | * @return GoogleCloudApigeeV1SecurityProfileV2
|
---|
113 | * @throws \Google\Service\Exception
|
---|
114 | */
|
---|
115 | public function patch($name, GoogleCloudApigeeV1SecurityProfileV2 $postBody, $optParams = [])
|
---|
116 | {
|
---|
117 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
118 | $params = array_merge($params, $optParams);
|
---|
119 | return $this->call('patch', [$params], GoogleCloudApigeeV1SecurityProfileV2::class);
|
---|
120 | }
|
---|
121 | }
|
---|
122 |
|
---|
123 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
124 | class_alias(OrganizationsSecurityProfilesV2::class, 'Google_Service_Apigee_Resource_OrganizationsSecurityProfilesV2');
|
---|