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\NetworkServices\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\NetworkServices\ListWasmPluginsResponse;
|
---|
21 | use Google\Service\NetworkServices\Operation;
|
---|
22 | use Google\Service\NetworkServices\WasmPlugin;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "wasmPlugins" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $networkservicesService = new Google\Service\NetworkServices(...);
|
---|
29 | * $wasmPlugins = $networkservicesService->projects_locations_wasmPlugins;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsWasmPlugins extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new `WasmPlugin` resource in a given project and location.
|
---|
36 | * (wasmPlugins.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The parent resource of the `WasmPlugin`
|
---|
39 | * resource. Must be in the format `projects/{project}/locations/global`.
|
---|
40 | * @param WasmPlugin $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string wasmPluginId Required. User-provided ID of the `WasmPlugin`
|
---|
44 | * resource to be created.
|
---|
45 | * @return Operation
|
---|
46 | * @throws \Google\Service\Exception
|
---|
47 | */
|
---|
48 | public function create($parent, WasmPlugin $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('create', [$params], Operation::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Deletes the specified `WasmPlugin` resource. (wasmPlugins.delete)
|
---|
56 | *
|
---|
57 | * @param string $name Required. A name of the `WasmPlugin` resource to delete.
|
---|
58 | * Must be in the format
|
---|
59 | * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
---|
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 the specified `WasmPlugin` resource. (wasmPlugins.get)
|
---|
72 | *
|
---|
73 | * @param string $name Required. A name of the `WasmPlugin` resource to get.
|
---|
74 | * Must be in the format
|
---|
75 | * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
---|
76 | * @param array $optParams Optional parameters.
|
---|
77 | *
|
---|
78 | * @opt_param string view Determines how much data must be returned in the
|
---|
79 | * response. See [AIP-157](https://google.aip.dev/157).
|
---|
80 | * @return WasmPlugin
|
---|
81 | * @throws \Google\Service\Exception
|
---|
82 | */
|
---|
83 | public function get($name, $optParams = [])
|
---|
84 | {
|
---|
85 | $params = ['name' => $name];
|
---|
86 | $params = array_merge($params, $optParams);
|
---|
87 | return $this->call('get', [$params], WasmPlugin::class);
|
---|
88 | }
|
---|
89 | /**
|
---|
90 | * Lists `WasmPlugin` resources in a given project and location.
|
---|
91 | * (wasmPlugins.listProjectsLocationsWasmPlugins)
|
---|
92 | *
|
---|
93 | * @param string $parent Required. The project and location from which the
|
---|
94 | * `WasmPlugin` resources are listed, specified in the following format:
|
---|
95 | * `projects/{project}/locations/global`.
|
---|
96 | * @param array $optParams Optional parameters.
|
---|
97 | *
|
---|
98 | * @opt_param int pageSize Maximum number of `WasmPlugin` resources to return
|
---|
99 | * per call. If not specified, at most 50 `WasmPlugin` resources are returned.
|
---|
100 | * The maximum value is 1000; values above 1000 are coerced to 1000.
|
---|
101 | * @opt_param string pageToken The value returned by the last
|
---|
102 | * `ListWasmPluginsResponse` call. Indicates that this is a continuation of a
|
---|
103 | * prior `ListWasmPlugins` call, and that the next page of data is to be
|
---|
104 | * returned.
|
---|
105 | * @return ListWasmPluginsResponse
|
---|
106 | * @throws \Google\Service\Exception
|
---|
107 | */
|
---|
108 | public function listProjectsLocationsWasmPlugins($parent, $optParams = [])
|
---|
109 | {
|
---|
110 | $params = ['parent' => $parent];
|
---|
111 | $params = array_merge($params, $optParams);
|
---|
112 | return $this->call('list', [$params], ListWasmPluginsResponse::class);
|
---|
113 | }
|
---|
114 | /**
|
---|
115 | * Updates the parameters of the specified `WasmPlugin` resource.
|
---|
116 | * (wasmPlugins.patch)
|
---|
117 | *
|
---|
118 | * @param string $name Identifier. Name of the `WasmPlugin` resource in the
|
---|
119 | * following format:
|
---|
120 | * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
|
---|
121 | * @param WasmPlugin $postBody
|
---|
122 | * @param array $optParams Optional parameters.
|
---|
123 | *
|
---|
124 | * @opt_param string updateMask Optional. Used to specify the fields to be
|
---|
125 | * overwritten in the `WasmPlugin` resource by the update. The fields specified
|
---|
126 | * in the `update_mask` field are relative to the resource, not the full
|
---|
127 | * request. An omitted `update_mask` field is treated as an implied
|
---|
128 | * `update_mask` field equivalent to all fields that are populated (that have a
|
---|
129 | * non-empty value). The `update_mask` field supports a special value `*`, which
|
---|
130 | * means that each field in the given `WasmPlugin` resource (including the empty
|
---|
131 | * ones) replaces the current value.
|
---|
132 | * @return Operation
|
---|
133 | * @throws \Google\Service\Exception
|
---|
134 | */
|
---|
135 | public function patch($name, WasmPlugin $postBody, $optParams = [])
|
---|
136 | {
|
---|
137 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
138 | $params = array_merge($params, $optParams);
|
---|
139 | return $this->call('patch', [$params], Operation::class);
|
---|
140 | }
|
---|
141 | }
|
---|
142 |
|
---|
143 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
144 | class_alias(ProjectsLocationsWasmPlugins::class, 'Google_Service_NetworkServices_Resource_ProjectsLocationsWasmPlugins');
|
---|