[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\CloudTalentSolution\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudTalentSolution\CompleteQueryResponse;
|
---|
| 21 | use Google\Service\CloudTalentSolution\JobsEmpty;
|
---|
| 22 | use Google\Service\CloudTalentSolution\ListTenantsResponse;
|
---|
| 23 | use Google\Service\CloudTalentSolution\Tenant;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "tenants" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $jobsService = new Google\Service\CloudTalentSolution(...);
|
---|
| 30 | * $tenants = $jobsService->projects_tenants;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsTenants extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Completes the specified prefix with keyword suggestions. Intended for use by
|
---|
| 37 | * a job search auto-complete search box. (tenants.completeQuery)
|
---|
| 38 | *
|
---|
| 39 | * @param string $tenant Required. Resource name of tenant the completion is
|
---|
| 40 | * performed within. The format is "projects/{project_id}/tenants/{tenant_id}",
|
---|
| 41 | * for example, "projects/foo/tenants/bar".
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | *
|
---|
| 44 | * @opt_param string company If provided, restricts completion to specified
|
---|
| 45 | * company. The format is
|
---|
| 46 | * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
|
---|
| 47 | * example, "projects/foo/tenants/bar/companies/baz".
|
---|
| 48 | * @opt_param string languageCodes The list of languages of the query. This is
|
---|
| 49 | * the BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
|
---|
| 50 | * see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The
|
---|
| 51 | * maximum number of allowed characters is 255.
|
---|
| 52 | * @opt_param int pageSize Required. Completion result count. The maximum
|
---|
| 53 | * allowed page size is 10.
|
---|
| 54 | * @opt_param string query Required. The query used to generate suggestions. The
|
---|
| 55 | * maximum number of allowed characters is 255.
|
---|
| 56 | * @opt_param string scope The scope of the completion. The defaults is
|
---|
| 57 | * CompletionScope.PUBLIC.
|
---|
| 58 | * @opt_param string type The completion topic. The default is
|
---|
| 59 | * CompletionType.COMBINED.
|
---|
| 60 | * @return CompleteQueryResponse
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function completeQuery($tenant, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['tenant' => $tenant];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('completeQuery', [$params], CompleteQueryResponse::class);
|
---|
| 68 | }
|
---|
| 69 | /**
|
---|
| 70 | * Creates a new tenant entity. (tenants.create)
|
---|
| 71 | *
|
---|
| 72 | * @param string $parent Required. Resource name of the project under which the
|
---|
| 73 | * tenant is created. The format is "projects/{project_id}", for example,
|
---|
| 74 | * "projects/foo".
|
---|
| 75 | * @param Tenant $postBody
|
---|
| 76 | * @param array $optParams Optional parameters.
|
---|
| 77 | * @return Tenant
|
---|
| 78 | * @throws \Google\Service\Exception
|
---|
| 79 | */
|
---|
| 80 | public function create($parent, Tenant $postBody, $optParams = [])
|
---|
| 81 | {
|
---|
| 82 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 83 | $params = array_merge($params, $optParams);
|
---|
| 84 | return $this->call('create', [$params], Tenant::class);
|
---|
| 85 | }
|
---|
| 86 | /**
|
---|
| 87 | * Deletes specified tenant. (tenants.delete)
|
---|
| 88 | *
|
---|
| 89 | * @param string $name Required. The resource name of the tenant to be deleted.
|
---|
| 90 | * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
|
---|
| 91 | * "projects/foo/tenants/bar".
|
---|
| 92 | * @param array $optParams Optional parameters.
|
---|
| 93 | * @return JobsEmpty
|
---|
| 94 | * @throws \Google\Service\Exception
|
---|
| 95 | */
|
---|
| 96 | public function delete($name, $optParams = [])
|
---|
| 97 | {
|
---|
| 98 | $params = ['name' => $name];
|
---|
| 99 | $params = array_merge($params, $optParams);
|
---|
| 100 | return $this->call('delete', [$params], JobsEmpty::class);
|
---|
| 101 | }
|
---|
| 102 | /**
|
---|
| 103 | * Retrieves specified tenant. (tenants.get)
|
---|
| 104 | *
|
---|
| 105 | * @param string $name Required. The resource name of the tenant to be
|
---|
| 106 | * retrieved. The format is "projects/{project_id}/tenants/{tenant_id}", for
|
---|
| 107 | * example, "projects/foo/tenants/bar".
|
---|
| 108 | * @param array $optParams Optional parameters.
|
---|
| 109 | * @return Tenant
|
---|
| 110 | * @throws \Google\Service\Exception
|
---|
| 111 | */
|
---|
| 112 | public function get($name, $optParams = [])
|
---|
| 113 | {
|
---|
| 114 | $params = ['name' => $name];
|
---|
| 115 | $params = array_merge($params, $optParams);
|
---|
| 116 | return $this->call('get', [$params], Tenant::class);
|
---|
| 117 | }
|
---|
| 118 | /**
|
---|
| 119 | * Lists all tenants associated with the project. (tenants.listProjectsTenants)
|
---|
| 120 | *
|
---|
| 121 | * @param string $parent Required. Resource name of the project under which the
|
---|
| 122 | * tenant is created. The format is "projects/{project_id}", for example,
|
---|
| 123 | * "projects/foo".
|
---|
| 124 | * @param array $optParams Optional parameters.
|
---|
| 125 | *
|
---|
| 126 | * @opt_param int pageSize The maximum number of tenants to be returned, at most
|
---|
| 127 | * 100. Default is 100 if a non-positive number is provided.
|
---|
| 128 | * @opt_param string pageToken The starting indicator from which to return
|
---|
| 129 | * results.
|
---|
| 130 | * @return ListTenantsResponse
|
---|
| 131 | * @throws \Google\Service\Exception
|
---|
| 132 | */
|
---|
| 133 | public function listProjectsTenants($parent, $optParams = [])
|
---|
| 134 | {
|
---|
| 135 | $params = ['parent' => $parent];
|
---|
| 136 | $params = array_merge($params, $optParams);
|
---|
| 137 | return $this->call('list', [$params], ListTenantsResponse::class);
|
---|
| 138 | }
|
---|
| 139 | /**
|
---|
| 140 | * Updates specified tenant. (tenants.patch)
|
---|
| 141 | *
|
---|
| 142 | * @param string $name Required during tenant update. The resource name for a
|
---|
| 143 | * tenant. This is generated by the service when a tenant is created. The format
|
---|
| 144 | * is "projects/{project_id}/tenants/{tenant_id}", for example,
|
---|
| 145 | * "projects/foo/tenants/bar".
|
---|
| 146 | * @param Tenant $postBody
|
---|
| 147 | * @param array $optParams Optional parameters.
|
---|
| 148 | *
|
---|
| 149 | * @opt_param string updateMask Strongly recommended for the best service
|
---|
| 150 | * experience. If update_mask is provided, only the specified fields in tenant
|
---|
| 151 | * are updated. Otherwise all the fields are updated. A field mask to specify
|
---|
| 152 | * the tenant fields to be updated. Only top level fields of Tenant are
|
---|
| 153 | * supported.
|
---|
| 154 | * @return Tenant
|
---|
| 155 | * @throws \Google\Service\Exception
|
---|
| 156 | */
|
---|
| 157 | public function patch($name, Tenant $postBody, $optParams = [])
|
---|
| 158 | {
|
---|
| 159 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 160 | $params = array_merge($params, $optParams);
|
---|
| 161 | return $this->call('patch', [$params], Tenant::class);
|
---|
| 162 | }
|
---|
| 163 | }
|
---|
| 164 |
|
---|
| 165 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 166 | class_alias(ProjectsTenants::class, 'Google_Service_CloudTalentSolution_Resource_ProjectsTenants');
|
---|