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\GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse;
|
---|
21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListSecurityProfilesResponse;
|
---|
22 | use Google\Service\Apigee\GoogleCloudApigeeV1SecurityProfile;
|
---|
23 | use Google\Service\Apigee\GoogleProtobufEmpty;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "securityProfiles" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
30 | * $securityProfiles = $apigeeService->organizations_securityProfiles;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class OrganizationsSecurityProfiles extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * CreateSecurityProfile create a new custom security profile.
|
---|
37 | * (securityProfiles.create)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. Name of organization. Format:
|
---|
40 | * organizations/{org}
|
---|
41 | * @param GoogleCloudApigeeV1SecurityProfile $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | *
|
---|
44 | * @opt_param string securityProfileId Required. The ID to use for the
|
---|
45 | * SecurityProfile, which will become the final component of the action's
|
---|
46 | * resource name. This value should be 1-63 characters and validated by
|
---|
47 | * "(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)".
|
---|
48 | * @return GoogleCloudApigeeV1SecurityProfile
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function create($parent, GoogleCloudApigeeV1SecurityProfile $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('create', [$params], GoogleCloudApigeeV1SecurityProfile::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * DeleteSecurityProfile delete a profile with all its revisions.
|
---|
59 | * (securityProfiles.delete)
|
---|
60 | *
|
---|
61 | * @param string $name Required. Name of profile. Format:
|
---|
62 | * organizations/{org}/securityProfiles/{profile}
|
---|
63 | * @param array $optParams Optional parameters.
|
---|
64 | * @return GoogleProtobufEmpty
|
---|
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], GoogleProtobufEmpty::class);
|
---|
72 | }
|
---|
73 | /**
|
---|
74 | * GetSecurityProfile gets the specified security profile. Returns NOT_FOUND if
|
---|
75 | * security profile is not present for the specified organization.
|
---|
76 | * (securityProfiles.get)
|
---|
77 | *
|
---|
78 | * @param string $name Required. Security profile in the following format:
|
---|
79 | * `organizations/{org}/securityProfiles/{profile}'. Profile may optionally
|
---|
80 | * contain revision ID. If revision ID is not provided, the response will
|
---|
81 | * contain latest revision by default. Example:
|
---|
82 | * organizations/testOrg/securityProfiles/testProfile@5
|
---|
83 | * @param array $optParams Optional parameters.
|
---|
84 | * @return GoogleCloudApigeeV1SecurityProfile
|
---|
85 | * @throws \Google\Service\Exception
|
---|
86 | */
|
---|
87 | public function get($name, $optParams = [])
|
---|
88 | {
|
---|
89 | $params = ['name' => $name];
|
---|
90 | $params = array_merge($params, $optParams);
|
---|
91 | return $this->call('get', [$params], GoogleCloudApigeeV1SecurityProfile::class);
|
---|
92 | }
|
---|
93 | /**
|
---|
94 | * ListSecurityProfiles lists all the security profiles associated with the org
|
---|
95 | * including attached and unattached profiles.
|
---|
96 | * (securityProfiles.listOrganizationsSecurityProfiles)
|
---|
97 | *
|
---|
98 | * @param string $parent Required. For a specific organization, list of all the
|
---|
99 | * security profiles. Format: `organizations/{org}`
|
---|
100 | * @param array $optParams Optional parameters.
|
---|
101 | *
|
---|
102 | * @opt_param int pageSize The maximum number of profiles to return. The service
|
---|
103 | * may return fewer than this value. If unspecified, at most 50 profiles will be
|
---|
104 | * returned.
|
---|
105 | * @opt_param string pageToken A page token, received from a previous
|
---|
106 | * `ListSecurityProfiles` call. Provide this to retrieve the subsequent page.
|
---|
107 | * @return GoogleCloudApigeeV1ListSecurityProfilesResponse
|
---|
108 | * @throws \Google\Service\Exception
|
---|
109 | */
|
---|
110 | public function listOrganizationsSecurityProfiles($parent, $optParams = [])
|
---|
111 | {
|
---|
112 | $params = ['parent' => $parent];
|
---|
113 | $params = array_merge($params, $optParams);
|
---|
114 | return $this->call('list', [$params], GoogleCloudApigeeV1ListSecurityProfilesResponse::class);
|
---|
115 | }
|
---|
116 | /**
|
---|
117 | * ListSecurityProfileRevisions lists all the revisions of the security profile.
|
---|
118 | * (securityProfiles.listRevisions)
|
---|
119 | *
|
---|
120 | * @param string $name Required. For a specific profile, list all the revisions.
|
---|
121 | * Format: `organizations/{org}/securityProfiles/{profile}`
|
---|
122 | * @param array $optParams Optional parameters.
|
---|
123 | *
|
---|
124 | * @opt_param int pageSize The maximum number of profile revisions to return.
|
---|
125 | * The service may return fewer than this value. If unspecified, at most 50
|
---|
126 | * revisions will be returned.
|
---|
127 | * @opt_param string pageToken A page token, received from a previous
|
---|
128 | * `ListSecurityProfileRevisions` call. Provide this to retrieve the subsequent
|
---|
129 | * page.
|
---|
130 | * @return GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse
|
---|
131 | * @throws \Google\Service\Exception
|
---|
132 | */
|
---|
133 | public function listRevisions($name, $optParams = [])
|
---|
134 | {
|
---|
135 | $params = ['name' => $name];
|
---|
136 | $params = array_merge($params, $optParams);
|
---|
137 | return $this->call('listRevisions', [$params], GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse::class);
|
---|
138 | }
|
---|
139 | /**
|
---|
140 | * UpdateSecurityProfile update the metadata of security profile.
|
---|
141 | * (securityProfiles.patch)
|
---|
142 | *
|
---|
143 | * @param string $name Immutable. Name of the security profile resource. Format:
|
---|
144 | * organizations/{org}/securityProfiles/{profile}
|
---|
145 | * @param GoogleCloudApigeeV1SecurityProfile $postBody
|
---|
146 | * @param array $optParams Optional parameters.
|
---|
147 | *
|
---|
148 | * @opt_param string updateMask Required. The list of fields to update.
|
---|
149 | * @return GoogleCloudApigeeV1SecurityProfile
|
---|
150 | * @throws \Google\Service\Exception
|
---|
151 | */
|
---|
152 | public function patch($name, GoogleCloudApigeeV1SecurityProfile $postBody, $optParams = [])
|
---|
153 | {
|
---|
154 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
155 | $params = array_merge($params, $optParams);
|
---|
156 | return $this->call('patch', [$params], GoogleCloudApigeeV1SecurityProfile::class);
|
---|
157 | }
|
---|
158 | }
|
---|
159 |
|
---|
160 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
161 | class_alias(OrganizationsSecurityProfiles::class, 'Google_Service_Apigee_Resource_OrganizationsSecurityProfiles');
|
---|