[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\GKEHub\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\GKEHub\ListMembershipBindingsResponse;
|
---|
| 21 | use Google\Service\GKEHub\MembershipBinding;
|
---|
| 22 | use Google\Service\GKEHub\Operation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "bindings" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $gkehubService = new Google\Service\GKEHub(...);
|
---|
| 29 | * $bindings = $gkehubService->projects_locations_memberships_bindings;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsMembershipsBindings extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a MembershipBinding. (bindings.create)
|
---|
| 36 | *
|
---|
| 37 | * @param string $parent Required. The parent (project and location) where the
|
---|
| 38 | * MembershipBinding will be created. Specified in the format
|
---|
| 39 | * `projects/locations/memberships`.
|
---|
| 40 | * @param MembershipBinding $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | *
|
---|
| 43 | * @opt_param string membershipBindingId Required. The ID to use for the
|
---|
| 44 | * MembershipBinding.
|
---|
| 45 | * @return Operation
|
---|
| 46 | * @throws \Google\Service\Exception
|
---|
| 47 | */
|
---|
| 48 | public function create($parent, MembershipBinding $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 a MembershipBinding. (bindings.delete)
|
---|
| 56 | *
|
---|
| 57 | * @param string $name Required. The MembershipBinding resource name in the
|
---|
| 58 | * format `projects/locations/memberships/bindings`.
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | * @return Operation
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function delete($name, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['name' => $name];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('delete', [$params], Operation::class);
|
---|
| 68 | }
|
---|
| 69 | /**
|
---|
| 70 | * Returns the details of a MembershipBinding. (bindings.get)
|
---|
| 71 | *
|
---|
| 72 | * @param string $name Required. The MembershipBinding resource name in the
|
---|
| 73 | * format `projects/locations/memberships/bindings`.
|
---|
| 74 | * @param array $optParams Optional parameters.
|
---|
| 75 | * @return MembershipBinding
|
---|
| 76 | * @throws \Google\Service\Exception
|
---|
| 77 | */
|
---|
| 78 | public function get($name, $optParams = [])
|
---|
| 79 | {
|
---|
| 80 | $params = ['name' => $name];
|
---|
| 81 | $params = array_merge($params, $optParams);
|
---|
| 82 | return $this->call('get', [$params], MembershipBinding::class);
|
---|
| 83 | }
|
---|
| 84 | /**
|
---|
| 85 | * Lists MembershipBindings. (bindings.listProjectsLocationsMembershipsBindings)
|
---|
| 86 | *
|
---|
| 87 | * @param string $parent Required. The parent Membership for which the
|
---|
| 88 | * MembershipBindings will be listed. Specified in the format
|
---|
| 89 | * `projects/locations/memberships`.
|
---|
| 90 | * @param array $optParams Optional parameters.
|
---|
| 91 | *
|
---|
| 92 | * @opt_param string filter Optional. Lists MembershipBindings that match the
|
---|
| 93 | * filter expression, following the syntax outlined in
|
---|
| 94 | * https://google.aip.dev/160.
|
---|
| 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 | * `ListMembershipBindings` which specifies the position in the list from where
|
---|
| 100 | * to continue listing the resources.
|
---|
| 101 | * @return ListMembershipBindingsResponse
|
---|
| 102 | * @throws \Google\Service\Exception
|
---|
| 103 | */
|
---|
| 104 | public function listProjectsLocationsMembershipsBindings($parent, $optParams = [])
|
---|
| 105 | {
|
---|
| 106 | $params = ['parent' => $parent];
|
---|
| 107 | $params = array_merge($params, $optParams);
|
---|
| 108 | return $this->call('list', [$params], ListMembershipBindingsResponse::class);
|
---|
| 109 | }
|
---|
| 110 | /**
|
---|
| 111 | * Updates a MembershipBinding. (bindings.patch)
|
---|
| 112 | *
|
---|
| 113 | * @param string $name The resource name for the membershipbinding itself `proje
|
---|
| 114 | * cts/{project}/locations/{location}/memberships/{membership}/bindings/{members
|
---|
| 115 | * hipbinding}`
|
---|
| 116 | * @param MembershipBinding $postBody
|
---|
| 117 | * @param array $optParams Optional parameters.
|
---|
| 118 | *
|
---|
| 119 | * @opt_param string updateMask Required. The fields to be updated.
|
---|
| 120 | * @return Operation
|
---|
| 121 | * @throws \Google\Service\Exception
|
---|
| 122 | */
|
---|
| 123 | public function patch($name, MembershipBinding $postBody, $optParams = [])
|
---|
| 124 | {
|
---|
| 125 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 126 | $params = array_merge($params, $optParams);
|
---|
| 127 | return $this->call('patch', [$params], Operation::class);
|
---|
| 128 | }
|
---|
| 129 | }
|
---|
| 130 |
|
---|
| 131 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 132 | class_alias(ProjectsLocationsMembershipsBindings::class, 'Google_Service_GKEHub_Resource_ProjectsLocationsMembershipsBindings');
|
---|