Skip to content

Commit ed79012

Browse files
feat: Automated regeneration of OSLogin client (googleapis#13124)
Auto-created at 2025-03-10 13:15:48 +0000 using the toys pull request generator.
1 parent cb4a742 commit ed79012

File tree

4 files changed

+222
-1
lines changed

4 files changed

+222
-1
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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.Api.Projects do
19+
@moduledoc """
20+
API calls for all endpoints tagged `Projects`.
21+
"""
22+
23+
alias GoogleApi.OSLogin.V1alpha.Connection
24+
alias GoogleApi.Gax.{Request, Response}
25+
26+
@library_version Mix.Project.config() |> Keyword.get(:version, "")
27+
28+
@doc """
29+
Signs an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.
30+
31+
## Parameters
32+
33+
* `connection` (*type:* `GoogleApi.OSLogin.V1alpha.Connection.t`) - Connection to server
34+
* `parent` (*type:* `String.t`) - Required. The parent for the signing request. Format: projects/{project}/locations/{location}
35+
* `optional_params` (*type:* `keyword()`) - Optional parameters
36+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
37+
* `:access_token` (*type:* `String.t`) - OAuth access token.
38+
* `:alt` (*type:* `String.t`) - Data format for response.
39+
* `:callback` (*type:* `String.t`) - JSONP
40+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
41+
* `: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.
42+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
43+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
44+
* `: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.
45+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
46+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
47+
* `:body` (*type:* `GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest.t`) -
48+
* `opts` (*type:* `keyword()`) - Call options
49+
50+
## Returns
51+
52+
* `{:ok, %GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyResponse{}}` on success
53+
* `{:error, info}` on failure
54+
"""
55+
@spec oslogin_projects_locations_sign_ssh_public_key(
56+
Tesla.Env.client(),
57+
String.t(),
58+
keyword(),
59+
keyword()
60+
) ::
61+
{:ok,
62+
GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyResponse.t()}
63+
| {:ok, Tesla.Env.t()}
64+
| {:ok, list()}
65+
| {:error, any()}
66+
def oslogin_projects_locations_sign_ssh_public_key(
67+
connection,
68+
parent,
69+
optional_params \\ [],
70+
opts \\ []
71+
) do
72+
optional_params_config = %{
73+
:"$.xgafv" => :query,
74+
:access_token => :query,
75+
:alt => :query,
76+
:callback => :query,
77+
:fields => :query,
78+
:key => :query,
79+
:oauth_token => :query,
80+
:prettyPrint => :query,
81+
:quotaUser => :query,
82+
:uploadType => :query,
83+
:upload_protocol => :query,
84+
:body => :body
85+
}
86+
87+
request =
88+
Request.new()
89+
|> Request.method(:post)
90+
|> Request.url("/v1alpha/{+parent}:signSshPublicKey", %{
91+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
92+
})
93+
|> Request.add_optional_params(optional_params_config, optional_params)
94+
|> Request.library_version(@library_version)
95+
96+
connection
97+
|> Connection.execute(request)
98+
|> Response.decode(
99+
opts ++
100+
[
101+
struct:
102+
%GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyResponse{}
103+
]
104+
)
105+
end
106+
end

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 "20250209"
23+
@discovery_revision "20250302"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest do
19+
@moduledoc """
20+
A request message for signing an SSH public key.
21+
22+
## Attributes
23+
24+
* `appEngineInstance` (*type:* `String.t`, *default:* `nil`) - The App Engine instance to sign the SSH public key for. Expected format: services/{service}/versions/{version}/instances/{instance}
25+
* `computeInstance` (*type:* `String.t`, *default:* `nil`) - The compute instance to sign the SSH public key for. Expected format: projects/{project}/zones/{zone}/instances/{numeric_instance_id}
26+
* `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The service account for the Compute instance. If the instance in question does not have a service account, this field should be left empty. If the wrong service account is provided, this operation will return a signed certificate that will not be accepted by the VM. During rollout of the new regionalized SignSshPublicKey API, this field will be required for all requests, but the VM will not initially carry out the
27+
* `sshPublicKey` (*type:* `String.t`, *default:* `nil`) - Required. The SSH public key to sign.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:appEngineInstance => String.t() | nil,
34+
:computeInstance => String.t() | nil,
35+
:serviceAccount => String.t() | nil,
36+
:sshPublicKey => String.t() | nil
37+
}
38+
39+
field(:appEngineInstance)
40+
field(:computeInstance)
41+
field(:serviceAccount)
42+
field(:sshPublicKey)
43+
end
44+
45+
defimpl Poison.Decoder,
46+
for:
47+
GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest do
48+
def decode(value, options) do
49+
GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest.decode(
50+
value,
51+
options
52+
)
53+
end
54+
end
55+
56+
defimpl Poison.Encoder,
57+
for:
58+
GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest do
59+
def encode(value, options) do
60+
GoogleApi.Gax.ModelBase.encode(value, options)
61+
end
62+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyResponse do
19+
@moduledoc """
20+
The response message for signing an SSH public key.
21+
22+
## Attributes
23+
24+
* `signedSshPublicKey` (*type:* `String.t`, *default:* `nil`) - The signed SSH public key to use in the SSH handshake.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:signedSshPublicKey => String.t() | nil
31+
}
32+
33+
field(:signedSshPublicKey)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for:
38+
GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyResponse do
39+
def decode(value, options) do
40+
GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyResponse.decode(
41+
value,
42+
options
43+
)
44+
end
45+
end
46+
47+
defimpl Poison.Encoder,
48+
for:
49+
GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyResponse do
50+
def encode(value, options) do
51+
GoogleApi.Gax.ModelBase.encode(value, options)
52+
end
53+
end

0 commit comments

Comments
 (0)