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.
 
 
 

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