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