Skip to content

Commit 4045501

Browse files
feat: Automated regeneration of DataPortability client (googleapis#13104)
Auto-created at 2025-03-06 13:15:35 +0000 using the toys pull request generator.
1 parent c62019f commit 4045501

File tree

4 files changed

+179
-1
lines changed

4 files changed

+179
-1
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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.DataPortability.V1.Api.AccessType do
19+
@moduledoc """
20+
API calls for all endpoints tagged `AccessType`.
21+
"""
22+
23+
alias GoogleApi.DataPortability.V1.Connection
24+
alias GoogleApi.Gax.{Request, Response}
25+
26+
@library_version Mix.Project.config() |> Keyword.get(:version, "")
27+
28+
@doc """
29+
Gets the access type of the token.
30+
31+
## Parameters
32+
33+
* `connection` (*type:* `GoogleApi.DataPortability.V1.Connection.t`) - Connection to server
34+
* `optional_params` (*type:* `keyword()`) - Optional parameters
35+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
36+
* `:access_token` (*type:* `String.t`) - OAuth access token.
37+
* `:alt` (*type:* `String.t`) - Data format for response.
38+
* `:callback` (*type:* `String.t`) - JSONP
39+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
40+
* `: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.
41+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
42+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
43+
* `: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.
44+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
45+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
46+
* `:body` (*type:* `GoogleApi.DataPortability.V1.Model.CheckAccessTypeRequest.t`) -
47+
* `opts` (*type:* `keyword()`) - Call options
48+
49+
## Returns
50+
51+
* `{:ok, %GoogleApi.DataPortability.V1.Model.CheckAccessTypeResponse{}}` on success
52+
* `{:error, info}` on failure
53+
"""
54+
@spec dataportability_access_type_check(Tesla.Env.client(), keyword(), keyword()) ::
55+
{:ok, GoogleApi.DataPortability.V1.Model.CheckAccessTypeResponse.t()}
56+
| {:ok, Tesla.Env.t()}
57+
| {:ok, list()}
58+
| {:error, any()}
59+
def dataportability_access_type_check(connection, optional_params \\ [], opts \\ []) do
60+
optional_params_config = %{
61+
:"$.xgafv" => :query,
62+
:access_token => :query,
63+
:alt => :query,
64+
:callback => :query,
65+
:fields => :query,
66+
:key => :query,
67+
:oauth_token => :query,
68+
:prettyPrint => :query,
69+
:quotaUser => :query,
70+
:uploadType => :query,
71+
:upload_protocol => :query,
72+
:body => :body
73+
}
74+
75+
request =
76+
Request.new()
77+
|> Request.method(:post)
78+
|> Request.url("/v1/accessType:check", %{})
79+
|> Request.add_optional_params(optional_params_config, optional_params)
80+
|> Request.library_version(@library_version)
81+
82+
connection
83+
|> Connection.execute(request)
84+
|> Response.decode(
85+
opts ++ [struct: %GoogleApi.DataPortability.V1.Model.CheckAccessTypeResponse{}]
86+
)
87+
end
88+
end

clients/data_portability/lib/google_api/data_portability/v1/metadata.ex

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

23-
@discovery_revision "20250212"
23+
@discovery_revision "20250305"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.DataPortability.V1.Model.CheckAccessTypeRequest do
19+
@moduledoc """
20+
Request to check the token's access type. All required information is derived from the attached OAuth token.
21+
22+
## Attributes
23+
24+
"""
25+
26+
use GoogleApi.Gax.ModelBase
27+
28+
@type t :: %__MODULE__{}
29+
end
30+
31+
defimpl Poison.Decoder, for: GoogleApi.DataPortability.V1.Model.CheckAccessTypeRequest do
32+
def decode(value, options) do
33+
GoogleApi.DataPortability.V1.Model.CheckAccessTypeRequest.decode(value, options)
34+
end
35+
end
36+
37+
defimpl Poison.Encoder, for: GoogleApi.DataPortability.V1.Model.CheckAccessTypeRequest do
38+
def encode(value, options) do
39+
GoogleApi.Gax.ModelBase.encode(value, options)
40+
end
41+
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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.DataPortability.V1.Model.CheckAccessTypeResponse do
19+
@moduledoc """
20+
Response to checking the token's access type.
21+
22+
## Attributes
23+
24+
* `oneTimeResources` (*type:* `list(String.t)`, *default:* `nil`) - Jobs initiated with this token will be one-time if any requested resources have one-time access.
25+
* `timeBasedResources` (*type:* `list(String.t)`, *default:* `nil`) - Jobs initiated with this token will be time-based if all requested resources have time-based access.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:oneTimeResources => list(String.t()) | nil,
32+
:timeBasedResources => list(String.t()) | nil
33+
}
34+
35+
field(:oneTimeResources, type: :list)
36+
field(:timeBasedResources, type: :list)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.DataPortability.V1.Model.CheckAccessTypeResponse do
40+
def decode(value, options) do
41+
GoogleApi.DataPortability.V1.Model.CheckAccessTypeResponse.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.DataPortability.V1.Model.CheckAccessTypeResponse do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

0 commit comments

Comments
 (0)