Skip to content

Commit 2454496

Browse files
feat: Automated regeneration of DataPortability client (googleapis#12965)
Auto-created at 2025-02-14 13:17:23 +0000 using the toys pull request generator.
1 parent ded4e73 commit 2454496

File tree

7 files changed

+163
-2
lines changed

7 files changed

+163
-2
lines changed

clients/data_portability/lib/google_api/data_portability/v1/api/archive_jobs.ex

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,70 @@ defmodule GoogleApi.DataPortability.V1.Api.ArchiveJobs do
2525

2626
@library_version Mix.Project.config() |> Keyword.get(:version, "")
2727

28+
@doc """
29+
Cancels a Portability Archive job.
30+
31+
## Parameters
32+
33+
* `connection` (*type:* `GoogleApi.DataPortability.V1.Connection.t`) - Connection to server
34+
* `name` (*type:* `String.t`) - Required. The Archive job ID you're canceling. This is returned by the InitiatePortabilityArchive response. The format is: archiveJobs/{archive_job}. Canceling is only executed if the job is in progress.
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.DataPortability.V1.Model.CancelPortabilityArchiveRequest.t`) -
48+
* `opts` (*type:* `keyword()`) - Call options
49+
50+
## Returns
51+
52+
* `{:ok, %GoogleApi.DataPortability.V1.Model.CancelPortabilityArchiveResponse{}}` on success
53+
* `{:error, info}` on failure
54+
"""
55+
@spec dataportability_archive_jobs_cancel(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
56+
{:ok, GoogleApi.DataPortability.V1.Model.CancelPortabilityArchiveResponse.t()}
57+
| {:ok, Tesla.Env.t()}
58+
| {:ok, list()}
59+
| {:error, any()}
60+
def dataportability_archive_jobs_cancel(connection, name, optional_params \\ [], opts \\ []) do
61+
optional_params_config = %{
62+
:"$.xgafv" => :query,
63+
:access_token => :query,
64+
:alt => :query,
65+
:callback => :query,
66+
:fields => :query,
67+
:key => :query,
68+
:oauth_token => :query,
69+
:prettyPrint => :query,
70+
:quotaUser => :query,
71+
:uploadType => :query,
72+
:upload_protocol => :query,
73+
:body => :body
74+
}
75+
76+
request =
77+
Request.new()
78+
|> Request.method(:post)
79+
|> Request.url("/v1/{+name}:cancel", %{
80+
"name" => URI.encode(name, &URI.char_unreserved?/1)
81+
})
82+
|> Request.add_optional_params(optional_params_config, optional_params)
83+
|> Request.library_version(@library_version)
84+
85+
connection
86+
|> Connection.execute(request)
87+
|> Response.decode(
88+
opts ++ [struct: %GoogleApi.DataPortability.V1.Model.CancelPortabilityArchiveResponse{}]
89+
)
90+
end
91+
2892
@doc """
2993
Retrieves the state of an Archive job for the Portability API.
3094

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 "20250120"
23+
@discovery_revision "20250212"
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.CancelPortabilityArchiveRequest do
19+
@moduledoc """
20+
Request to cancel a Portability Archive job.
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.CancelPortabilityArchiveRequest do
32+
def decode(value, options) do
33+
GoogleApi.DataPortability.V1.Model.CancelPortabilityArchiveRequest.decode(value, options)
34+
end
35+
end
36+
37+
defimpl Poison.Encoder, for: GoogleApi.DataPortability.V1.Model.CancelPortabilityArchiveRequest do
38+
def encode(value, options) do
39+
GoogleApi.Gax.ModelBase.encode(value, options)
40+
end
41+
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.CancelPortabilityArchiveResponse do
19+
@moduledoc """
20+
Response to canceling a Data Portability Archive job.
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.CancelPortabilityArchiveResponse do
32+
def decode(value, options) do
33+
GoogleApi.DataPortability.V1.Model.CancelPortabilityArchiveResponse.decode(value, options)
34+
end
35+
end
36+
37+
defimpl Poison.Encoder, for: GoogleApi.DataPortability.V1.Model.CancelPortabilityArchiveResponse do
38+
def encode(value, options) do
39+
GoogleApi.Gax.ModelBase.encode(value, options)
40+
end
41+
end

clients/data_portability/lib/google_api/data_portability/v1/model/initiate_portability_archive_request.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,22 @@ defmodule GoogleApi.DataPortability.V1.Model.InitiatePortabilityArchiveRequest d
2121
2222
## Attributes
2323
24+
* `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. The timestamp that represents the end point for the data you are exporting. If the end_time is not specified in the InitiatePortabilityArchiveRequest, this field is set to the latest available data.
2425
* `resources` (*type:* `list(String.t)`, *default:* `nil`) - The resources from which you're exporting data. These values have a 1:1 correspondence with the OAuth scopes.
26+
* `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. The timestamp that represents the starting point for the data you are exporting. If the start_time is not specified in the InitiatePortabilityArchiveRequest, the field is set to the earliest available data.
2527
"""
2628

2729
use GoogleApi.Gax.ModelBase
2830

2931
@type t :: %__MODULE__{
30-
:resources => list(String.t()) | nil
32+
:endTime => DateTime.t() | nil,
33+
:resources => list(String.t()) | nil,
34+
:startTime => DateTime.t() | nil
3135
}
3236

37+
field(:endTime, as: DateTime)
3338
field(:resources, type: :list)
39+
field(:startTime, as: DateTime)
3440
end
3541

3642
defimpl Poison.Decoder, for: GoogleApi.DataPortability.V1.Model.InitiatePortabilityArchiveRequest do

clients/data_portability/lib/google_api/data_portability/v1/model/initiate_portability_archive_response.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ defmodule GoogleApi.DataPortability.V1.Model.InitiatePortabilityArchiveResponse
2121
2222
## Attributes
2323
24+
* `accessType` (*type:* `String.t`, *default:* `nil`) - The access type of the Archive job initiated by the API.
2425
* `archiveJobId` (*type:* `String.t`, *default:* `nil`) - The archive job ID that is initiated in the API. This can be used to get the state of the job.
2526
"""
2627

2728
use GoogleApi.Gax.ModelBase
2829

2930
@type t :: %__MODULE__{
31+
:accessType => String.t() | nil,
3032
:archiveJobId => String.t() | nil
3133
}
3234

35+
field(:accessType)
3336
field(:archiveJobId)
3437
end
3538

clients/data_portability/lib/google_api/data_portability/v1/model/portability_archive_state.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@ defmodule GoogleApi.DataPortability.V1.Model.PortabilityArchiveState do
2121
2222
## Attributes
2323
24+
* `exportTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp that represents the end point for the data you are exporting. If the end_time value is set in the InitiatePortabilityArchiveRequest, this field is set to that value. If end_time is not set, this value is set to the time the export was requested.
2425
* `name` (*type:* `String.t`, *default:* `nil`) - The resource name of ArchiveJob's PortabilityArchiveState singleton. The format is: archiveJobs/{archive_job}/portabilityArchiveState. archive_job is the job ID provided in the request.
26+
* `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp that represents the starting point for the data you are exporting. This field is set only if the start_time field is specified in the InitiatePortabilityArchiveRequest.
2527
* `state` (*type:* `String.t`, *default:* `nil`) - Resource that represents the state of the Archive job.
2628
* `urls` (*type:* `list(String.t)`, *default:* `nil`) - If the state is complete, this method returns the signed URLs of the objects in the Cloud Storage bucket.
2729
"""
2830

2931
use GoogleApi.Gax.ModelBase
3032

3133
@type t :: %__MODULE__{
34+
:exportTime => DateTime.t() | nil,
3235
:name => String.t() | nil,
36+
:startTime => DateTime.t() | nil,
3337
:state => String.t() | nil,
3438
:urls => list(String.t()) | nil
3539
}
3640

41+
field(:exportTime, as: DateTime)
3742
field(:name)
43+
field(:startTime, as: DateTime)
3844
field(:state)
3945
field(:urls, type: :list)
4046
end

0 commit comments

Comments
 (0)