Skip to content

Commit 8b18550

Browse files
feat: Automated regeneration of OSLogin client (googleapis#12959)
Auto-created at 2025-02-12 13:12:50 +0000 using the toys pull request generator.
1 parent d458e13 commit 8b18550

File tree

5 files changed

+121
-3
lines changed

5 files changed

+121
-3
lines changed

clients/os_login/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_os_login, "~> 0.29"}]
14+
[{:google_api_os_login, "~> 0.30"}]
1515
end
1616
```
1717

clients/os_login/lib/google_api/os_login/v1alpha/api/users.ex

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,78 @@ defmodule GoogleApi.OSLogin.V1alpha.Api.Users do
225225
|> Response.decode(opts ++ [struct: %GoogleApi.OSLogin.V1alpha.Model.Empty{}])
226226
end
227227

228+
@doc """
229+
Create a POSIX account if it doesn't exist.
230+
231+
## Parameters
232+
233+
* `connection` (*type:* `GoogleApi.OSLogin.V1alpha.Connection.t`) - Connection to server
234+
* `name` (*type:* `String.t`) - Required. The unique ID for the user in format `users/{user}/projects/{project}`.
235+
* `optional_params` (*type:* `keyword()`) - Optional parameters
236+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
237+
* `:access_token` (*type:* `String.t`) - OAuth access token.
238+
* `:alt` (*type:* `String.t`) - Data format for response.
239+
* `:callback` (*type:* `String.t`) - JSONP
240+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
241+
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
242+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
243+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
244+
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
245+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
246+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
247+
* `:body` (*type:* `GoogleApi.OSLogin.V1alpha.Model.ProvisionPosixAccountRequest.t`) -
248+
* `opts` (*type:* `keyword()`) - Call options
249+
250+
## Returns
251+
252+
* `{:ok, %GoogleApi.OSLogin.V1alpha.Model.PosixAccount{}}` on success
253+
* `{:error, info}` on failure
254+
"""
255+
@spec oslogin_users_projects_provision_posix_account(
256+
Tesla.Env.client(),
257+
String.t(),
258+
keyword(),
259+
keyword()
260+
) ::
261+
{:ok, GoogleApi.OSLogin.V1alpha.Model.PosixAccount.t()}
262+
| {:ok, Tesla.Env.t()}
263+
| {:ok, list()}
264+
| {:error, any()}
265+
def oslogin_users_projects_provision_posix_account(
266+
connection,
267+
name,
268+
optional_params \\ [],
269+
opts \\ []
270+
) do
271+
optional_params_config = %{
272+
:"$.xgafv" => :query,
273+
:access_token => :query,
274+
:alt => :query,
275+
:callback => :query,
276+
:fields => :query,
277+
:key => :query,
278+
:oauth_token => :query,
279+
:prettyPrint => :query,
280+
:quotaUser => :query,
281+
:uploadType => :query,
282+
:upload_protocol => :query,
283+
:body => :body
284+
}
285+
286+
request =
287+
Request.new()
288+
|> Request.method(:post)
289+
|> Request.url("/v1alpha/{+name}", %{
290+
"name" => URI.encode(name, &URI.char_unreserved?/1)
291+
})
292+
|> Request.add_optional_params(optional_params_config, optional_params)
293+
|> Request.library_version(@library_version)
294+
295+
connection
296+
|> Connection.execute(request)
297+
|> Response.decode(opts ++ [struct: %GoogleApi.OSLogin.V1alpha.Model.PosixAccount{}])
298+
end
299+
228300
@doc """
229301
Signs an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.
230302

clients/os_login/lib/google_api/os_login/v1alpha/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.OSLogin.V1alpha do
2020
API client metadata for GoogleApi.OSLogin.V1alpha.
2121
"""
2222

23-
@discovery_revision "20241208"
23+
@discovery_revision "20250209"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.OSLogin.V1alpha.Model.ProvisionPosixAccountRequest do
19+
@moduledoc """
20+
A request message for creating a POSIX account entry.
21+
22+
## Attributes
23+
24+
* `regions` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The regions to wait for a POSIX account to be written to before returning a response. If unspecified, defaults to all regions. Regions are listed at https://cloud.google.com/about/locations#region.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:regions => list(String.t()) | nil
31+
}
32+
33+
field(:regions, type: :list)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.OSLogin.V1alpha.Model.ProvisionPosixAccountRequest do
37+
def decode(value, options) do
38+
GoogleApi.OSLogin.V1alpha.Model.ProvisionPosixAccountRequest.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.OSLogin.V1alpha.Model.ProvisionPosixAccountRequest do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end

clients/os_login/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.OSLogin.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.29.1"
21+
@version "0.30.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)