source: vendor/google/apiclient-services/src/GKEHub/Resource/ProjectsLocationsScopesNamespaces.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 3 weeks ago

Upload project files

  • Property mode set to 100644
File size: 5.0 KB
Line 
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
18namespace Google\Service\GKEHub\Resource;
19
20use Google\Service\GKEHub\GkehubNamespace;
21use Google\Service\GKEHub\ListScopeNamespacesResponse;
22use Google\Service\GKEHub\Operation;
23
24/**
25 * The "namespaces" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $gkehubService = new Google\Service\GKEHub(...);
29 * $namespaces = $gkehubService->projects_locations_scopes_namespaces;
30 * </code>
31 */
32class ProjectsLocationsScopesNamespaces extends \Google\Service\Resource
33{
34 /**
35 * Creates a fleet namespace. (namespaces.create)
36 *
37 * @param string $parent Required. The parent (project and location) where the
38 * Namespace will be created. Specified in the format
39 * `projects/locations/scopes`.
40 * @param GkehubNamespace $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string scopeNamespaceId Required. Client chosen ID for the
44 * Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label: 1. At
45 * most 63 characters in length 2. It must consist of lower case alphanumeric
46 * characters or `-` 3. It must start and end with an alphanumeric character
47 * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a
48 * maximum length of 63 characters.
49 * @return Operation
50 * @throws \Google\Service\Exception
51 */
52 public function create($parent, GkehubNamespace $postBody, $optParams = [])
53 {
54 $params = ['parent' => $parent, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('create', [$params], Operation::class);
57 }
58 /**
59 * Deletes a fleet namespace. (namespaces.delete)
60 *
61 * @param string $name Required. The Namespace resource name in the format
62 * `projects/locations/scopes/namespaces`.
63 * @param array $optParams Optional parameters.
64 * @return Operation
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], Operation::class);
72 }
73 /**
74 * Returns the details of a fleet namespace. (namespaces.get)
75 *
76 * @param string $name Required. The Namespace resource name in the format
77 * `projects/locations/scopes/namespaces`.
78 * @param array $optParams Optional parameters.
79 * @return GkehubNamespace
80 * @throws \Google\Service\Exception
81 */
82 public function get($name, $optParams = [])
83 {
84 $params = ['name' => $name];
85 $params = array_merge($params, $optParams);
86 return $this->call('get', [$params], GkehubNamespace::class);
87 }
88 /**
89 * Lists fleet namespaces. (namespaces.listProjectsLocationsScopesNamespaces)
90 *
91 * @param string $parent Required. The parent (project and location) where the
92 * Features will be listed. Specified in the format `projects/locations/scopes`.
93 * @param array $optParams Optional parameters.
94 *
95 * @opt_param int pageSize Optional. When requesting a 'page' of resources,
96 * `page_size` specifies number of resources to return. If unspecified or set to
97 * 0, all resources will be returned.
98 * @opt_param string pageToken Optional. Token returned by previous call to
99 * `ListFeatures` which specifies the position in the list from where to
100 * continue listing the resources.
101 * @return ListScopeNamespacesResponse
102 * @throws \Google\Service\Exception
103 */
104 public function listProjectsLocationsScopesNamespaces($parent, $optParams = [])
105 {
106 $params = ['parent' => $parent];
107 $params = array_merge($params, $optParams);
108 return $this->call('list', [$params], ListScopeNamespacesResponse::class);
109 }
110 /**
111 * Updates a fleet namespace. (namespaces.patch)
112 *
113 * @param string $name The resource name for the namespace
114 * `projects/{project}/locations/{location}/namespaces/{namespace}`
115 * @param GkehubNamespace $postBody
116 * @param array $optParams Optional parameters.
117 *
118 * @opt_param string updateMask Required. The fields to be updated.
119 * @return Operation
120 * @throws \Google\Service\Exception
121 */
122 public function patch($name, GkehubNamespace $postBody, $optParams = [])
123 {
124 $params = ['name' => $name, 'postBody' => $postBody];
125 $params = array_merge($params, $optParams);
126 return $this->call('patch', [$params], Operation::class);
127 }
128}
129
130// Adding a class alias for backwards compatibility with the previous class name.
131class_alias(ProjectsLocationsScopesNamespaces::class, 'Google_Service_GKEHub_Resource_ProjectsLocationsScopesNamespaces');
Note: See TracBrowser for help on using the repository browser.