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\GKEHub\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\GKEHub\ListMembershipFeaturesResponse;
|
---|
21 | use Google\Service\GKEHub\MembershipFeature;
|
---|
22 | use Google\Service\GKEHub\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "features" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $gkehubService = new Google\Service\GKEHub(...);
|
---|
29 | * $features = $gkehubService->projects_locations_memberships_features;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsMembershipsFeatures extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates membershipFeature under a given parent. (features.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The name of parent where the
|
---|
38 | * MembershipFeature will be created. Specified in the format
|
---|
39 | * `projects/locations/memberships`.
|
---|
40 | * @param MembershipFeature $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string featureId Required. The ID of the membership_feature to
|
---|
44 | * create.
|
---|
45 | * @opt_param string requestId Idempotent request UUID.
|
---|
46 | * @return Operation
|
---|
47 | * @throws \Google\Service\Exception
|
---|
48 | */
|
---|
49 | public function create($parent, MembershipFeature $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 | * Removes a membershipFeature. (features.delete)
|
---|
57 | *
|
---|
58 | * @param string $name Required. The name of the membershipFeature to be
|
---|
59 | * deleted. Specified in the format `projects/locations/memberships/features`.
|
---|
60 | * @param array $optParams Optional parameters.
|
---|
61 | *
|
---|
62 | * @opt_param string requestId Idempotent request UUID.
|
---|
63 | * @return Operation
|
---|
64 | * @throws \Google\Service\Exception
|
---|
65 | */
|
---|
66 | public function delete($name, $optParams = [])
|
---|
67 | {
|
---|
68 | $params = ['name' => $name];
|
---|
69 | $params = array_merge($params, $optParams);
|
---|
70 | return $this->call('delete', [$params], Operation::class);
|
---|
71 | }
|
---|
72 | /**
|
---|
73 | * ========= MembershipFeature Services ========= Gets details of a
|
---|
74 | * membershipFeature. (features.get)
|
---|
75 | *
|
---|
76 | * @param string $name Required. The MembershipFeature resource name in the
|
---|
77 | * format `projects/locations/memberships/features`.
|
---|
78 | * @param array $optParams Optional parameters.
|
---|
79 | * @return MembershipFeature
|
---|
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], MembershipFeature::class);
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * Lists MembershipFeatures in a given project and location.
|
---|
90 | * (features.listProjectsLocationsMembershipsFeatures)
|
---|
91 | *
|
---|
92 | * @param string $parent Required. The parent where the MembershipFeature will
|
---|
93 | * be listed. In the format: `projects/locations/memberships`.
|
---|
94 | * @param array $optParams Optional parameters.
|
---|
95 | *
|
---|
96 | * @opt_param string filter Lists MembershipFeatures that match the filter
|
---|
97 | * expression, following the syntax outlined in https://google.aip.dev/160.
|
---|
98 | * Examples: - Feature with the name "helloworld" in project "foo-proj" and
|
---|
99 | * membership "member-bar": name = "projects/foo-
|
---|
100 | * proj/locations/global/memberships/member-bar/features/helloworld" - Features
|
---|
101 | * that have a label called `foo`: labels.foo:* - Features that have a label
|
---|
102 | * called `foo` whose value is `bar`: labels.foo = bar
|
---|
103 | * @opt_param string orderBy One or more fields to compare and use to sort the
|
---|
104 | * output. See https://google.aip.dev/132#ordering.
|
---|
105 | * @opt_param int pageSize When requesting a 'page' of resources, `page_size`
|
---|
106 | * specifies number of resources to return. If unspecified or set to 0, all
|
---|
107 | * resources will be returned.
|
---|
108 | * @opt_param string pageToken Token returned by previous call to `ListFeatures`
|
---|
109 | * which specifies the position in the list from where to continue listing the
|
---|
110 | * resources.
|
---|
111 | * @return ListMembershipFeaturesResponse
|
---|
112 | * @throws \Google\Service\Exception
|
---|
113 | */
|
---|
114 | public function listProjectsLocationsMembershipsFeatures($parent, $optParams = [])
|
---|
115 | {
|
---|
116 | $params = ['parent' => $parent];
|
---|
117 | $params = array_merge($params, $optParams);
|
---|
118 | return $this->call('list', [$params], ListMembershipFeaturesResponse::class);
|
---|
119 | }
|
---|
120 | /**
|
---|
121 | * Updates an existing MembershipFeature. (features.patch)
|
---|
122 | *
|
---|
123 | * @param string $name Output only. The resource name of the membershipFeature,
|
---|
124 | * in the format: `projects/{project}/locations/{location}/memberships/{membersh
|
---|
125 | * ip}/features/{feature}`. Note that `membershipFeatures` is shortened to
|
---|
126 | * `features` in the resource name. (see http://go/aip/122#collection-
|
---|
127 | * identifiers)
|
---|
128 | * @param MembershipFeature $postBody
|
---|
129 | * @param array $optParams Optional parameters.
|
---|
130 | *
|
---|
131 | * @opt_param bool allowMissing Optional. If set to true, and the
|
---|
132 | * MembershipFeature is not found, a new MembershipFeature will be created. In
|
---|
133 | * this situation, `update_mask` is ignored.
|
---|
134 | * @opt_param string requestId Idempotent request UUID.
|
---|
135 | * @opt_param string updateMask Required. Mask of fields to update.
|
---|
136 | * @return Operation
|
---|
137 | * @throws \Google\Service\Exception
|
---|
138 | */
|
---|
139 | public function patch($name, MembershipFeature $postBody, $optParams = [])
|
---|
140 | {
|
---|
141 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
142 | $params = array_merge($params, $optParams);
|
---|
143 | return $this->call('patch', [$params], Operation::class);
|
---|
144 | }
|
---|
145 | }
|
---|
146 |
|
---|
147 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
148 | class_alias(ProjectsLocationsMembershipsFeatures::class, 'Google_Service_GKEHub_Resource_ProjectsLocationsMembershipsFeatures');
|
---|