source: vendor/google/apiclient-services/src/CloudOSLogin/Resource/Users.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload new project files

  • Property mode set to 100644
File size: 3.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\CloudOSLogin\Resource;
19
20use Google\Service\CloudOSLogin\ImportSshPublicKeyResponse;
21use Google\Service\CloudOSLogin\LoginProfile;
22use Google\Service\CloudOSLogin\SshPublicKey;
23
24/**
25 * The "users" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $osloginService = new Google\Service\CloudOSLogin(...);
29 * $users = $osloginService->users;
30 * </code>
31 */
32class Users extends \Google\Service\Resource
33{
34 /**
35 * Retrieves the profile information used for logging in to a virtual machine on
36 * Google Compute Engine. (users.getLoginProfile)
37 *
38 * @param string $name Required. The unique ID for the user in format
39 * `users/{user}`.
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string projectId The project ID of the Google Cloud Platform
43 * project.
44 * @opt_param string systemId A system ID for filtering the results of the
45 * request.
46 * @return LoginProfile
47 * @throws \Google\Service\Exception
48 */
49 public function getLoginProfile($name, $optParams = [])
50 {
51 $params = ['name' => $name];
52 $params = array_merge($params, $optParams);
53 return $this->call('getLoginProfile', [$params], LoginProfile::class);
54 }
55 /**
56 * Adds an SSH public key and returns the profile information. Default POSIX
57 * account information is set when no username and UID exist as part of the
58 * login profile. (users.importSshPublicKey)
59 *
60 * @param string $parent Required. The unique ID for the user in format
61 * `users/{user}`.
62 * @param SshPublicKey $postBody
63 * @param array $optParams Optional parameters.
64 *
65 * @opt_param string projectId The project ID of the Google Cloud Platform
66 * project.
67 * @opt_param string regions Optional. The regions to which to assert that the
68 * key was written. If unspecified, defaults to all regions. Regions are listed
69 * at https://cloud.google.com/about/locations#region.
70 * @return ImportSshPublicKeyResponse
71 * @throws \Google\Service\Exception
72 */
73 public function importSshPublicKey($parent, SshPublicKey $postBody, $optParams = [])
74 {
75 $params = ['parent' => $parent, 'postBody' => $postBody];
76 $params = array_merge($params, $optParams);
77 return $this->call('importSshPublicKey', [$params], ImportSshPublicKeyResponse::class);
78 }
79}
80
81// Adding a class alias for backwards compatibility with the previous class name.
82class_alias(Users::class, 'Google_Service_CloudOSLogin_Resource_Users');
Note: See TracBrowser for help on using the repository browser.