[e3d4e0a] | 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\ListWasmPluginVersionsResponse;
|
---|
| 21 | use Google\Service\NetworkServices\Operation;
|
---|
| 22 | use Google\Service\NetworkServices\WasmPluginVersion;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "versions" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $networkservicesService = new Google\Service\NetworkServices(...);
|
---|
| 29 | * $versions = $networkservicesService->projects_locations_wasmPlugins_versions;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsWasmPluginsVersions extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new `WasmPluginVersion` resource in a given project and location.
|
---|
| 36 | * (versions.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The parent resource of the
|
---|
| 39 | * `WasmPluginVersion` resource. Must be in the format
|
---|
| 40 | * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
---|
| 41 | * @param WasmPluginVersion $postBody
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | *
|
---|
| 44 | * @opt_param string wasmPluginVersionId Required. User-provided ID of the
|
---|
| 45 | * `WasmPluginVersion` resource to be created.
|
---|
| 46 | * @return Operation
|
---|
| 47 | * @throws \Google\Service\Exception
|
---|
| 48 | */
|
---|
| 49 | public function create($parent, WasmPluginVersion $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 the specified `WasmPluginVersion` resource. (versions.delete)
|
---|
| 57 | *
|
---|
| 58 | * @param string $name Required. A name of the `WasmPluginVersion` resource to
|
---|
| 59 | * delete. Must be in the format `projects/{project}/locations/global/wasmPlugin
|
---|
| 60 | * s/{wasm_plugin}/versions/{wasm_plugin_version}`.
|
---|
| 61 | * @param array $optParams Optional parameters.
|
---|
| 62 | * @return Operation
|
---|
| 63 | * @throws \Google\Service\Exception
|
---|
| 64 | */
|
---|
| 65 | public function delete($name, $optParams = [])
|
---|
| 66 | {
|
---|
| 67 | $params = ['name' => $name];
|
---|
| 68 | $params = array_merge($params, $optParams);
|
---|
| 69 | return $this->call('delete', [$params], Operation::class);
|
---|
| 70 | }
|
---|
| 71 | /**
|
---|
| 72 | * Gets details of the specified `WasmPluginVersion` resource. (versions.get)
|
---|
| 73 | *
|
---|
| 74 | * @param string $name Required. A name of the `WasmPluginVersion` resource to
|
---|
| 75 | * get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{
|
---|
| 76 | * wasm_plugin}/versions/{wasm_plugin_version}`.
|
---|
| 77 | * @param array $optParams Optional parameters.
|
---|
| 78 | * @return WasmPluginVersion
|
---|
| 79 | * @throws \Google\Service\Exception
|
---|
| 80 | */
|
---|
| 81 | public function get($name, $optParams = [])
|
---|
| 82 | {
|
---|
| 83 | $params = ['name' => $name];
|
---|
| 84 | $params = array_merge($params, $optParams);
|
---|
| 85 | return $this->call('get', [$params], WasmPluginVersion::class);
|
---|
| 86 | }
|
---|
| 87 | /**
|
---|
| 88 | * Lists `WasmPluginVersion` resources in a given project and location.
|
---|
| 89 | * (versions.listProjectsLocationsWasmPluginsVersions)
|
---|
| 90 | *
|
---|
| 91 | * @param string $parent Required. The `WasmPlugin` resource whose
|
---|
| 92 | * `WasmPluginVersion`s are listed, specified in the following format:
|
---|
| 93 | * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
---|
| 94 | * @param array $optParams Optional parameters.
|
---|
| 95 | *
|
---|
| 96 | * @opt_param int pageSize Maximum number of `WasmPluginVersion` resources to
|
---|
| 97 | * return per call. If not specified, at most 50 `WasmPluginVersion` resources
|
---|
| 98 | * are returned. The maximum value is 1000; values above 1000 are coerced to
|
---|
| 99 | * 1000.
|
---|
| 100 | * @opt_param string pageToken The value returned by the last
|
---|
| 101 | * `ListWasmPluginVersionsResponse` call. Indicates that this is a continuation
|
---|
| 102 | * of a prior `ListWasmPluginVersions` call, and that the next page of data is
|
---|
| 103 | * to be returned.
|
---|
| 104 | * @return ListWasmPluginVersionsResponse
|
---|
| 105 | * @throws \Google\Service\Exception
|
---|
| 106 | */
|
---|
| 107 | public function listProjectsLocationsWasmPluginsVersions($parent, $optParams = [])
|
---|
| 108 | {
|
---|
| 109 | $params = ['parent' => $parent];
|
---|
| 110 | $params = array_merge($params, $optParams);
|
---|
| 111 | return $this->call('list', [$params], ListWasmPluginVersionsResponse::class);
|
---|
| 112 | }
|
---|
| 113 | }
|
---|
| 114 |
|
---|
| 115 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 116 | class_alias(ProjectsLocationsWasmPluginsVersions::class, 'Google_Service_NetworkServices_Resource_ProjectsLocationsWasmPluginsVersions');
|
---|