source: vendor/google/apiclient-services/src/CloudOSLogin/Resource/UsersSshPublicKeys.php

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

Upload project files

  • Property mode set to 100644
File size: 3.8 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\OsloginEmpty;
21use Google\Service\CloudOSLogin\SshPublicKey;
22
23/**
24 * The "sshPublicKeys" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $osloginService = new Google\Service\CloudOSLogin(...);
28 * $sshPublicKeys = $osloginService->users_sshPublicKeys;
29 * </code>
30 */
31class UsersSshPublicKeys extends \Google\Service\Resource
32{
33 /**
34 * Create an SSH public key (sshPublicKeys.create)
35 *
36 * @param string $parent Required. The unique ID for the user in format
37 * `users/{user}`.
38 * @param SshPublicKey $postBody
39 * @param array $optParams Optional parameters.
40 * @return SshPublicKey
41 * @throws \Google\Service\Exception
42 */
43 public function create($parent, SshPublicKey $postBody, $optParams = [])
44 {
45 $params = ['parent' => $parent, 'postBody' => $postBody];
46 $params = array_merge($params, $optParams);
47 return $this->call('create', [$params], SshPublicKey::class);
48 }
49 /**
50 * Deletes an SSH public key. (sshPublicKeys.delete)
51 *
52 * @param string $name Required. The fingerprint of the public key to update.
53 * Public keys are identified by their SHA-256 fingerprint. The fingerprint of
54 * the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.
55 * @param array $optParams Optional parameters.
56 * @return OsloginEmpty
57 * @throws \Google\Service\Exception
58 */
59 public function delete($name, $optParams = [])
60 {
61 $params = ['name' => $name];
62 $params = array_merge($params, $optParams);
63 return $this->call('delete', [$params], OsloginEmpty::class);
64 }
65 /**
66 * Retrieves an SSH public key. (sshPublicKeys.get)
67 *
68 * @param string $name Required. The fingerprint of the public key to retrieve.
69 * Public keys are identified by their SHA-256 fingerprint. The fingerprint of
70 * the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.
71 * @param array $optParams Optional parameters.
72 * @return SshPublicKey
73 * @throws \Google\Service\Exception
74 */
75 public function get($name, $optParams = [])
76 {
77 $params = ['name' => $name];
78 $params = array_merge($params, $optParams);
79 return $this->call('get', [$params], SshPublicKey::class);
80 }
81 /**
82 * Updates an SSH public key and returns the profile information. This method
83 * supports patch semantics. (sshPublicKeys.patch)
84 *
85 * @param string $name Required. The fingerprint of the public key to update.
86 * Public keys are identified by their SHA-256 fingerprint. The fingerprint of
87 * the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.
88 * @param SshPublicKey $postBody
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param string updateMask Mask to control which fields get updated.
92 * Updates all if not present.
93 * @return SshPublicKey
94 * @throws \Google\Service\Exception
95 */
96 public function patch($name, SshPublicKey $postBody, $optParams = [])
97 {
98 $params = ['name' => $name, 'postBody' => $postBody];
99 $params = array_merge($params, $optParams);
100 return $this->call('patch', [$params], SshPublicKey::class);
101 }
102}
103
104// Adding a class alias for backwards compatibility with the previous class name.
105class_alias(UsersSshPublicKeys::class, 'Google_Service_CloudOSLogin_Resource_UsersSshPublicKeys');
Note: See TracBrowser for help on using the repository browser.