Skip to content

Commit b2c2650

Browse files
feat: Automated regeneration of DataMigration client (googleapis#12661)
Auto-created at 2024-12-07 13:16:58 +0000 using the toys pull request generator.
1 parent b5d16ca commit b2c2650

17 files changed

+663
-9
lines changed

clients/data_migration/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_data_migration, "~> 0.19"}]
14+
[{:google_api_data_migration, "~> 0.20"}]
1515
end
1616
```
1717

clients/data_migration/lib/google_api/data_migration/v1/api/projects.ex

Lines changed: 289 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2615,6 +2615,76 @@ defmodule GoogleApi.DataMigration.V1.Api.Projects do
26152615
|> Response.decode(opts ++ [struct: %GoogleApi.DataMigration.V1.Model.Operation{}])
26162616
end
26172617

2618+
@doc """
2619+
Retrieves objects from the source database that can be selected for data migration. This is applicable for the following migrations: 1. PostgreSQL to Cloud SQL for PostgreSQL 2. PostgreSQL to AlloyDB for PostgreSQL.
2620+
2621+
## Parameters
2622+
2623+
* `connection` (*type:* `GoogleApi.DataMigration.V1.Connection.t`) - Connection to server
2624+
* `name` (*type:* `String.t`) - Required. The resource name for the migration job for which source objects should be returned.
2625+
* `optional_params` (*type:* `keyword()`) - Optional parameters
2626+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
2627+
* `:access_token` (*type:* `String.t`) - OAuth access token.
2628+
* `:alt` (*type:* `String.t`) - Data format for response.
2629+
* `:callback` (*type:* `String.t`) - JSONP
2630+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
2631+
* `: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.
2632+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
2633+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
2634+
* `: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.
2635+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
2636+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
2637+
* `opts` (*type:* `keyword()`) - Call options
2638+
2639+
## Returns
2640+
2641+
* `{:ok, %GoogleApi.DataMigration.V1.Model.Operation{}}` on success
2642+
* `{:error, info}` on failure
2643+
"""
2644+
@spec datamigration_projects_locations_migration_jobs_fetch_source_objects(
2645+
Tesla.Env.client(),
2646+
String.t(),
2647+
keyword(),
2648+
keyword()
2649+
) ::
2650+
{:ok, GoogleApi.DataMigration.V1.Model.Operation.t()}
2651+
| {:ok, Tesla.Env.t()}
2652+
| {:ok, list()}
2653+
| {:error, any()}
2654+
def datamigration_projects_locations_migration_jobs_fetch_source_objects(
2655+
connection,
2656+
name,
2657+
optional_params \\ [],
2658+
opts \\ []
2659+
) do
2660+
optional_params_config = %{
2661+
:"$.xgafv" => :query,
2662+
:access_token => :query,
2663+
:alt => :query,
2664+
:callback => :query,
2665+
:fields => :query,
2666+
:key => :query,
2667+
:oauth_token => :query,
2668+
:prettyPrint => :query,
2669+
:quotaUser => :query,
2670+
:uploadType => :query,
2671+
:upload_protocol => :query
2672+
}
2673+
2674+
request =
2675+
Request.new()
2676+
|> Request.method(:get)
2677+
|> Request.url("/v1/{+name}:fetchSourceObjects", %{
2678+
"name" => URI.encode(name, &URI.char_unreserved?/1)
2679+
})
2680+
|> Request.add_optional_params(optional_params_config, optional_params)
2681+
|> Request.library_version(@library_version)
2682+
2683+
connection
2684+
|> Connection.execute(request)
2685+
|> Response.decode(opts ++ [struct: %GoogleApi.DataMigration.V1.Model.Operation{}])
2686+
end
2687+
26182688
@doc """
26192689
Generate a SSH configuration script to configure the reverse SSH connectivity.
26202690
@@ -3635,6 +3705,76 @@ defmodule GoogleApi.DataMigration.V1.Api.Projects do
36353705
|> Response.decode(opts ++ [struct: %GoogleApi.DataMigration.V1.Model.Operation{}])
36363706
end
36373707

3708+
@doc """
3709+
Use this method to get details about a migration job object.
3710+
3711+
## Parameters
3712+
3713+
* `connection` (*type:* `GoogleApi.DataMigration.V1.Connection.t`) - Connection to server
3714+
* `name` (*type:* `String.t`) - Required. The name of the migration job object resource to get.
3715+
* `optional_params` (*type:* `keyword()`) - Optional parameters
3716+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
3717+
* `:access_token` (*type:* `String.t`) - OAuth access token.
3718+
* `:alt` (*type:* `String.t`) - Data format for response.
3719+
* `:callback` (*type:* `String.t`) - JSONP
3720+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
3721+
* `: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.
3722+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
3723+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
3724+
* `: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.
3725+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
3726+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
3727+
* `opts` (*type:* `keyword()`) - Call options
3728+
3729+
## Returns
3730+
3731+
* `{:ok, %GoogleApi.DataMigration.V1.Model.MigrationJobObject{}}` on success
3732+
* `{:error, info}` on failure
3733+
"""
3734+
@spec datamigration_projects_locations_migration_jobs_objects_get(
3735+
Tesla.Env.client(),
3736+
String.t(),
3737+
keyword(),
3738+
keyword()
3739+
) ::
3740+
{:ok, GoogleApi.DataMigration.V1.Model.MigrationJobObject.t()}
3741+
| {:ok, Tesla.Env.t()}
3742+
| {:ok, list()}
3743+
| {:error, any()}
3744+
def datamigration_projects_locations_migration_jobs_objects_get(
3745+
connection,
3746+
name,
3747+
optional_params \\ [],
3748+
opts \\ []
3749+
) do
3750+
optional_params_config = %{
3751+
:"$.xgafv" => :query,
3752+
:access_token => :query,
3753+
:alt => :query,
3754+
:callback => :query,
3755+
:fields => :query,
3756+
:key => :query,
3757+
:oauth_token => :query,
3758+
:prettyPrint => :query,
3759+
:quotaUser => :query,
3760+
:uploadType => :query,
3761+
:upload_protocol => :query
3762+
}
3763+
3764+
request =
3765+
Request.new()
3766+
|> Request.method(:get)
3767+
|> Request.url("/v1/{+name}", %{
3768+
"name" => URI.encode(name, &URI.char_unreserved?/1)
3769+
})
3770+
|> Request.add_optional_params(optional_params_config, optional_params)
3771+
|> Request.library_version(@library_version)
3772+
3773+
connection
3774+
|> Connection.execute(request)
3775+
|> Response.decode(opts ++ [struct: %GoogleApi.DataMigration.V1.Model.MigrationJobObject{}])
3776+
end
3777+
36383778
@doc """
36393779
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
36403780
@@ -3707,6 +3847,154 @@ defmodule GoogleApi.DataMigration.V1.Api.Projects do
37073847
|> Response.decode(opts ++ [struct: %GoogleApi.DataMigration.V1.Model.Policy{}])
37083848
end
37093849

3850+
@doc """
3851+
Use this method to list the objects of a specific migration job.
3852+
3853+
## Parameters
3854+
3855+
* `connection` (*type:* `GoogleApi.DataMigration.V1.Connection.t`) - Connection to server
3856+
* `parent` (*type:* `String.t`) - Required. The parent migration job that owns the collection of objects.
3857+
* `optional_params` (*type:* `keyword()`) - Optional parameters
3858+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
3859+
* `:access_token` (*type:* `String.t`) - OAuth access token.
3860+
* `:alt` (*type:* `String.t`) - Data format for response.
3861+
* `:callback` (*type:* `String.t`) - JSONP
3862+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
3863+
* `: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.
3864+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
3865+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
3866+
* `: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.
3867+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
3868+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
3869+
* `:pageSize` (*type:* `integer()`) - Maximum number of objects to return. Default is 50. The maximum value is 1000; values above 1000 will be coerced to 1000.
3870+
* `:pageToken` (*type:* `String.t`) - Page token received from a previous `ListMigrationJObObjectsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMigrationJobObjectsRequest` must match the call that provided the page token.
3871+
* `opts` (*type:* `keyword()`) - Call options
3872+
3873+
## Returns
3874+
3875+
* `{:ok, %GoogleApi.DataMigration.V1.Model.ListMigrationJobObjectsResponse{}}` on success
3876+
* `{:error, info}` on failure
3877+
"""
3878+
@spec datamigration_projects_locations_migration_jobs_objects_list(
3879+
Tesla.Env.client(),
3880+
String.t(),
3881+
keyword(),
3882+
keyword()
3883+
) ::
3884+
{:ok, GoogleApi.DataMigration.V1.Model.ListMigrationJobObjectsResponse.t()}
3885+
| {:ok, Tesla.Env.t()}
3886+
| {:ok, list()}
3887+
| {:error, any()}
3888+
def datamigration_projects_locations_migration_jobs_objects_list(
3889+
connection,
3890+
parent,
3891+
optional_params \\ [],
3892+
opts \\ []
3893+
) do
3894+
optional_params_config = %{
3895+
:"$.xgafv" => :query,
3896+
:access_token => :query,
3897+
:alt => :query,
3898+
:callback => :query,
3899+
:fields => :query,
3900+
:key => :query,
3901+
:oauth_token => :query,
3902+
:prettyPrint => :query,
3903+
:quotaUser => :query,
3904+
:uploadType => :query,
3905+
:upload_protocol => :query,
3906+
:pageSize => :query,
3907+
:pageToken => :query
3908+
}
3909+
3910+
request =
3911+
Request.new()
3912+
|> Request.method(:get)
3913+
|> Request.url("/v1/{+parent}/objects", %{
3914+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
3915+
})
3916+
|> Request.add_optional_params(optional_params_config, optional_params)
3917+
|> Request.library_version(@library_version)
3918+
3919+
connection
3920+
|> Connection.execute(request)
3921+
|> Response.decode(
3922+
opts ++ [struct: %GoogleApi.DataMigration.V1.Model.ListMigrationJobObjectsResponse{}]
3923+
)
3924+
end
3925+
3926+
@doc """
3927+
Use this method to look up a migration job object by its source object identifier.
3928+
3929+
## Parameters
3930+
3931+
* `connection` (*type:* `GoogleApi.DataMigration.V1.Connection.t`) - Connection to server
3932+
* `parent` (*type:* `String.t`) - Required. The parent migration job that owns the collection of objects.
3933+
* `optional_params` (*type:* `keyword()`) - Optional parameters
3934+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
3935+
* `:access_token` (*type:* `String.t`) - OAuth access token.
3936+
* `:alt` (*type:* `String.t`) - Data format for response.
3937+
* `:callback` (*type:* `String.t`) - JSONP
3938+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
3939+
* `: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.
3940+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
3941+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
3942+
* `: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.
3943+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
3944+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
3945+
* `:body` (*type:* `GoogleApi.DataMigration.V1.Model.LookupMigrationJobObjectRequest.t`) -
3946+
* `opts` (*type:* `keyword()`) - Call options
3947+
3948+
## Returns
3949+
3950+
* `{:ok, %GoogleApi.DataMigration.V1.Model.MigrationJobObject{}}` on success
3951+
* `{:error, info}` on failure
3952+
"""
3953+
@spec datamigration_projects_locations_migration_jobs_objects_lookup(
3954+
Tesla.Env.client(),
3955+
String.t(),
3956+
keyword(),
3957+
keyword()
3958+
) ::
3959+
{:ok, GoogleApi.DataMigration.V1.Model.MigrationJobObject.t()}
3960+
| {:ok, Tesla.Env.t()}
3961+
| {:ok, list()}
3962+
| {:error, any()}
3963+
def datamigration_projects_locations_migration_jobs_objects_lookup(
3964+
connection,
3965+
parent,
3966+
optional_params \\ [],
3967+
opts \\ []
3968+
) do
3969+
optional_params_config = %{
3970+
:"$.xgafv" => :query,
3971+
:access_token => :query,
3972+
:alt => :query,
3973+
:callback => :query,
3974+
:fields => :query,
3975+
:key => :query,
3976+
:oauth_token => :query,
3977+
:prettyPrint => :query,
3978+
:quotaUser => :query,
3979+
:uploadType => :query,
3980+
:upload_protocol => :query,
3981+
:body => :body
3982+
}
3983+
3984+
request =
3985+
Request.new()
3986+
|> Request.method(:post)
3987+
|> Request.url("/v1/{+parent}/objects:lookup", %{
3988+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
3989+
})
3990+
|> Request.add_optional_params(optional_params_config, optional_params)
3991+
|> Request.library_version(@library_version)
3992+
3993+
connection
3994+
|> Connection.execute(request)
3995+
|> Response.decode(opts ++ [struct: %GoogleApi.DataMigration.V1.Model.MigrationJobObject{}])
3996+
end
3997+
37103998
@doc """
37113999
Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
37124000
@@ -3854,7 +4142,7 @@ defmodule GoogleApi.DataMigration.V1.Api.Projects do
38544142
end
38554143

38564144
@doc """
3857-
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
4145+
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
38584146
38594147
## Parameters
38604148

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

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

23-
@discovery_revision "20241109"
23+
@discovery_revision "20241202"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/data_migration/lib/google_api/data_migration/v1/model/google_cloud_clouddms_v1_operation_metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule GoogleApi.DataMigration.V1.Model.GoogleCloudClouddmsV1OperationMetadat
2424
* `apiVersion` (*type:* `String.t`, *default:* `nil`) - Output only. API version used to start the operation.
2525
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation was created.
2626
* `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation finished running.
27-
* `requestedCancellation` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
27+
* `requestedCancellation` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
2828
* `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Human-readable status of the operation, if any.
2929
* `target` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined resource path for the target of the operation.
3030
* `verb` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the verb executed by the operation.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.DataMigration.V1.Model.ListMigrationJobObjectsResponse do
19+
@moduledoc """
20+
Response containing the objects for a migration job.
21+
22+
## Attributes
23+
24+
* `migrationJobObjects` (*type:* `list(GoogleApi.DataMigration.V1.Model.MigrationJobObject.t)`, *default:* `nil`) - List of migration job objects.
25+
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:migrationJobObjects =>
32+
list(GoogleApi.DataMigration.V1.Model.MigrationJobObject.t()) | nil,
33+
:nextPageToken => String.t() | nil
34+
}
35+
36+
field(:migrationJobObjects, as: GoogleApi.DataMigration.V1.Model.MigrationJobObject, type: :list)
37+
38+
field(:nextPageToken)
39+
end
40+
41+
defimpl Poison.Decoder, for: GoogleApi.DataMigration.V1.Model.ListMigrationJobObjectsResponse do
42+
def decode(value, options) do
43+
GoogleApi.DataMigration.V1.Model.ListMigrationJobObjectsResponse.decode(value, options)
44+
end
45+
end
46+
47+
defimpl Poison.Encoder, for: GoogleApi.DataMigration.V1.Model.ListMigrationJobObjectsResponse do
48+
def encode(value, options) do
49+
GoogleApi.Gax.ModelBase.encode(value, options)
50+
end
51+
end

0 commit comments

Comments
 (0)