You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1272 lines
41 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package oslogin provides access to the Cloud OS Login API.
  6. //
  7. // This package is DEPRECATED. Use package cloud.google.com/go/oslogin/apiv1 instead.
  8. //
  9. // For product documentation, see: https://cloud.google.com/compute/docs/oslogin/
  10. //
  11. // Creating a client
  12. //
  13. // Usage example:
  14. //
  15. // import "google.golang.org/api/oslogin/v1beta"
  16. // ...
  17. // ctx := context.Background()
  18. // osloginService, err := oslogin.NewService(ctx)
  19. //
  20. // In this example, Google Application Default Credentials are used for authentication.
  21. //
  22. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  23. //
  24. // Other authentication options
  25. //
  26. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  27. //
  28. // osloginService, err := oslogin.NewService(ctx, option.WithScopes(oslogin.ComputeReadonlyScope))
  29. //
  30. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  31. //
  32. // osloginService, err := oslogin.NewService(ctx, option.WithAPIKey("AIza..."))
  33. //
  34. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  35. //
  36. // config := &oauth2.Config{...}
  37. // // ...
  38. // token, err := config.Exchange(ctx, ...)
  39. // osloginService, err := oslogin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  40. //
  41. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  42. package oslogin // import "google.golang.org/api/oslogin/v1beta"
  43. import (
  44. "bytes"
  45. "context"
  46. "encoding/json"
  47. "errors"
  48. "fmt"
  49. "io"
  50. "net/http"
  51. "net/url"
  52. "strconv"
  53. "strings"
  54. gensupport "google.golang.org/api/gensupport"
  55. googleapi "google.golang.org/api/googleapi"
  56. option "google.golang.org/api/option"
  57. htransport "google.golang.org/api/transport/http"
  58. )
  59. // Always reference these packages, just in case the auto-generated code
  60. // below doesn't.
  61. var _ = bytes.NewBuffer
  62. var _ = strconv.Itoa
  63. var _ = fmt.Sprintf
  64. var _ = json.NewDecoder
  65. var _ = io.Copy
  66. var _ = url.Parse
  67. var _ = gensupport.MarshalJSON
  68. var _ = googleapi.Version
  69. var _ = errors.New
  70. var _ = strings.Replace
  71. var _ = context.Canceled
  72. const apiId = "oslogin:v1beta"
  73. const apiName = "oslogin"
  74. const apiVersion = "v1beta"
  75. const basePath = "https://oslogin.googleapis.com/"
  76. // OAuth2 scopes used by this API.
  77. const (
  78. // View and manage your data across Google Cloud Platform services
  79. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  80. // View your data across Google Cloud Platform services
  81. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  82. // View and manage your Google Compute Engine resources
  83. ComputeScope = "https://www.googleapis.com/auth/compute"
  84. // View your Google Compute Engine resources
  85. ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"
  86. )
  87. // NewService creates a new Service.
  88. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  89. scopesOption := option.WithScopes(
  90. "https://www.googleapis.com/auth/cloud-platform",
  91. "https://www.googleapis.com/auth/cloud-platform.read-only",
  92. "https://www.googleapis.com/auth/compute",
  93. "https://www.googleapis.com/auth/compute.readonly",
  94. )
  95. // NOTE: prepend, so we don't override user-specified scopes.
  96. opts = append([]option.ClientOption{scopesOption}, opts...)
  97. client, endpoint, err := htransport.NewClient(ctx, opts...)
  98. if err != nil {
  99. return nil, err
  100. }
  101. s, err := New(client)
  102. if err != nil {
  103. return nil, err
  104. }
  105. if endpoint != "" {
  106. s.BasePath = endpoint
  107. }
  108. return s, nil
  109. }
  110. // New creates a new Service. It uses the provided http.Client for requests.
  111. //
  112. // Deprecated: please use NewService instead.
  113. // To provide a custom HTTP client, use option.WithHTTPClient.
  114. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  115. func New(client *http.Client) (*Service, error) {
  116. if client == nil {
  117. return nil, errors.New("client is nil")
  118. }
  119. s := &Service{client: client, BasePath: basePath}
  120. s.Users = NewUsersService(s)
  121. return s, nil
  122. }
  123. type Service struct {
  124. client *http.Client
  125. BasePath string // API endpoint base URL
  126. UserAgent string // optional additional User-Agent fragment
  127. Users *UsersService
  128. }
  129. func (s *Service) userAgent() string {
  130. if s.UserAgent == "" {
  131. return googleapi.UserAgent
  132. }
  133. return googleapi.UserAgent + " " + s.UserAgent
  134. }
  135. func NewUsersService(s *Service) *UsersService {
  136. rs := &UsersService{s: s}
  137. rs.Projects = NewUsersProjectsService(s)
  138. rs.SshPublicKeys = NewUsersSshPublicKeysService(s)
  139. return rs
  140. }
  141. type UsersService struct {
  142. s *Service
  143. Projects *UsersProjectsService
  144. SshPublicKeys *UsersSshPublicKeysService
  145. }
  146. func NewUsersProjectsService(s *Service) *UsersProjectsService {
  147. rs := &UsersProjectsService{s: s}
  148. return rs
  149. }
  150. type UsersProjectsService struct {
  151. s *Service
  152. }
  153. func NewUsersSshPublicKeysService(s *Service) *UsersSshPublicKeysService {
  154. rs := &UsersSshPublicKeysService{s: s}
  155. return rs
  156. }
  157. type UsersSshPublicKeysService struct {
  158. s *Service
  159. }
  160. // Empty: A generic empty message that you can re-use to avoid defining
  161. // duplicated
  162. // empty messages in your APIs. A typical example is to use it as the
  163. // request
  164. // or the response type of an API method. For instance:
  165. //
  166. // service Foo {
  167. // rpc Bar(google.protobuf.Empty) returns
  168. // (google.protobuf.Empty);
  169. // }
  170. //
  171. // The JSON representation for `Empty` is empty JSON object `{}`.
  172. type Empty struct {
  173. // ServerResponse contains the HTTP response code and headers from the
  174. // server.
  175. googleapi.ServerResponse `json:"-"`
  176. }
  177. // ImportSshPublicKeyResponse: A response message for importing an SSH
  178. // public key.
  179. type ImportSshPublicKeyResponse struct {
  180. // LoginProfile: The login profile information for the user.
  181. LoginProfile *LoginProfile `json:"loginProfile,omitempty"`
  182. // ServerResponse contains the HTTP response code and headers from the
  183. // server.
  184. googleapi.ServerResponse `json:"-"`
  185. // ForceSendFields is a list of field names (e.g. "LoginProfile") to
  186. // unconditionally include in API requests. By default, fields with
  187. // empty values are omitted from API requests. However, any non-pointer,
  188. // non-interface field appearing in ForceSendFields will be sent to the
  189. // server regardless of whether the field is empty or not. This may be
  190. // used to include empty fields in Patch requests.
  191. ForceSendFields []string `json:"-"`
  192. // NullFields is a list of field names (e.g. "LoginProfile") to include
  193. // in API requests with the JSON null value. By default, fields with
  194. // empty values are omitted from API requests. However, any field with
  195. // an empty value appearing in NullFields will be sent to the server as
  196. // null. It is an error if a field in this list has a non-empty value.
  197. // This may be used to include null fields in Patch requests.
  198. NullFields []string `json:"-"`
  199. }
  200. func (s *ImportSshPublicKeyResponse) MarshalJSON() ([]byte, error) {
  201. type NoMethod ImportSshPublicKeyResponse
  202. raw := NoMethod(*s)
  203. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  204. }
  205. // LoginProfile: The user profile information used for logging in to a
  206. // virtual machine on
  207. // Google Compute Engine.
  208. type LoginProfile struct {
  209. // Name: A unique user ID.
  210. Name string `json:"name,omitempty"`
  211. // PosixAccounts: The list of POSIX accounts associated with the user.
  212. PosixAccounts []*PosixAccount `json:"posixAccounts,omitempty"`
  213. // SshPublicKeys: A map from SSH public key fingerprint to the
  214. // associated key object.
  215. SshPublicKeys map[string]SshPublicKey `json:"sshPublicKeys,omitempty"`
  216. // ServerResponse contains the HTTP response code and headers from the
  217. // server.
  218. googleapi.ServerResponse `json:"-"`
  219. // ForceSendFields is a list of field names (e.g. "Name") to
  220. // unconditionally include in API requests. By default, fields with
  221. // empty values are omitted from API requests. However, any non-pointer,
  222. // non-interface field appearing in ForceSendFields will be sent to the
  223. // server regardless of whether the field is empty or not. This may be
  224. // used to include empty fields in Patch requests.
  225. ForceSendFields []string `json:"-"`
  226. // NullFields is a list of field names (e.g. "Name") to include in API
  227. // requests with the JSON null value. By default, fields with empty
  228. // values are omitted from API requests. However, any field with an
  229. // empty value appearing in NullFields will be sent to the server as
  230. // null. It is an error if a field in this list has a non-empty value.
  231. // This may be used to include null fields in Patch requests.
  232. NullFields []string `json:"-"`
  233. }
  234. func (s *LoginProfile) MarshalJSON() ([]byte, error) {
  235. type NoMethod LoginProfile
  236. raw := NoMethod(*s)
  237. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  238. }
  239. // PosixAccount: The POSIX account information associated with a Google
  240. // account.
  241. type PosixAccount struct {
  242. // AccountId: Output only. A POSIX account identifier.
  243. AccountId string `json:"accountId,omitempty"`
  244. // Gecos: The GECOS (user information) entry for this account.
  245. Gecos string `json:"gecos,omitempty"`
  246. // Gid: The default group ID.
  247. Gid int64 `json:"gid,omitempty,string"`
  248. // HomeDirectory: The path to the home directory for this account.
  249. HomeDirectory string `json:"homeDirectory,omitempty"`
  250. // OperatingSystemType: The operating system type where this account
  251. // applies.
  252. //
  253. // Possible values:
  254. // "OPERATING_SYSTEM_TYPE_UNSPECIFIED" - The operating system type
  255. // associated with the user account information is
  256. // unspecified.
  257. // "LINUX" - Linux user account information.
  258. // "WINDOWS" - Windows user account information.
  259. OperatingSystemType string `json:"operatingSystemType,omitempty"`
  260. // Primary: Only one POSIX account can be marked as primary.
  261. Primary bool `json:"primary,omitempty"`
  262. // Shell: The path to the logic shell for this account.
  263. Shell string `json:"shell,omitempty"`
  264. // SystemId: System identifier for which account the username or uid
  265. // applies to.
  266. // By default, the empty value is used.
  267. SystemId string `json:"systemId,omitempty"`
  268. // Uid: The user ID.
  269. Uid int64 `json:"uid,omitempty,string"`
  270. // Username: The username of the POSIX account.
  271. Username string `json:"username,omitempty"`
  272. // ForceSendFields is a list of field names (e.g. "AccountId") to
  273. // unconditionally include in API requests. By default, fields with
  274. // empty values are omitted from API requests. However, any non-pointer,
  275. // non-interface field appearing in ForceSendFields will be sent to the
  276. // server regardless of whether the field is empty or not. This may be
  277. // used to include empty fields in Patch requests.
  278. ForceSendFields []string `json:"-"`
  279. // NullFields is a list of field names (e.g. "AccountId") to include in
  280. // API requests with the JSON null value. By default, fields with empty
  281. // values are omitted from API requests. However, any field with an
  282. // empty value appearing in NullFields will be sent to the server as
  283. // null. It is an error if a field in this list has a non-empty value.
  284. // This may be used to include null fields in Patch requests.
  285. NullFields []string `json:"-"`
  286. }
  287. func (s *PosixAccount) MarshalJSON() ([]byte, error) {
  288. type NoMethod PosixAccount
  289. raw := NoMethod(*s)
  290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  291. }
  292. // SshPublicKey: The SSH public key information associated with a Google
  293. // account.
  294. type SshPublicKey struct {
  295. // ExpirationTimeUsec: An expiration time in microseconds since epoch.
  296. ExpirationTimeUsec int64 `json:"expirationTimeUsec,omitempty,string"`
  297. // Fingerprint: Output only. The SHA-256 fingerprint of the SSH public
  298. // key.
  299. Fingerprint string `json:"fingerprint,omitempty"`
  300. // Key: Public key text in SSH format, defined by
  301. // <a href="https://www.ietf.org/rfc/rfc4253.txt"
  302. // target="_blank">RFC4253</a>
  303. // section 6.6.
  304. Key string `json:"key,omitempty"`
  305. // ServerResponse contains the HTTP response code and headers from the
  306. // server.
  307. googleapi.ServerResponse `json:"-"`
  308. // ForceSendFields is a list of field names (e.g. "ExpirationTimeUsec")
  309. // to unconditionally include in API requests. By default, fields with
  310. // empty values are omitted from API requests. However, any non-pointer,
  311. // non-interface field appearing in ForceSendFields will be sent to the
  312. // server regardless of whether the field is empty or not. This may be
  313. // used to include empty fields in Patch requests.
  314. ForceSendFields []string `json:"-"`
  315. // NullFields is a list of field names (e.g. "ExpirationTimeUsec") to
  316. // include in API requests with the JSON null value. By default, fields
  317. // with empty values are omitted from API requests. However, any field
  318. // with an empty value appearing in NullFields will be sent to the
  319. // server as null. It is an error if a field in this list has a
  320. // non-empty value. This may be used to include null fields in Patch
  321. // requests.
  322. NullFields []string `json:"-"`
  323. }
  324. func (s *SshPublicKey) MarshalJSON() ([]byte, error) {
  325. type NoMethod SshPublicKey
  326. raw := NoMethod(*s)
  327. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  328. }
  329. // method id "oslogin.users.getLoginProfile":
  330. type UsersGetLoginProfileCall struct {
  331. s *Service
  332. name string
  333. urlParams_ gensupport.URLParams
  334. ifNoneMatch_ string
  335. ctx_ context.Context
  336. header_ http.Header
  337. }
  338. // GetLoginProfile: Retrieves the profile information used for logging
  339. // in to a virtual machine
  340. // on Google Compute Engine.
  341. func (r *UsersService) GetLoginProfile(name string) *UsersGetLoginProfileCall {
  342. c := &UsersGetLoginProfileCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  343. c.name = name
  344. return c
  345. }
  346. // ProjectId sets the optional parameter "projectId": The project ID of
  347. // the Google Cloud Platform project.
  348. func (c *UsersGetLoginProfileCall) ProjectId(projectId string) *UsersGetLoginProfileCall {
  349. c.urlParams_.Set("projectId", projectId)
  350. return c
  351. }
  352. // SystemId sets the optional parameter "systemId": A system ID for
  353. // filtering the results of the request.
  354. func (c *UsersGetLoginProfileCall) SystemId(systemId string) *UsersGetLoginProfileCall {
  355. c.urlParams_.Set("systemId", systemId)
  356. return c
  357. }
  358. // Fields allows partial responses to be retrieved. See
  359. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  360. // for more information.
  361. func (c *UsersGetLoginProfileCall) Fields(s ...googleapi.Field) *UsersGetLoginProfileCall {
  362. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  363. return c
  364. }
  365. // IfNoneMatch sets the optional parameter which makes the operation
  366. // fail if the object's ETag matches the given value. This is useful for
  367. // getting updates only after the object has changed since the last
  368. // request. Use googleapi.IsNotModified to check whether the response
  369. // error from Do is the result of In-None-Match.
  370. func (c *UsersGetLoginProfileCall) IfNoneMatch(entityTag string) *UsersGetLoginProfileCall {
  371. c.ifNoneMatch_ = entityTag
  372. return c
  373. }
  374. // Context sets the context to be used in this call's Do method. Any
  375. // pending HTTP request will be aborted if the provided context is
  376. // canceled.
  377. func (c *UsersGetLoginProfileCall) Context(ctx context.Context) *UsersGetLoginProfileCall {
  378. c.ctx_ = ctx
  379. return c
  380. }
  381. // Header returns an http.Header that can be modified by the caller to
  382. // add HTTP headers to the request.
  383. func (c *UsersGetLoginProfileCall) Header() http.Header {
  384. if c.header_ == nil {
  385. c.header_ = make(http.Header)
  386. }
  387. return c.header_
  388. }
  389. func (c *UsersGetLoginProfileCall) doRequest(alt string) (*http.Response, error) {
  390. reqHeaders := make(http.Header)
  391. for k, v := range c.header_ {
  392. reqHeaders[k] = v
  393. }
  394. reqHeaders.Set("User-Agent", c.s.userAgent())
  395. if c.ifNoneMatch_ != "" {
  396. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  397. }
  398. var body io.Reader = nil
  399. c.urlParams_.Set("alt", alt)
  400. c.urlParams_.Set("prettyPrint", "false")
  401. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/loginProfile")
  402. urls += "?" + c.urlParams_.Encode()
  403. req, err := http.NewRequest("GET", urls, body)
  404. if err != nil {
  405. return nil, err
  406. }
  407. req.Header = reqHeaders
  408. googleapi.Expand(req.URL, map[string]string{
  409. "name": c.name,
  410. })
  411. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  412. }
  413. // Do executes the "oslogin.users.getLoginProfile" call.
  414. // Exactly one of *LoginProfile or error will be non-nil. Any non-2xx
  415. // status code is an error. Response headers are in either
  416. // *LoginProfile.ServerResponse.Header or (if a response was returned at
  417. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  418. // to check whether the returned error was because
  419. // http.StatusNotModified was returned.
  420. func (c *UsersGetLoginProfileCall) Do(opts ...googleapi.CallOption) (*LoginProfile, error) {
  421. gensupport.SetOptions(c.urlParams_, opts...)
  422. res, err := c.doRequest("json")
  423. if res != nil && res.StatusCode == http.StatusNotModified {
  424. if res.Body != nil {
  425. res.Body.Close()
  426. }
  427. return nil, &googleapi.Error{
  428. Code: res.StatusCode,
  429. Header: res.Header,
  430. }
  431. }
  432. if err != nil {
  433. return nil, err
  434. }
  435. defer googleapi.CloseBody(res)
  436. if err := googleapi.CheckResponse(res); err != nil {
  437. return nil, err
  438. }
  439. ret := &LoginProfile{
  440. ServerResponse: googleapi.ServerResponse{
  441. Header: res.Header,
  442. HTTPStatusCode: res.StatusCode,
  443. },
  444. }
  445. target := &ret
  446. if err := gensupport.DecodeResponse(target, res); err != nil {
  447. return nil, err
  448. }
  449. return ret, nil
  450. // {
  451. // "description": "Retrieves the profile information used for logging in to a virtual machine\non Google Compute Engine.",
  452. // "flatPath": "v1beta/users/{usersId}/loginProfile",
  453. // "httpMethod": "GET",
  454. // "id": "oslogin.users.getLoginProfile",
  455. // "parameterOrder": [
  456. // "name"
  457. // ],
  458. // "parameters": {
  459. // "name": {
  460. // "description": "The unique ID for the user in format `users/{user}`.",
  461. // "location": "path",
  462. // "pattern": "^users/[^/]+$",
  463. // "required": true,
  464. // "type": "string"
  465. // },
  466. // "projectId": {
  467. // "description": "The project ID of the Google Cloud Platform project.",
  468. // "location": "query",
  469. // "type": "string"
  470. // },
  471. // "systemId": {
  472. // "description": "A system ID for filtering the results of the request.",
  473. // "location": "query",
  474. // "type": "string"
  475. // }
  476. // },
  477. // "path": "v1beta/{+name}/loginProfile",
  478. // "response": {
  479. // "$ref": "LoginProfile"
  480. // },
  481. // "scopes": [
  482. // "https://www.googleapis.com/auth/cloud-platform",
  483. // "https://www.googleapis.com/auth/cloud-platform.read-only",
  484. // "https://www.googleapis.com/auth/compute",
  485. // "https://www.googleapis.com/auth/compute.readonly"
  486. // ]
  487. // }
  488. }
  489. // method id "oslogin.users.importSshPublicKey":
  490. type UsersImportSshPublicKeyCall struct {
  491. s *Service
  492. parent string
  493. sshpublickey *SshPublicKey
  494. urlParams_ gensupport.URLParams
  495. ctx_ context.Context
  496. header_ http.Header
  497. }
  498. // ImportSshPublicKey: Adds an SSH public key and returns the profile
  499. // information. Default POSIX
  500. // account information is set when no username and UID exist as part of
  501. // the
  502. // login profile.
  503. func (r *UsersService) ImportSshPublicKey(parent string, sshpublickey *SshPublicKey) *UsersImportSshPublicKeyCall {
  504. c := &UsersImportSshPublicKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  505. c.parent = parent
  506. c.sshpublickey = sshpublickey
  507. return c
  508. }
  509. // ProjectId sets the optional parameter "projectId": The project ID of
  510. // the Google Cloud Platform project.
  511. func (c *UsersImportSshPublicKeyCall) ProjectId(projectId string) *UsersImportSshPublicKeyCall {
  512. c.urlParams_.Set("projectId", projectId)
  513. return c
  514. }
  515. // Fields allows partial responses to be retrieved. See
  516. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  517. // for more information.
  518. func (c *UsersImportSshPublicKeyCall) Fields(s ...googleapi.Field) *UsersImportSshPublicKeyCall {
  519. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  520. return c
  521. }
  522. // Context sets the context to be used in this call's Do method. Any
  523. // pending HTTP request will be aborted if the provided context is
  524. // canceled.
  525. func (c *UsersImportSshPublicKeyCall) Context(ctx context.Context) *UsersImportSshPublicKeyCall {
  526. c.ctx_ = ctx
  527. return c
  528. }
  529. // Header returns an http.Header that can be modified by the caller to
  530. // add HTTP headers to the request.
  531. func (c *UsersImportSshPublicKeyCall) Header() http.Header {
  532. if c.header_ == nil {
  533. c.header_ = make(http.Header)
  534. }
  535. return c.header_
  536. }
  537. func (c *UsersImportSshPublicKeyCall) doRequest(alt string) (*http.Response, error) {
  538. reqHeaders := make(http.Header)
  539. for k, v := range c.header_ {
  540. reqHeaders[k] = v
  541. }
  542. reqHeaders.Set("User-Agent", c.s.userAgent())
  543. var body io.Reader = nil
  544. body, err := googleapi.WithoutDataWrapper.JSONReader(c.sshpublickey)
  545. if err != nil {
  546. return nil, err
  547. }
  548. reqHeaders.Set("Content-Type", "application/json")
  549. c.urlParams_.Set("alt", alt)
  550. c.urlParams_.Set("prettyPrint", "false")
  551. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:importSshPublicKey")
  552. urls += "?" + c.urlParams_.Encode()
  553. req, err := http.NewRequest("POST", urls, body)
  554. if err != nil {
  555. return nil, err
  556. }
  557. req.Header = reqHeaders
  558. googleapi.Expand(req.URL, map[string]string{
  559. "parent": c.parent,
  560. })
  561. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  562. }
  563. // Do executes the "oslogin.users.importSshPublicKey" call.
  564. // Exactly one of *ImportSshPublicKeyResponse or error will be non-nil.
  565. // Any non-2xx status code is an error. Response headers are in either
  566. // *ImportSshPublicKeyResponse.ServerResponse.Header or (if a response
  567. // was returned at all) in error.(*googleapi.Error).Header. Use
  568. // googleapi.IsNotModified to check whether the returned error was
  569. // because http.StatusNotModified was returned.
  570. func (c *UsersImportSshPublicKeyCall) Do(opts ...googleapi.CallOption) (*ImportSshPublicKeyResponse, error) {
  571. gensupport.SetOptions(c.urlParams_, opts...)
  572. res, err := c.doRequest("json")
  573. if res != nil && res.StatusCode == http.StatusNotModified {
  574. if res.Body != nil {
  575. res.Body.Close()
  576. }
  577. return nil, &googleapi.Error{
  578. Code: res.StatusCode,
  579. Header: res.Header,
  580. }
  581. }
  582. if err != nil {
  583. return nil, err
  584. }
  585. defer googleapi.CloseBody(res)
  586. if err := googleapi.CheckResponse(res); err != nil {
  587. return nil, err
  588. }
  589. ret := &ImportSshPublicKeyResponse{
  590. ServerResponse: googleapi.ServerResponse{
  591. Header: res.Header,
  592. HTTPStatusCode: res.StatusCode,
  593. },
  594. }
  595. target := &ret
  596. if err := gensupport.DecodeResponse(target, res); err != nil {
  597. return nil, err
  598. }
  599. return ret, nil
  600. // {
  601. // "description": "Adds an SSH public key and returns the profile information. Default POSIX\naccount information is set when no username and UID exist as part of the\nlogin profile.",
  602. // "flatPath": "v1beta/users/{usersId}:importSshPublicKey",
  603. // "httpMethod": "POST",
  604. // "id": "oslogin.users.importSshPublicKey",
  605. // "parameterOrder": [
  606. // "parent"
  607. // ],
  608. // "parameters": {
  609. // "parent": {
  610. // "description": "The unique ID for the user in format `users/{user}`.",
  611. // "location": "path",
  612. // "pattern": "^users/[^/]+$",
  613. // "required": true,
  614. // "type": "string"
  615. // },
  616. // "projectId": {
  617. // "description": "The project ID of the Google Cloud Platform project.",
  618. // "location": "query",
  619. // "type": "string"
  620. // }
  621. // },
  622. // "path": "v1beta/{+parent}:importSshPublicKey",
  623. // "request": {
  624. // "$ref": "SshPublicKey"
  625. // },
  626. // "response": {
  627. // "$ref": "ImportSshPublicKeyResponse"
  628. // },
  629. // "scopes": [
  630. // "https://www.googleapis.com/auth/cloud-platform",
  631. // "https://www.googleapis.com/auth/compute"
  632. // ]
  633. // }
  634. }
  635. // method id "oslogin.users.projects.delete":
  636. type UsersProjectsDeleteCall struct {
  637. s *Service
  638. name string
  639. urlParams_ gensupport.URLParams
  640. ctx_ context.Context
  641. header_ http.Header
  642. }
  643. // Delete: Deletes a POSIX account.
  644. func (r *UsersProjectsService) Delete(name string) *UsersProjectsDeleteCall {
  645. c := &UsersProjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  646. c.name = name
  647. return c
  648. }
  649. // Fields allows partial responses to be retrieved. See
  650. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  651. // for more information.
  652. func (c *UsersProjectsDeleteCall) Fields(s ...googleapi.Field) *UsersProjectsDeleteCall {
  653. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  654. return c
  655. }
  656. // Context sets the context to be used in this call's Do method. Any
  657. // pending HTTP request will be aborted if the provided context is
  658. // canceled.
  659. func (c *UsersProjectsDeleteCall) Context(ctx context.Context) *UsersProjectsDeleteCall {
  660. c.ctx_ = ctx
  661. return c
  662. }
  663. // Header returns an http.Header that can be modified by the caller to
  664. // add HTTP headers to the request.
  665. func (c *UsersProjectsDeleteCall) Header() http.Header {
  666. if c.header_ == nil {
  667. c.header_ = make(http.Header)
  668. }
  669. return c.header_
  670. }
  671. func (c *UsersProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
  672. reqHeaders := make(http.Header)
  673. for k, v := range c.header_ {
  674. reqHeaders[k] = v
  675. }
  676. reqHeaders.Set("User-Agent", c.s.userAgent())
  677. var body io.Reader = nil
  678. c.urlParams_.Set("alt", alt)
  679. c.urlParams_.Set("prettyPrint", "false")
  680. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  681. urls += "?" + c.urlParams_.Encode()
  682. req, err := http.NewRequest("DELETE", urls, body)
  683. if err != nil {
  684. return nil, err
  685. }
  686. req.Header = reqHeaders
  687. googleapi.Expand(req.URL, map[string]string{
  688. "name": c.name,
  689. })
  690. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  691. }
  692. // Do executes the "oslogin.users.projects.delete" call.
  693. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  694. // code is an error. Response headers are in either
  695. // *Empty.ServerResponse.Header or (if a response was returned at all)
  696. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  697. // check whether the returned error was because http.StatusNotModified
  698. // was returned.
  699. func (c *UsersProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  700. gensupport.SetOptions(c.urlParams_, opts...)
  701. res, err := c.doRequest("json")
  702. if res != nil && res.StatusCode == http.StatusNotModified {
  703. if res.Body != nil {
  704. res.Body.Close()
  705. }
  706. return nil, &googleapi.Error{
  707. Code: res.StatusCode,
  708. Header: res.Header,
  709. }
  710. }
  711. if err != nil {
  712. return nil, err
  713. }
  714. defer googleapi.CloseBody(res)
  715. if err := googleapi.CheckResponse(res); err != nil {
  716. return nil, err
  717. }
  718. ret := &Empty{
  719. ServerResponse: googleapi.ServerResponse{
  720. Header: res.Header,
  721. HTTPStatusCode: res.StatusCode,
  722. },
  723. }
  724. target := &ret
  725. if err := gensupport.DecodeResponse(target, res); err != nil {
  726. return nil, err
  727. }
  728. return ret, nil
  729. // {
  730. // "description": "Deletes a POSIX account.",
  731. // "flatPath": "v1beta/users/{usersId}/projects/{projectsId}",
  732. // "httpMethod": "DELETE",
  733. // "id": "oslogin.users.projects.delete",
  734. // "parameterOrder": [
  735. // "name"
  736. // ],
  737. // "parameters": {
  738. // "name": {
  739. // "description": "A reference to the POSIX account to update. POSIX accounts are identified\nby the project ID they are associated with. A reference to the POSIX\naccount is in format `users/{user}/projects/{project}`.",
  740. // "location": "path",
  741. // "pattern": "^users/[^/]+/projects/[^/]+$",
  742. // "required": true,
  743. // "type": "string"
  744. // }
  745. // },
  746. // "path": "v1beta/{+name}",
  747. // "response": {
  748. // "$ref": "Empty"
  749. // },
  750. // "scopes": [
  751. // "https://www.googleapis.com/auth/cloud-platform",
  752. // "https://www.googleapis.com/auth/compute"
  753. // ]
  754. // }
  755. }
  756. // method id "oslogin.users.sshPublicKeys.delete":
  757. type UsersSshPublicKeysDeleteCall struct {
  758. s *Service
  759. name string
  760. urlParams_ gensupport.URLParams
  761. ctx_ context.Context
  762. header_ http.Header
  763. }
  764. // Delete: Deletes an SSH public key.
  765. func (r *UsersSshPublicKeysService) Delete(name string) *UsersSshPublicKeysDeleteCall {
  766. c := &UsersSshPublicKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  767. c.name = name
  768. return c
  769. }
  770. // Fields allows partial responses to be retrieved. See
  771. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  772. // for more information.
  773. func (c *UsersSshPublicKeysDeleteCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysDeleteCall {
  774. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  775. return c
  776. }
  777. // Context sets the context to be used in this call's Do method. Any
  778. // pending HTTP request will be aborted if the provided context is
  779. // canceled.
  780. func (c *UsersSshPublicKeysDeleteCall) Context(ctx context.Context) *UsersSshPublicKeysDeleteCall {
  781. c.ctx_ = ctx
  782. return c
  783. }
  784. // Header returns an http.Header that can be modified by the caller to
  785. // add HTTP headers to the request.
  786. func (c *UsersSshPublicKeysDeleteCall) Header() http.Header {
  787. if c.header_ == nil {
  788. c.header_ = make(http.Header)
  789. }
  790. return c.header_
  791. }
  792. func (c *UsersSshPublicKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
  793. reqHeaders := make(http.Header)
  794. for k, v := range c.header_ {
  795. reqHeaders[k] = v
  796. }
  797. reqHeaders.Set("User-Agent", c.s.userAgent())
  798. var body io.Reader = nil
  799. c.urlParams_.Set("alt", alt)
  800. c.urlParams_.Set("prettyPrint", "false")
  801. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  802. urls += "?" + c.urlParams_.Encode()
  803. req, err := http.NewRequest("DELETE", urls, body)
  804. if err != nil {
  805. return nil, err
  806. }
  807. req.Header = reqHeaders
  808. googleapi.Expand(req.URL, map[string]string{
  809. "name": c.name,
  810. })
  811. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  812. }
  813. // Do executes the "oslogin.users.sshPublicKeys.delete" call.
  814. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  815. // code is an error. Response headers are in either
  816. // *Empty.ServerResponse.Header or (if a response was returned at all)
  817. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  818. // check whether the returned error was because http.StatusNotModified
  819. // was returned.
  820. func (c *UsersSshPublicKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  821. gensupport.SetOptions(c.urlParams_, opts...)
  822. res, err := c.doRequest("json")
  823. if res != nil && res.StatusCode == http.StatusNotModified {
  824. if res.Body != nil {
  825. res.Body.Close()
  826. }
  827. return nil, &googleapi.Error{
  828. Code: res.StatusCode,
  829. Header: res.Header,
  830. }
  831. }
  832. if err != nil {
  833. return nil, err
  834. }
  835. defer googleapi.CloseBody(res)
  836. if err := googleapi.CheckResponse(res); err != nil {
  837. return nil, err
  838. }
  839. ret := &Empty{
  840. ServerResponse: googleapi.ServerResponse{
  841. Header: res.Header,
  842. HTTPStatusCode: res.StatusCode,
  843. },
  844. }
  845. target := &ret
  846. if err := gensupport.DecodeResponse(target, res); err != nil {
  847. return nil, err
  848. }
  849. return ret, nil
  850. // {
  851. // "description": "Deletes an SSH public key.",
  852. // "flatPath": "v1beta/users/{usersId}/sshPublicKeys/{sshPublicKeysId}",
  853. // "httpMethod": "DELETE",
  854. // "id": "oslogin.users.sshPublicKeys.delete",
  855. // "parameterOrder": [
  856. // "name"
  857. // ],
  858. // "parameters": {
  859. // "name": {
  860. // "description": "The fingerprint of the public key to update. Public keys are identified by\ntheir SHA-256 fingerprint. The fingerprint of the public key is in format\n`users/{user}/sshPublicKeys/{fingerprint}`.",
  861. // "location": "path",
  862. // "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$",
  863. // "required": true,
  864. // "type": "string"
  865. // }
  866. // },
  867. // "path": "v1beta/{+name}",
  868. // "response": {
  869. // "$ref": "Empty"
  870. // },
  871. // "scopes": [
  872. // "https://www.googleapis.com/auth/cloud-platform",
  873. // "https://www.googleapis.com/auth/compute"
  874. // ]
  875. // }
  876. }
  877. // method id "oslogin.users.sshPublicKeys.get":
  878. type UsersSshPublicKeysGetCall struct {
  879. s *Service
  880. name string
  881. urlParams_ gensupport.URLParams
  882. ifNoneMatch_ string
  883. ctx_ context.Context
  884. header_ http.Header
  885. }
  886. // Get: Retrieves an SSH public key.
  887. func (r *UsersSshPublicKeysService) Get(name string) *UsersSshPublicKeysGetCall {
  888. c := &UsersSshPublicKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  889. c.name = name
  890. return c
  891. }
  892. // Fields allows partial responses to be retrieved. See
  893. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  894. // for more information.
  895. func (c *UsersSshPublicKeysGetCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysGetCall {
  896. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  897. return c
  898. }
  899. // IfNoneMatch sets the optional parameter which makes the operation
  900. // fail if the object's ETag matches the given value. This is useful for
  901. // getting updates only after the object has changed since the last
  902. // request. Use googleapi.IsNotModified to check whether the response
  903. // error from Do is the result of In-None-Match.
  904. func (c *UsersSshPublicKeysGetCall) IfNoneMatch(entityTag string) *UsersSshPublicKeysGetCall {
  905. c.ifNoneMatch_ = entityTag
  906. return c
  907. }
  908. // Context sets the context to be used in this call's Do method. Any
  909. // pending HTTP request will be aborted if the provided context is
  910. // canceled.
  911. func (c *UsersSshPublicKeysGetCall) Context(ctx context.Context) *UsersSshPublicKeysGetCall {
  912. c.ctx_ = ctx
  913. return c
  914. }
  915. // Header returns an http.Header that can be modified by the caller to
  916. // add HTTP headers to the request.
  917. func (c *UsersSshPublicKeysGetCall) Header() http.Header {
  918. if c.header_ == nil {
  919. c.header_ = make(http.Header)
  920. }
  921. return c.header_
  922. }
  923. func (c *UsersSshPublicKeysGetCall) doRequest(alt string) (*http.Response, error) {
  924. reqHeaders := make(http.Header)
  925. for k, v := range c.header_ {
  926. reqHeaders[k] = v
  927. }
  928. reqHeaders.Set("User-Agent", c.s.userAgent())
  929. if c.ifNoneMatch_ != "" {
  930. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  931. }
  932. var body io.Reader = nil
  933. c.urlParams_.Set("alt", alt)
  934. c.urlParams_.Set("prettyPrint", "false")
  935. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  936. urls += "?" + c.urlParams_.Encode()
  937. req, err := http.NewRequest("GET", urls, body)
  938. if err != nil {
  939. return nil, err
  940. }
  941. req.Header = reqHeaders
  942. googleapi.Expand(req.URL, map[string]string{
  943. "name": c.name,
  944. })
  945. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  946. }
  947. // Do executes the "oslogin.users.sshPublicKeys.get" call.
  948. // Exactly one of *SshPublicKey or error will be non-nil. Any non-2xx
  949. // status code is an error. Response headers are in either
  950. // *SshPublicKey.ServerResponse.Header or (if a response was returned at
  951. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  952. // to check whether the returned error was because
  953. // http.StatusNotModified was returned.
  954. func (c *UsersSshPublicKeysGetCall) Do(opts ...googleapi.CallOption) (*SshPublicKey, error) {
  955. gensupport.SetOptions(c.urlParams_, opts...)
  956. res, err := c.doRequest("json")
  957. if res != nil && res.StatusCode == http.StatusNotModified {
  958. if res.Body != nil {
  959. res.Body.Close()
  960. }
  961. return nil, &googleapi.Error{
  962. Code: res.StatusCode,
  963. Header: res.Header,
  964. }
  965. }
  966. if err != nil {
  967. return nil, err
  968. }
  969. defer googleapi.CloseBody(res)
  970. if err := googleapi.CheckResponse(res); err != nil {
  971. return nil, err
  972. }
  973. ret := &SshPublicKey{
  974. ServerResponse: googleapi.ServerResponse{
  975. Header: res.Header,
  976. HTTPStatusCode: res.StatusCode,
  977. },
  978. }
  979. target := &ret
  980. if err := gensupport.DecodeResponse(target, res); err != nil {
  981. return nil, err
  982. }
  983. return ret, nil
  984. // {
  985. // "description": "Retrieves an SSH public key.",
  986. // "flatPath": "v1beta/users/{usersId}/sshPublicKeys/{sshPublicKeysId}",
  987. // "httpMethod": "GET",
  988. // "id": "oslogin.users.sshPublicKeys.get",
  989. // "parameterOrder": [
  990. // "name"
  991. // ],
  992. // "parameters": {
  993. // "name": {
  994. // "description": "The fingerprint of the public key to retrieve. Public keys are identified\nby their SHA-256 fingerprint. The fingerprint of the public key is in\nformat `users/{user}/sshPublicKeys/{fingerprint}`.",
  995. // "location": "path",
  996. // "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$",
  997. // "required": true,
  998. // "type": "string"
  999. // }
  1000. // },
  1001. // "path": "v1beta/{+name}",
  1002. // "response": {
  1003. // "$ref": "SshPublicKey"
  1004. // },
  1005. // "scopes": [
  1006. // "https://www.googleapis.com/auth/cloud-platform",
  1007. // "https://www.googleapis.com/auth/compute"
  1008. // ]
  1009. // }
  1010. }
  1011. // method id "oslogin.users.sshPublicKeys.patch":
  1012. type UsersSshPublicKeysPatchCall struct {
  1013. s *Service
  1014. name string
  1015. sshpublickey *SshPublicKey
  1016. urlParams_ gensupport.URLParams
  1017. ctx_ context.Context
  1018. header_ http.Header
  1019. }
  1020. // Patch: Updates an SSH public key and returns the profile information.
  1021. // This method
  1022. // supports patch semantics.
  1023. func (r *UsersSshPublicKeysService) Patch(name string, sshpublickey *SshPublicKey) *UsersSshPublicKeysPatchCall {
  1024. c := &UsersSshPublicKeysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1025. c.name = name
  1026. c.sshpublickey = sshpublickey
  1027. return c
  1028. }
  1029. // UpdateMask sets the optional parameter "updateMask": Mask to control
  1030. // which fields get updated. Updates all if not present.
  1031. func (c *UsersSshPublicKeysPatchCall) UpdateMask(updateMask string) *UsersSshPublicKeysPatchCall {
  1032. c.urlParams_.Set("updateMask", updateMask)
  1033. return c
  1034. }
  1035. // Fields allows partial responses to be retrieved. See
  1036. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1037. // for more information.
  1038. func (c *UsersSshPublicKeysPatchCall) Fields(s ...googleapi.Field) *UsersSshPublicKeysPatchCall {
  1039. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1040. return c
  1041. }
  1042. // Context sets the context to be used in this call's Do method. Any
  1043. // pending HTTP request will be aborted if the provided context is
  1044. // canceled.
  1045. func (c *UsersSshPublicKeysPatchCall) Context(ctx context.Context) *UsersSshPublicKeysPatchCall {
  1046. c.ctx_ = ctx
  1047. return c
  1048. }
  1049. // Header returns an http.Header that can be modified by the caller to
  1050. // add HTTP headers to the request.
  1051. func (c *UsersSshPublicKeysPatchCall) Header() http.Header {
  1052. if c.header_ == nil {
  1053. c.header_ = make(http.Header)
  1054. }
  1055. return c.header_
  1056. }
  1057. func (c *UsersSshPublicKeysPatchCall) doRequest(alt string) (*http.Response, error) {
  1058. reqHeaders := make(http.Header)
  1059. for k, v := range c.header_ {
  1060. reqHeaders[k] = v
  1061. }
  1062. reqHeaders.Set("User-Agent", c.s.userAgent())
  1063. var body io.Reader = nil
  1064. body, err := googleapi.WithoutDataWrapper.JSONReader(c.sshpublickey)
  1065. if err != nil {
  1066. return nil, err
  1067. }
  1068. reqHeaders.Set("Content-Type", "application/json")
  1069. c.urlParams_.Set("alt", alt)
  1070. c.urlParams_.Set("prettyPrint", "false")
  1071. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  1072. urls += "?" + c.urlParams_.Encode()
  1073. req, err := http.NewRequest("PATCH", urls, body)
  1074. if err != nil {
  1075. return nil, err
  1076. }
  1077. req.Header = reqHeaders
  1078. googleapi.Expand(req.URL, map[string]string{
  1079. "name": c.name,
  1080. })
  1081. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1082. }
  1083. // Do executes the "oslogin.users.sshPublicKeys.patch" call.
  1084. // Exactly one of *SshPublicKey or error will be non-nil. Any non-2xx
  1085. // status code is an error. Response headers are in either
  1086. // *SshPublicKey.ServerResponse.Header or (if a response was returned at
  1087. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1088. // to check whether the returned error was because
  1089. // http.StatusNotModified was returned.
  1090. func (c *UsersSshPublicKeysPatchCall) Do(opts ...googleapi.CallOption) (*SshPublicKey, error) {
  1091. gensupport.SetOptions(c.urlParams_, opts...)
  1092. res, err := c.doRequest("json")
  1093. if res != nil && res.StatusCode == http.StatusNotModified {
  1094. if res.Body != nil {
  1095. res.Body.Close()
  1096. }
  1097. return nil, &googleapi.Error{
  1098. Code: res.StatusCode,
  1099. Header: res.Header,
  1100. }
  1101. }
  1102. if err != nil {
  1103. return nil, err
  1104. }
  1105. defer googleapi.CloseBody(res)
  1106. if err := googleapi.CheckResponse(res); err != nil {
  1107. return nil, err
  1108. }
  1109. ret := &SshPublicKey{
  1110. ServerResponse: googleapi.ServerResponse{
  1111. Header: res.Header,
  1112. HTTPStatusCode: res.StatusCode,
  1113. },
  1114. }
  1115. target := &ret
  1116. if err := gensupport.DecodeResponse(target, res); err != nil {
  1117. return nil, err
  1118. }
  1119. return ret, nil
  1120. // {
  1121. // "description": "Updates an SSH public key and returns the profile information. This method\nsupports patch semantics.",
  1122. // "flatPath": "v1beta/users/{usersId}/sshPublicKeys/{sshPublicKeysId}",
  1123. // "httpMethod": "PATCH",
  1124. // "id": "oslogin.users.sshPublicKeys.patch",
  1125. // "parameterOrder": [
  1126. // "name"
  1127. // ],
  1128. // "parameters": {
  1129. // "name": {
  1130. // "description": "The fingerprint of the public key to update. Public keys are identified by\ntheir SHA-256 fingerprint. The fingerprint of the public key is in format\n`users/{user}/sshPublicKeys/{fingerprint}`.",
  1131. // "location": "path",
  1132. // "pattern": "^users/[^/]+/sshPublicKeys/[^/]+$",
  1133. // "required": true,
  1134. // "type": "string"
  1135. // },
  1136. // "updateMask": {
  1137. // "description": "Mask to control which fields get updated. Updates all if not present.",
  1138. // "format": "google-fieldmask",
  1139. // "location": "query",
  1140. // "type": "string"
  1141. // }
  1142. // },
  1143. // "path": "v1beta/{+name}",
  1144. // "request": {
  1145. // "$ref": "SshPublicKey"
  1146. // },
  1147. // "response": {
  1148. // "$ref": "SshPublicKey"
  1149. // },
  1150. // "scopes": [
  1151. // "https://www.googleapis.com/auth/cloud-platform",
  1152. // "https://www.googleapis.com/auth/compute"
  1153. // ]
  1154. // }
  1155. }