xref: /aosp_15_r20/external/googleapis/google/cloud/clouddms/v1/clouddms.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.cloud.clouddms.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/clouddms/v1/clouddms_resources.proto";
24import "google/cloud/clouddms/v1/conversionworkspace_resources.proto";
25import "google/longrunning/operations.proto";
26import "google/protobuf/empty.proto";
27import "google/protobuf/field_mask.proto";
28import "google/protobuf/timestamp.proto";
29
30option csharp_namespace = "Google.Cloud.CloudDms.V1";
31option go_package = "cloud.google.com/go/clouddms/apiv1/clouddmspb;clouddmspb";
32option java_multiple_files = true;
33option java_outer_classname = "ClouddmsProto";
34option java_package = "com.google.cloud.clouddms.v1";
35option php_namespace = "Google\\Cloud\\CloudDms\\V1";
36option ruby_package = "Google::Cloud::CloudDMS::V1";
37
38// Database Migration service
39service DataMigrationService {
40  option (google.api.default_host) = "datamigration.googleapis.com";
41  option (google.api.oauth_scopes) =
42      "https://www.googleapis.com/auth/cloud-platform";
43
44  // Lists migration jobs in a given project and location.
45  rpc ListMigrationJobs(ListMigrationJobsRequest)
46      returns (ListMigrationJobsResponse) {
47    option (google.api.http) = {
48      get: "/v1/{parent=projects/*/locations/*}/migrationJobs"
49    };
50    option (google.api.method_signature) = "parent";
51  }
52
53  // Gets details of a single migration job.
54  rpc GetMigrationJob(GetMigrationJobRequest) returns (MigrationJob) {
55    option (google.api.http) = {
56      get: "/v1/{name=projects/*/locations/*/migrationJobs/*}"
57    };
58    option (google.api.method_signature) = "name";
59  }
60
61  // Creates a new migration job in a given project and location.
62  rpc CreateMigrationJob(CreateMigrationJobRequest)
63      returns (google.longrunning.Operation) {
64    option (google.api.http) = {
65      post: "/v1/{parent=projects/*/locations/*}/migrationJobs"
66      body: "migration_job"
67    };
68    option (google.api.method_signature) =
69        "parent,migration_job,migration_job_id";
70    option (google.longrunning.operation_info) = {
71      response_type: "MigrationJob"
72      metadata_type: "OperationMetadata"
73    };
74  }
75
76  // Updates the parameters of a single migration job.
77  rpc UpdateMigrationJob(UpdateMigrationJobRequest)
78      returns (google.longrunning.Operation) {
79    option (google.api.http) = {
80      patch: "/v1/{migration_job.name=projects/*/locations/*/migrationJobs/*}"
81      body: "migration_job"
82    };
83    option (google.api.method_signature) = "migration_job,update_mask";
84    option (google.longrunning.operation_info) = {
85      response_type: "MigrationJob"
86      metadata_type: "OperationMetadata"
87    };
88  }
89
90  // Deletes a single migration job.
91  rpc DeleteMigrationJob(DeleteMigrationJobRequest)
92      returns (google.longrunning.Operation) {
93    option (google.api.http) = {
94      delete: "/v1/{name=projects/*/locations/*/migrationJobs/*}"
95    };
96    option (google.api.method_signature) = "name";
97    option (google.longrunning.operation_info) = {
98      response_type: "google.protobuf.Empty"
99      metadata_type: "OperationMetadata"
100    };
101  }
102
103  // Start an already created migration job.
104  rpc StartMigrationJob(StartMigrationJobRequest)
105      returns (google.longrunning.Operation) {
106    option (google.api.http) = {
107      post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:start"
108      body: "*"
109    };
110    option (google.longrunning.operation_info) = {
111      response_type: "MigrationJob"
112      metadata_type: "OperationMetadata"
113    };
114  }
115
116  // Stops a running migration job.
117  rpc StopMigrationJob(StopMigrationJobRequest)
118      returns (google.longrunning.Operation) {
119    option (google.api.http) = {
120      post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:stop"
121      body: "*"
122    };
123    option (google.longrunning.operation_info) = {
124      response_type: "MigrationJob"
125      metadata_type: "OperationMetadata"
126    };
127  }
128
129  // Resume a migration job that is currently stopped and is resumable (was
130  // stopped during CDC phase).
131  rpc ResumeMigrationJob(ResumeMigrationJobRequest)
132      returns (google.longrunning.Operation) {
133    option (google.api.http) = {
134      post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:resume"
135      body: "*"
136    };
137    option (google.longrunning.operation_info) = {
138      response_type: "MigrationJob"
139      metadata_type: "OperationMetadata"
140    };
141  }
142
143  // Promote a migration job, stopping replication to the destination and
144  // promoting the destination to be a standalone database.
145  rpc PromoteMigrationJob(PromoteMigrationJobRequest)
146      returns (google.longrunning.Operation) {
147    option (google.api.http) = {
148      post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:promote"
149      body: "*"
150    };
151    option (google.longrunning.operation_info) = {
152      response_type: "MigrationJob"
153      metadata_type: "OperationMetadata"
154    };
155  }
156
157  // Verify a migration job, making sure the destination can reach the source
158  // and that all configuration and prerequisites are met.
159  rpc VerifyMigrationJob(VerifyMigrationJobRequest)
160      returns (google.longrunning.Operation) {
161    option (google.api.http) = {
162      post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:verify"
163      body: "*"
164    };
165    option (google.longrunning.operation_info) = {
166      response_type: "MigrationJob"
167      metadata_type: "OperationMetadata"
168    };
169  }
170
171  // Restart a stopped or failed migration job, resetting the destination
172  // instance to its original state and starting the migration process from
173  // scratch.
174  rpc RestartMigrationJob(RestartMigrationJobRequest)
175      returns (google.longrunning.Operation) {
176    option (google.api.http) = {
177      post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:restart"
178      body: "*"
179    };
180    option (google.longrunning.operation_info) = {
181      response_type: "MigrationJob"
182      metadata_type: "OperationMetadata"
183    };
184  }
185
186  // Generate a SSH configuration script to configure the reverse SSH
187  // connectivity.
188  rpc GenerateSshScript(GenerateSshScriptRequest) returns (SshScript) {
189    option (google.api.http) = {
190      post: "/v1/{migration_job=projects/*/locations/*/migrationJobs/*}:generateSshScript"
191      body: "*"
192    };
193  }
194
195  // Generate a TCP Proxy configuration script to configure a cloud-hosted VM
196  // running a TCP Proxy.
197  rpc GenerateTcpProxyScript(GenerateTcpProxyScriptRequest)
198      returns (TcpProxyScript) {
199    option (google.api.http) = {
200      post: "/v1/{migration_job=projects/*/locations/*/migrationJobs/*}:generateTcpProxyScript"
201      body: "*"
202    };
203  }
204
205  // Retrieves a list of all connection profiles in a given project and
206  // location.
207  rpc ListConnectionProfiles(ListConnectionProfilesRequest)
208      returns (ListConnectionProfilesResponse) {
209    option (google.api.http) = {
210      get: "/v1/{parent=projects/*/locations/*}/connectionProfiles"
211    };
212    option (google.api.method_signature) = "parent";
213  }
214
215  // Gets details of a single connection profile.
216  rpc GetConnectionProfile(GetConnectionProfileRequest)
217      returns (ConnectionProfile) {
218    option (google.api.http) = {
219      get: "/v1/{name=projects/*/locations/*/connectionProfiles/*}"
220    };
221    option (google.api.method_signature) = "name";
222  }
223
224  // Creates a new connection profile in a given project and location.
225  rpc CreateConnectionProfile(CreateConnectionProfileRequest)
226      returns (google.longrunning.Operation) {
227    option (google.api.http) = {
228      post: "/v1/{parent=projects/*/locations/*}/connectionProfiles"
229      body: "connection_profile"
230    };
231    option (google.api.method_signature) =
232        "parent,connection_profile,connection_profile_id";
233    option (google.longrunning.operation_info) = {
234      response_type: "ConnectionProfile"
235      metadata_type: "OperationMetadata"
236    };
237  }
238
239  // Update the configuration of a single connection profile.
240  rpc UpdateConnectionProfile(UpdateConnectionProfileRequest)
241      returns (google.longrunning.Operation) {
242    option (google.api.http) = {
243      patch: "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}"
244      body: "connection_profile"
245    };
246    option (google.api.method_signature) = "connection_profile,update_mask";
247    option (google.longrunning.operation_info) = {
248      response_type: "ConnectionProfile"
249      metadata_type: "OperationMetadata"
250    };
251  }
252
253  // Deletes a single Database Migration Service connection profile.
254  // A connection profile can only be deleted if it is not in use by any
255  // active migration jobs.
256  rpc DeleteConnectionProfile(DeleteConnectionProfileRequest)
257      returns (google.longrunning.Operation) {
258    option (google.api.http) = {
259      delete: "/v1/{name=projects/*/locations/*/connectionProfiles/*}"
260    };
261    option (google.api.method_signature) = "name";
262    option (google.longrunning.operation_info) = {
263      response_type: "google.protobuf.Empty"
264      metadata_type: "OperationMetadata"
265    };
266  }
267
268  // Creates a new private connection in a given project and location.
269  rpc CreatePrivateConnection(CreatePrivateConnectionRequest)
270      returns (google.longrunning.Operation) {
271    option (google.api.http) = {
272      post: "/v1/{parent=projects/*/locations/*}/privateConnections"
273      body: "private_connection"
274    };
275    option (google.api.method_signature) =
276        "parent,private_connection,private_connection_id";
277    option (google.longrunning.operation_info) = {
278      response_type: "PrivateConnection"
279      metadata_type: "OperationMetadata"
280    };
281  }
282
283  // Gets details of a single private connection.
284  rpc GetPrivateConnection(GetPrivateConnectionRequest)
285      returns (PrivateConnection) {
286    option (google.api.http) = {
287      get: "/v1/{name=projects/*/locations/*/privateConnections/*}"
288    };
289    option (google.api.method_signature) = "name";
290  }
291
292  // Retrieves a list of private connections in a given project and location.
293  rpc ListPrivateConnections(ListPrivateConnectionsRequest)
294      returns (ListPrivateConnectionsResponse) {
295    option (google.api.http) = {
296      get: "/v1/{parent=projects/*/locations/*}/privateConnections"
297    };
298    option (google.api.method_signature) = "parent";
299  }
300
301  // Deletes a single Database Migration Service private connection.
302  rpc DeletePrivateConnection(DeletePrivateConnectionRequest)
303      returns (google.longrunning.Operation) {
304    option (google.api.http) = {
305      delete: "/v1/{name=projects/*/locations/*/privateConnections/*}"
306    };
307    option (google.api.method_signature) = "name";
308    option (google.longrunning.operation_info) = {
309      response_type: "google.protobuf.Empty"
310      metadata_type: "OperationMetadata"
311    };
312  }
313
314  // Gets details of a single conversion workspace.
315  rpc GetConversionWorkspace(GetConversionWorkspaceRequest)
316      returns (ConversionWorkspace) {
317    option (google.api.http) = {
318      get: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}"
319    };
320    option (google.api.method_signature) = "name";
321  }
322
323  // Lists conversion workspaces in a given project and location.
324  rpc ListConversionWorkspaces(ListConversionWorkspacesRequest)
325      returns (ListConversionWorkspacesResponse) {
326    option (google.api.http) = {
327      get: "/v1/{parent=projects/*/locations/*}/conversionWorkspaces"
328    };
329    option (google.api.method_signature) = "parent";
330  }
331
332  // Creates a new conversion workspace in a given project and location.
333  rpc CreateConversionWorkspace(CreateConversionWorkspaceRequest)
334      returns (google.longrunning.Operation) {
335    option (google.api.http) = {
336      post: "/v1/{parent=projects/*/locations/*}/conversionWorkspaces"
337      body: "conversion_workspace"
338    };
339    option (google.api.method_signature) =
340        "parent,conversion_workspace,conversion_workspace_id";
341    option (google.longrunning.operation_info) = {
342      response_type: "ConversionWorkspace"
343      metadata_type: "OperationMetadata"
344    };
345  }
346
347  // Updates the parameters of a single conversion workspace.
348  rpc UpdateConversionWorkspace(UpdateConversionWorkspaceRequest)
349      returns (google.longrunning.Operation) {
350    option (google.api.http) = {
351      patch: "/v1/{conversion_workspace.name=projects/*/locations/*/conversionWorkspaces/*}"
352      body: "conversion_workspace"
353    };
354    option (google.api.method_signature) = "conversion_workspace,update_mask";
355    option (google.longrunning.operation_info) = {
356      response_type: "ConversionWorkspace"
357      metadata_type: "OperationMetadata"
358    };
359  }
360
361  // Deletes a single conversion workspace.
362  rpc DeleteConversionWorkspace(DeleteConversionWorkspaceRequest)
363      returns (google.longrunning.Operation) {
364    option (google.api.http) = {
365      delete: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}"
366    };
367    option (google.api.method_signature) = "name";
368    option (google.longrunning.operation_info) = {
369      response_type: "google.protobuf.Empty"
370      metadata_type: "OperationMetadata"
371    };
372  }
373
374  // Creates a new mapping rule for a given conversion workspace.
375  rpc CreateMappingRule(CreateMappingRuleRequest) returns (MappingRule) {
376    option (google.api.http) = {
377      post: "/v1/{parent=projects/*/locations/*/conversionWorkspaces/*}/mappingRules"
378      body: "mapping_rule"
379    };
380    option (google.api.method_signature) =
381        "parent,mapping_rule,mapping_rule_id";
382  }
383
384  // Deletes a single mapping rule.
385  rpc DeleteMappingRule(DeleteMappingRuleRequest)
386      returns (google.protobuf.Empty) {
387    option (google.api.http) = {
388      delete: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*/mappingRules/*}"
389    };
390    option (google.api.method_signature) = "name";
391  }
392
393  // Lists the mapping rules for a specific conversion workspace.
394  rpc ListMappingRules(ListMappingRulesRequest)
395      returns (ListMappingRulesResponse) {
396    option (google.api.http) = {
397      get: "/v1/{parent=projects/*/locations/*/conversionWorkspaces/*}/mappingRules"
398    };
399    option (google.api.method_signature) = "parent";
400  }
401
402  // Gets the details of a mapping rule.
403  rpc GetMappingRule(GetMappingRuleRequest) returns (MappingRule) {
404    option (google.api.http) = {
405      get: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*/mappingRules/*}"
406    };
407    option (google.api.method_signature) = "name";
408  }
409
410  // Imports a snapshot of the source database into the
411  // conversion workspace.
412  rpc SeedConversionWorkspace(SeedConversionWorkspaceRequest)
413      returns (google.longrunning.Operation) {
414    option (google.api.http) = {
415      post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:seed"
416      body: "*"
417    };
418    option (google.longrunning.operation_info) = {
419      response_type: "ConversionWorkspace"
420      metadata_type: "OperationMetadata"
421    };
422  }
423
424  // Imports the mapping rules for a given conversion workspace.
425  // Supports various formats of external rules files.
426  rpc ImportMappingRules(ImportMappingRulesRequest)
427      returns (google.longrunning.Operation) {
428    option (google.api.http) = {
429      post: "/v1/{parent=projects/*/locations/*/conversionWorkspaces/*}/mappingRules:import"
430      body: "*"
431    };
432    option (google.longrunning.operation_info) = {
433      response_type: "ConversionWorkspace"
434      metadata_type: "OperationMetadata"
435    };
436  }
437
438  // Creates a draft tree schema for the destination database.
439  rpc ConvertConversionWorkspace(ConvertConversionWorkspaceRequest)
440      returns (google.longrunning.Operation) {
441    option (google.api.http) = {
442      post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:convert"
443      body: "*"
444    };
445    option (google.longrunning.operation_info) = {
446      response_type: "ConversionWorkspace"
447      metadata_type: "OperationMetadata"
448    };
449  }
450
451  // Marks all the data in the conversion workspace as committed.
452  rpc CommitConversionWorkspace(CommitConversionWorkspaceRequest)
453      returns (google.longrunning.Operation) {
454    option (google.api.http) = {
455      post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:commit"
456      body: "*"
457    };
458    option (google.longrunning.operation_info) = {
459      response_type: "ConversionWorkspace"
460      metadata_type: "OperationMetadata"
461    };
462  }
463
464  // Rolls back a conversion workspace to the last committed snapshot.
465  rpc RollbackConversionWorkspace(RollbackConversionWorkspaceRequest)
466      returns (google.longrunning.Operation) {
467    option (google.api.http) = {
468      post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:rollback"
469      body: "*"
470    };
471    option (google.longrunning.operation_info) = {
472      response_type: "ConversionWorkspace"
473      metadata_type: "OperationMetadata"
474    };
475  }
476
477  // Applies draft tree onto a specific destination database.
478  rpc ApplyConversionWorkspace(ApplyConversionWorkspaceRequest)
479      returns (google.longrunning.Operation) {
480    option (google.api.http) = {
481      post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:apply"
482      body: "*"
483    };
484    option (google.longrunning.operation_info) = {
485      response_type: "ConversionWorkspace"
486      metadata_type: "OperationMetadata"
487    };
488  }
489
490  // Describes the database entities tree for a specific conversion workspace
491  // and a specific tree type.
492  //
493  // Database entities are not resources like conversion workspaces or mapping
494  // rules, and they can't be created, updated or deleted. Instead, they are
495  // simple data objects describing the structure of the client database.
496  rpc DescribeDatabaseEntities(DescribeDatabaseEntitiesRequest)
497      returns (DescribeDatabaseEntitiesResponse) {
498    option (google.api.http) = {
499      get: "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeDatabaseEntities"
500    };
501  }
502
503  // Searches/lists the background jobs for a specific
504  // conversion workspace.
505  //
506  // The background jobs are not resources like conversion workspaces or
507  // mapping rules, and they can't be created, updated or deleted.
508  // Instead, they are a way to expose the data plane jobs log.
509  rpc SearchBackgroundJobs(SearchBackgroundJobsRequest)
510      returns (SearchBackgroundJobsResponse) {
511    option (google.api.http) = {
512      get: "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:searchBackgroundJobs"
513    };
514  }
515
516  // Retrieves a list of committed revisions of a specific conversion
517  // workspace.
518  rpc DescribeConversionWorkspaceRevisions(
519      DescribeConversionWorkspaceRevisionsRequest)
520      returns (DescribeConversionWorkspaceRevisionsResponse) {
521    option (google.api.http) = {
522      get: "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeConversionWorkspaceRevisions"
523    };
524  }
525
526  // Fetches a set of static IP addresses that need to be allowlisted by the
527  // customer when using the static-IP connectivity method.
528  rpc FetchStaticIps(FetchStaticIpsRequest) returns (FetchStaticIpsResponse) {
529    option (google.api.http) = {
530      get: "/v1/{name=projects/*/locations/*}:fetchStaticIps"
531    };
532    option (google.api.method_signature) = "name";
533  }
534}
535
536// Retrieves a list of all migration jobs in a given project and location.
537message ListMigrationJobsRequest {
538  // Required. The parent which owns this collection of migrationJobs.
539  string parent = 1 [
540    (google.api.field_behavior) = REQUIRED,
541    (google.api.resource_reference) = {
542      child_type: "datamigration.googleapis.com/MigrationJob"
543    }
544  ];
545
546  // The maximum number of migration jobs to return. The service may return
547  // fewer than this value. If unspecified, at most 50 migration jobs will be
548  // returned. The maximum value is 1000; values above 1000 are coerced to
549  // 1000.
550  int32 page_size = 2;
551
552  // The nextPageToken value received in the previous call to
553  // migrationJobs.list, used in the subsequent request to retrieve the next
554  // page of results. On first call this should be left blank. When paginating,
555  // all other parameters provided to migrationJobs.list must match the call
556  // that provided the page token.
557  string page_token = 3;
558
559  // A filter expression that filters migration jobs listed in the response.
560  // The expression must specify the field name, a comparison operator, and the
561  // value that you want to use for filtering. The value must be a string,
562  // a number, or a boolean. The comparison operator must be
563  // either =, !=, >, or <. For example, list migration jobs created this year
564  // by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
565  // You can also filter nested fields. For example, you could specify
566  // **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
567  // jobs connecting through the specific SSH tunnel bastion.
568  string filter = 4;
569
570  // Sort the results based on the migration job name.
571  // Valid values are: "name", "name asc", and "name desc".
572  string order_by = 5;
573}
574
575// Response message for 'ListMigrationJobs' request.
576message ListMigrationJobsResponse {
577  // The list of migration jobs objects.
578  repeated MigrationJob migration_jobs = 1;
579
580  // A token which can be sent as `page_token` to retrieve the next page.
581  // If this field is omitted, there are no subsequent pages.
582  string next_page_token = 2;
583
584  // Locations that could not be reached.
585  repeated string unreachable = 3;
586}
587
588// Request message for 'GetMigrationJob' request.
589message GetMigrationJobRequest {
590  // Required. Name of the migration job resource to get.
591  string name = 1 [
592    (google.api.field_behavior) = REQUIRED,
593    (google.api.resource_reference) = {
594      type: "datamigration.googleapis.com/MigrationJob"
595    }
596  ];
597}
598
599// Request message to create a new Database Migration Service migration job
600// in the specified project and region.
601message CreateMigrationJobRequest {
602  // Required. The parent which owns this collection of migration jobs.
603  string parent = 1 [
604    (google.api.field_behavior) = REQUIRED,
605    (google.api.resource_reference) = {
606      child_type: "datamigration.googleapis.com/MigrationJob"
607    }
608  ];
609
610  // Required. The ID of the instance to create.
611  string migration_job_id = 2 [(google.api.field_behavior) = REQUIRED];
612
613  // Required. Represents a [migration
614  // job](https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs)
615  // object.
616  MigrationJob migration_job = 3 [(google.api.field_behavior) = REQUIRED];
617
618  // Optional. A unique ID used to identify the request. If the server receives
619  // two requests with the same ID, then the second request is ignored.
620  //
621  // It is recommended to always set this value to a UUID.
622  //
623  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
624  // (_), and hyphens (-). The maximum length is 40 characters.
625  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
626}
627
628// Request message for 'UpdateMigrationJob' request.
629message UpdateMigrationJobRequest {
630  // Required. Field mask is used to specify the fields to be overwritten by the
631  // update in the conversion workspace resource.
632  google.protobuf.FieldMask update_mask = 1
633      [(google.api.field_behavior) = REQUIRED];
634
635  // Required. The migration job parameters to update.
636  MigrationJob migration_job = 2 [(google.api.field_behavior) = REQUIRED];
637
638  // A unique ID used to identify the request. If the server receives two
639  // requests with the same ID, then the second request is ignored.
640  //
641  // It is recommended to always set this value to a UUID.
642  //
643  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
644  // (_), and hyphens (-). The maximum length is 40 characters.
645  string request_id = 3;
646}
647
648// Request message for 'DeleteMigrationJob' request.
649message DeleteMigrationJobRequest {
650  // Required. Name of the migration job resource to delete.
651  string name = 1 [
652    (google.api.field_behavior) = REQUIRED,
653    (google.api.resource_reference) = {
654      type: "datamigration.googleapis.com/MigrationJob"
655    }
656  ];
657
658  // A unique ID used to identify the request. If the server receives two
659  // requests with the same ID, then the second request is ignored.
660  //
661  // It is recommended to always set this value to a UUID.
662  //
663  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
664  // (_), and hyphens (-). The maximum length is 40 characters.
665  string request_id = 2;
666
667  // The destination CloudSQL connection profile is always deleted with the
668  // migration job. In case of force delete, the destination CloudSQL replica
669  // database is also deleted.
670  bool force = 3;
671}
672
673// Request message for 'StartMigrationJob' request.
674message StartMigrationJobRequest {
675  // Name of the migration job resource to start.
676  string name = 1 [(google.api.resource_reference) = {
677    type: "datamigration.googleapis.com/MigrationJob"
678  }];
679
680  // Optional. Start the migration job without running prior configuration
681  // verification. Defaults to `false`.
682  bool skip_validation = 2 [(google.api.field_behavior) = OPTIONAL];
683}
684
685// Request message for 'StopMigrationJob' request.
686message StopMigrationJobRequest {
687  // Name of the migration job resource to stop.
688  string name = 1 [(google.api.resource_reference) = {
689    type: "datamigration.googleapis.com/MigrationJob"
690  }];
691}
692
693// Request message for 'ResumeMigrationJob' request.
694message ResumeMigrationJobRequest {
695  // Name of the migration job resource to resume.
696  string name = 1 [(google.api.resource_reference) = {
697    type: "datamigration.googleapis.com/MigrationJob"
698  }];
699}
700
701// Request message for 'PromoteMigrationJob' request.
702message PromoteMigrationJobRequest {
703  // Name of the migration job resource to promote.
704  string name = 1 [(google.api.resource_reference) = {
705    type: "datamigration.googleapis.com/MigrationJob"
706  }];
707}
708
709// Request message for 'VerifyMigrationJob' request.
710message VerifyMigrationJobRequest {
711  // Name of the migration job resource to verify.
712  string name = 1 [(google.api.resource_reference) = {
713    type: "datamigration.googleapis.com/MigrationJob"
714  }];
715
716  // Optional. Field mask is used to specify the changed fields to be verified.
717  // It will not update the migration job.
718  google.protobuf.FieldMask update_mask = 2
719      [(google.api.field_behavior) = OPTIONAL];
720
721  // Optional. The changed migration job parameters to verify.
722  // It will not update the migration job.
723  MigrationJob migration_job = 3 [(google.api.field_behavior) = OPTIONAL];
724}
725
726// Request message for 'RestartMigrationJob' request.
727message RestartMigrationJobRequest {
728  // Name of the migration job resource to restart.
729  string name = 1 [(google.api.resource_reference) = {
730    type: "datamigration.googleapis.com/MigrationJob"
731  }];
732
733  // Optional. Restart the migration job without running prior configuration
734  // verification. Defaults to `false`.
735  bool skip_validation = 2 [(google.api.field_behavior) = OPTIONAL];
736}
737
738// Request message for 'GenerateSshScript' request.
739message GenerateSshScriptRequest {
740  // Name of the migration job resource to generate the SSH script.
741  string migration_job = 1 [(google.api.resource_reference) = {
742    type: "datamigration.googleapis.com/MigrationJob"
743  }];
744
745  // Required. Bastion VM Instance name to use or to create.
746  string vm = 2 [(google.api.field_behavior) = REQUIRED];
747
748  // The VM configuration
749  oneof vm_config {
750    // The VM creation configuration
751    VmCreationConfig vm_creation_config = 100;
752
753    // The VM selection configuration
754    VmSelectionConfig vm_selection_config = 101;
755  }
756
757  // The port that will be open on the bastion host.
758  int32 vm_port = 3;
759}
760
761// VM creation configuration message
762message VmCreationConfig {
763  // Required. VM instance machine type to create.
764  string vm_machine_type = 1 [(google.api.field_behavior) = REQUIRED];
765
766  // The Google Cloud Platform zone to create the VM in.
767  string vm_zone = 2;
768
769  // The subnet name the vm needs to be created in.
770  string subnet = 3;
771}
772
773// VM selection configuration message
774message VmSelectionConfig {
775  // Required. The Google Cloud Platform zone the VM is located.
776  string vm_zone = 1 [(google.api.field_behavior) = REQUIRED];
777}
778
779// Response message for 'GenerateSshScript' request.
780message SshScript {
781  // The ssh configuration script.
782  string script = 1;
783}
784
785// Request message for 'GenerateTcpProxyScript' request.
786message GenerateTcpProxyScriptRequest {
787  // Name of the migration job resource to generate the TCP Proxy script.
788  string migration_job = 1 [(google.api.resource_reference) = {
789    type: "datamigration.googleapis.com/MigrationJob"
790  }];
791
792  // Required. The name of the Compute instance that will host the proxy.
793  string vm_name = 2 [(google.api.field_behavior) = REQUIRED];
794
795  // Required. The type of the Compute instance that will host the proxy.
796  string vm_machine_type = 3 [(google.api.field_behavior) = REQUIRED];
797
798  // Optional. The Google Cloud Platform zone to create the VM in. The fully
799  // qualified name of the zone must be specified, including the region name,
800  // for example "us-central1-b". If not specified, uses the "-b" zone of the
801  // destination Connection Profile's region.
802  string vm_zone = 4 [(google.api.field_behavior) = OPTIONAL];
803
804  // Required. The name of the subnet the Compute instance will use for private
805  // connectivity. Must be supplied in the form of
806  // projects/{project}/regions/{region}/subnetworks/{subnetwork}.
807  // Note: the region for the subnet must match the Compute instance region.
808  string vm_subnet = 5 [(google.api.field_behavior) = REQUIRED];
809}
810
811// Response message for 'GenerateTcpProxyScript' request.
812message TcpProxyScript {
813  // The TCP Proxy configuration script.
814  string script = 1;
815}
816
817// Request message for 'ListConnectionProfiles' request.
818message ListConnectionProfilesRequest {
819  // Required. The parent which owns this collection of connection profiles.
820  string parent = 1 [
821    (google.api.field_behavior) = REQUIRED,
822    (google.api.resource_reference) = {
823      child_type: "datamigration.googleapis.com/ConnectionProfile"
824    }
825  ];
826
827  // The maximum number of connection profiles to return. The service may return
828  // fewer than this value. If unspecified, at most 50 connection profiles will
829  // be returned. The maximum value is 1000; values above 1000 are coerced
830  // to 1000.
831  int32 page_size = 2;
832
833  // A page token, received from a previous `ListConnectionProfiles` call.
834  // Provide this to retrieve the subsequent page.
835  //
836  // When paginating, all other parameters provided to `ListConnectionProfiles`
837  // must match the call that provided the page token.
838  string page_token = 3;
839
840  // A filter expression that filters connection profiles listed in the
841  // response. The expression must specify the field name, a comparison
842  // operator, and the value that you want to use for filtering. The value must
843  // be a string, a number, or a boolean. The comparison operator must be either
844  // =, !=, >, or <. For example, list connection profiles created this year by
845  // specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
846  // also filter nested fields. For example, you could specify **mySql.username
847  // = %lt;my_username%gt;** to list all connection profiles configured to
848  // connect with a specific username.
849  string filter = 4;
850
851  // A comma-separated list of fields to order results according to.
852  string order_by = 5;
853}
854
855// Response message for 'ListConnectionProfiles' request.
856message ListConnectionProfilesResponse {
857  // The response list of connection profiles.
858  repeated ConnectionProfile connection_profiles = 1;
859
860  // A token which can be sent as `page_token` to retrieve the next page.
861  // If this field is omitted, there are no subsequent pages.
862  string next_page_token = 2;
863
864  // Locations that could not be reached.
865  repeated string unreachable = 3;
866}
867
868// Request message for 'GetConnectionProfile' request.
869message GetConnectionProfileRequest {
870  // Required. Name of the connection profile resource to get.
871  string name = 1 [
872    (google.api.field_behavior) = REQUIRED,
873    (google.api.resource_reference) = {
874      type: "datamigration.googleapis.com/ConnectionProfile"
875    }
876  ];
877}
878
879// Request message for 'CreateConnectionProfile' request.
880message CreateConnectionProfileRequest {
881  // Required. The parent which owns this collection of connection profiles.
882  string parent = 1 [
883    (google.api.field_behavior) = REQUIRED,
884    (google.api.resource_reference) = {
885      child_type: "datamigration.googleapis.com/ConnectionProfile"
886    }
887  ];
888
889  // Required. The connection profile identifier.
890  string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED];
891
892  // Required. The create request body including the connection profile data
893  ConnectionProfile connection_profile = 3
894      [(google.api.field_behavior) = REQUIRED];
895
896  // Optional. A unique ID used to identify the request. If the server receives
897  // two requests with the same ID, then the second request is ignored.
898  //
899  // It is recommended to always set this value to a UUID.
900  //
901  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
902  // (_), and hyphens (-). The maximum length is 40 characters.
903  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
904
905  // Optional. Only validate the connection profile, but don't create any
906  // resources. The default is false. Only supported for Oracle connection
907  // profiles.
908  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
909
910  // Optional. Create the connection profile without validating it.
911  // The default is false.
912  // Only supported for Oracle connection profiles.
913  bool skip_validation = 6 [(google.api.field_behavior) = OPTIONAL];
914}
915
916// Request message for 'UpdateConnectionProfile' request.
917message UpdateConnectionProfileRequest {
918  // Required. Field mask is used to specify the fields to be overwritten by the
919  // update in the conversion workspace resource.
920  google.protobuf.FieldMask update_mask = 1
921      [(google.api.field_behavior) = REQUIRED];
922
923  // Required. The connection profile parameters to update.
924  ConnectionProfile connection_profile = 2
925      [(google.api.field_behavior) = REQUIRED];
926
927  // Optional. A unique ID used to identify the request. If the server receives
928  // two requests with the same ID, then the second request is ignored.
929  //
930  // It is recommended to always set this value to a UUID.
931  //
932  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
933  // (_), and hyphens (-). The maximum length is 40 characters.
934  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
935
936  // Optional. Only validate the connection profile, but don't update any
937  // resources. The default is false. Only supported for Oracle connection
938  // profiles.
939  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
940
941  // Optional. Update the connection profile without validating it.
942  // The default is false.
943  // Only supported for Oracle connection profiles.
944  bool skip_validation = 5 [(google.api.field_behavior) = OPTIONAL];
945}
946
947// Request message for 'DeleteConnectionProfile' request.
948message DeleteConnectionProfileRequest {
949  // Required. Name of the connection profile resource to delete.
950  string name = 1 [
951    (google.api.field_behavior) = REQUIRED,
952    (google.api.resource_reference) = {
953      type: "datamigration.googleapis.com/ConnectionProfile"
954    }
955  ];
956
957  // A unique ID used to identify the request. If the server receives two
958  // requests with the same ID, then the second request is ignored.
959  //
960  // It is recommended to always set this value to a UUID.
961  //
962  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
963  // (_), and hyphens (-). The maximum length is 40 characters.
964  string request_id = 2;
965
966  // In case of force delete, the CloudSQL replica database is also deleted
967  // (only for CloudSQL connection profile).
968  bool force = 3;
969}
970
971// Request message to create a new private connection in the specified project
972// and region.
973message CreatePrivateConnectionRequest {
974  // Required. The parent that owns the collection of PrivateConnections.
975  string parent = 1 [
976    (google.api.field_behavior) = REQUIRED,
977    (google.api.resource_reference) = {
978      child_type: "datamigration.googleapis.com/PrivateConnection"
979    }
980  ];
981
982  // Required. The private connection identifier.
983  string private_connection_id = 2 [(google.api.field_behavior) = REQUIRED];
984
985  // Required. The private connection resource to create.
986  PrivateConnection private_connection = 3
987      [(google.api.field_behavior) = REQUIRED];
988
989  // Optional. A unique ID used to identify the request. If the server receives
990  // two requests with the same ID, then the second request is ignored.
991  //
992  // It is recommended to always set this value to a UUID.
993  //
994  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
995  // (_), and hyphens (-). The maximum length is 40 characters.
996  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
997
998  // Optional. If set to true, will skip validations.
999  bool skip_validation = 5 [(google.api.field_behavior) = OPTIONAL];
1000}
1001
1002// Request message to retrieve a list of private connections in a given project
1003// and location.
1004message ListPrivateConnectionsRequest {
1005  // Required. The parent that owns the collection of private connections.
1006  string parent = 1 [
1007    (google.api.field_behavior) = REQUIRED,
1008    (google.api.resource_reference) = {
1009      child_type: "datamigration.googleapis.com/PrivateConnection"
1010    }
1011  ];
1012
1013  // Maximum number of private connections to return.
1014  // If unspecified, at most 50 private connections that are returned.
1015  // The maximum value is 1000; values above 1000 are coerced to 1000.
1016  int32 page_size = 2;
1017
1018  // Page token received from a previous `ListPrivateConnections` call.
1019  // Provide this to retrieve the subsequent page.
1020  //
1021  // When paginating, all other parameters provided to
1022  // `ListPrivateConnections` must match the call that provided the page
1023  // token.
1024  string page_token = 3;
1025
1026  // A filter expression that filters private connections listed in the
1027  // response. The expression must specify the field name, a comparison
1028  // operator, and the value that you want to use for filtering. The value must
1029  // be a string, a number, or a boolean. The comparison operator must be either
1030  // =, !=, >, or <. For example, list private connections created this year by
1031  // specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**.
1032  string filter = 4;
1033
1034  // Order by fields for the result.
1035  string order_by = 5;
1036}
1037
1038// Response message for 'ListPrivateConnections' request.
1039message ListPrivateConnectionsResponse {
1040  // List of private connections.
1041  repeated PrivateConnection private_connections = 1;
1042
1043  // A token which can be sent as `page_token` to retrieve the next page.
1044  // If this field is omitted, there are no subsequent pages.
1045  string next_page_token = 2;
1046
1047  // Locations that could not be reached.
1048  repeated string unreachable = 3;
1049}
1050
1051// Request message to delete a private connection.
1052message DeletePrivateConnectionRequest {
1053  // Required. The name of the private connection to delete.
1054  string name = 1 [
1055    (google.api.field_behavior) = REQUIRED,
1056    (google.api.resource_reference) = {
1057      type: "datamigration.googleapis.com/PrivateConnection"
1058    }
1059  ];
1060
1061  // Optional. A unique ID used to identify the request. If the server receives
1062  // two requests with the same ID, then the second request is ignored.
1063  //
1064  // It is recommended to always set this value to a UUID.
1065  //
1066  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
1067  // (_), and hyphens (-). The maximum length is 40 characters.
1068  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1069}
1070
1071// Request message to get a private connection resource.
1072message GetPrivateConnectionRequest {
1073  // Required. The name of the private connection to get.
1074  string name = 1 [
1075    (google.api.field_behavior) = REQUIRED,
1076    (google.api.resource_reference) = {
1077      type: "datamigration.googleapis.com/PrivateConnection"
1078    }
1079  ];
1080}
1081
1082// Represents the metadata of the long-running operation.
1083message OperationMetadata {
1084  // Output only. The time the operation was created.
1085  google.protobuf.Timestamp create_time = 1
1086      [(google.api.field_behavior) = OUTPUT_ONLY];
1087
1088  // Output only. The time the operation finished running.
1089  google.protobuf.Timestamp end_time = 2
1090      [(google.api.field_behavior) = OUTPUT_ONLY];
1091
1092  // Output only. Server-defined resource path for the target of the operation.
1093  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
1094
1095  // Output only. Name of the verb executed by the operation.
1096  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1097
1098  // Output only. Human-readable status of the operation, if any.
1099  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
1100
1101  // Output only. Identifies whether the user has requested cancellation
1102  // of the operation. Operations that have successfully been cancelled
1103  // have [Operation.error][] value with a
1104  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
1105  // `Code.CANCELLED`.
1106  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
1107
1108  // Output only. API version used to start the operation.
1109  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
1110}
1111
1112// Retrieve a list of all conversion workspaces in a given project and location.
1113message ListConversionWorkspacesRequest {
1114  // Required. The parent which owns this collection of conversion workspaces.
1115  string parent = 1 [
1116    (google.api.field_behavior) = REQUIRED,
1117    (google.api.resource_reference) = {
1118      child_type: "datamigration.googleapis.com/ConversionWorkspace"
1119    }
1120  ];
1121
1122  // The maximum number of conversion workspaces to return. The service may
1123  // return fewer than this value. If unspecified, at most 50 sets are returned.
1124  int32 page_size = 2;
1125
1126  // The nextPageToken value received in the previous call to
1127  // conversionWorkspaces.list, used in the subsequent request to retrieve the
1128  // next page of results. On first call this should be left blank. When
1129  // paginating, all other parameters provided to conversionWorkspaces.list must
1130  // match the call that provided the page token.
1131  string page_token = 3;
1132
1133  // A filter expression that filters conversion workspaces listed in the
1134  // response. The expression must specify the field name, a comparison
1135  // operator, and the value that you want to use for filtering. The value must
1136  // be a string, a number, or a boolean. The comparison operator must be either
1137  // =, !=, >, or <. For example, list conversion workspaces created this year
1138  // by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can
1139  // also filter nested fields. For example, you could specify
1140  // **source.version = "12.c.1"** to select all conversion workspaces with
1141  // source database version equal to 12.c.1.
1142  string filter = 4;
1143}
1144
1145// Response message for 'ListConversionWorkspaces' request.
1146message ListConversionWorkspacesResponse {
1147  // The list of conversion workspace objects.
1148  repeated ConversionWorkspace conversion_workspaces = 1;
1149
1150  // A token which can be sent as `page_token` to retrieve the next page.
1151  // If this field is omitted, there are no subsequent pages.
1152  string next_page_token = 2;
1153
1154  // Locations that could not be reached.
1155  repeated string unreachable = 3;
1156}
1157
1158// Request message for 'GetConversionWorkspace' request.
1159message GetConversionWorkspaceRequest {
1160  // Required. Name of the conversion workspace resource to get.
1161  string name = 1 [
1162    (google.api.field_behavior) = REQUIRED,
1163    (google.api.resource_reference) = {
1164      type: "datamigration.googleapis.com/ConversionWorkspace"
1165    }
1166  ];
1167}
1168
1169// Request message to create a new Conversion Workspace
1170// in the specified project and region.
1171message CreateConversionWorkspaceRequest {
1172  // Required. The parent which owns this collection of conversion workspaces.
1173  string parent = 1 [
1174    (google.api.field_behavior) = REQUIRED,
1175    (google.api.resource_reference) = {
1176      child_type: "datamigration.googleapis.com/ConversionWorkspace"
1177    }
1178  ];
1179
1180  // Required. The ID of the conversion workspace to create.
1181  string conversion_workspace_id = 2 [(google.api.field_behavior) = REQUIRED];
1182
1183  // Required. Represents a conversion workspace object.
1184  ConversionWorkspace conversion_workspace = 3
1185      [(google.api.field_behavior) = REQUIRED];
1186
1187  // A unique ID used to identify the request. If the server receives two
1188  // requests with the same ID, then the second request is ignored.
1189  //
1190  // It is recommended to always set this value to a UUID.
1191  //
1192  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
1193  // (_), and hyphens (-). The maximum length is 40 characters.
1194  string request_id = 4;
1195}
1196
1197// Request message for 'UpdateConversionWorkspace' request.
1198message UpdateConversionWorkspaceRequest {
1199  // Required. Field mask is used to specify the fields to be overwritten by the
1200  // update in the conversion workspace resource.
1201  google.protobuf.FieldMask update_mask = 1
1202      [(google.api.field_behavior) = REQUIRED];
1203
1204  // Required. The conversion workspace parameters to update.
1205  ConversionWorkspace conversion_workspace = 2
1206      [(google.api.field_behavior) = REQUIRED];
1207
1208  // A unique ID used to identify the request. If the server receives two
1209  // requests with the same ID, then the second request is ignored.
1210  //
1211  // It is recommended to always set this value to a UUID.
1212  //
1213  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
1214  // (_), and hyphens (-). The maximum length is 40 characters.
1215  string request_id = 3;
1216}
1217
1218// Request message for 'DeleteConversionWorkspace' request.
1219message DeleteConversionWorkspaceRequest {
1220  // Required. Name of the conversion workspace resource to delete.
1221  string name = 1 [
1222    (google.api.field_behavior) = REQUIRED,
1223    (google.api.resource_reference) = {
1224      type: "datamigration.googleapis.com/ConversionWorkspace"
1225    }
1226  ];
1227
1228  // A unique ID used to identify the request. If the server receives two
1229  // requests with the same ID, then the second request is ignored.
1230  //
1231  // It is recommended to always set this value to a UUID.
1232  //
1233  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
1234  // (_), and hyphens (-). The maximum length is 40 characters.
1235  string request_id = 2;
1236
1237  // Force delete the conversion workspace, even if there's a running migration
1238  // that is using the workspace.
1239  bool force = 3;
1240}
1241
1242// Request message for 'CommitConversionWorkspace' request.
1243message CommitConversionWorkspaceRequest {
1244  // Required. Name of the conversion workspace resource to commit.
1245  string name = 1 [
1246    (google.api.field_behavior) = REQUIRED,
1247    (google.api.resource_reference) = {
1248      type: "datamigration.googleapis.com/ConversionWorkspace"
1249    }
1250  ];
1251
1252  // Optional. Optional name of the commit.
1253  string commit_name = 2 [(google.api.field_behavior) = OPTIONAL];
1254}
1255
1256// Request message for 'RollbackConversionWorkspace' request.
1257message RollbackConversionWorkspaceRequest {
1258  // Required. Name of the conversion workspace resource to roll back to.
1259  string name = 1 [
1260    (google.api.field_behavior) = REQUIRED,
1261    (google.api.resource_reference) = {
1262      type: "datamigration.googleapis.com/ConversionWorkspace"
1263    }
1264  ];
1265}
1266
1267// Request message for 'ApplyConversionWorkspace' request.
1268message ApplyConversionWorkspaceRequest {
1269  // Required. The name of the conversion workspace resource for which to apply
1270  // the draft tree. Must be in the form of:
1271  //  projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1272  string name = 1 [
1273    (google.api.field_behavior) = REQUIRED,
1274    (google.api.resource_reference) = {
1275      type: "datamigration.googleapis.com/ConversionWorkspace"
1276    }
1277  ];
1278
1279  // Filter which entities to apply. Leaving this field empty will apply all of
1280  // the entities. Supports Google AIP 160 based filtering.
1281  string filter = 2;
1282
1283  // Optional. Only validates the apply process, but doesn't change the
1284  // destination database. Only works for PostgreSQL destination connection
1285  // profile.
1286  bool dry_run = 3 [(google.api.field_behavior) = OPTIONAL];
1287
1288  // Optional. Specifies whether the conversion workspace is to be committed
1289  // automatically after the apply.
1290  bool auto_commit = 4 [(google.api.field_behavior) = OPTIONAL];
1291
1292  // Which destination to use when applying the conversion workspace.
1293  oneof destination {
1294    // Optional. Fully qualified (Uri) name of the destination connection
1295    // profile.
1296    string connection_profile = 100 [(google.api.field_behavior) = OPTIONAL];
1297  }
1298}
1299
1300// Retrieve a list of all mapping rules in a given conversion workspace.
1301message ListMappingRulesRequest {
1302  // Required. Name of the conversion workspace resource whose mapping rules are
1303  // listed in the form of:
1304  // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1305  string parent = 1 [
1306    (google.api.field_behavior) = REQUIRED,
1307    (google.api.resource_reference) = {
1308      type: "datamigration.googleapis.com/ConversionWorkspace"
1309    }
1310  ];
1311
1312  // The maximum number of rules to return. The service may return
1313  // fewer than this value.
1314  int32 page_size = 2;
1315
1316  // The nextPageToken value received in the previous call to
1317  // mappingRules.list, used in the subsequent request to retrieve the next
1318  // page of results. On first call this should be left blank. When paginating,
1319  // all other parameters provided to mappingRules.list must match the call
1320  // that provided the page token.
1321  string page_token = 3;
1322}
1323
1324// Response message for 'ListMappingRulesRequest' request.
1325message ListMappingRulesResponse {
1326  // The list of conversion workspace mapping rules.
1327  repeated MappingRule mapping_rules = 1;
1328
1329  // A token which can be sent as `page_token` to retrieve the next page.
1330  // If this field is omitted, there are no subsequent pages.
1331  string next_page_token = 2;
1332}
1333
1334// Request message for 'GetMappingRule' request.
1335message GetMappingRuleRequest {
1336  // Required. Name of the mapping rule resource to get.
1337  // Example: conversionWorkspaces/123/mappingRules/rule123
1338  //
1339  // In order to retrieve a previous revision of the mapping rule, also provide
1340  // the revision ID.
1341  // Example:
1342  // conversionWorkspace/123/mappingRules/rule123@c7cfa2a8c7cfa2a8c7cfa2a8c7cfa2a8
1343  string name = 1 [
1344    (google.api.field_behavior) = REQUIRED,
1345    (google.api.resource_reference) = {
1346      type: "datamigration.googleapis.com/MappingRule"
1347    }
1348  ];
1349}
1350
1351// Request message for 'SeedConversionWorkspace' request.
1352message SeedConversionWorkspaceRequest {
1353  // Name of the conversion workspace resource to seed with new database
1354  // structure, in the form of:
1355  // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1356  string name = 1 [(google.api.resource_reference) = {
1357    type: "datamigration.googleapis.com/ConversionWorkspace"
1358  }];
1359
1360  // Should the conversion workspace be committed automatically after the
1361  // seed operation.
1362  bool auto_commit = 2;
1363
1364  // The input to be used for seeding the conversion workspace. The input can
1365  // either be from the source or destination databases and it can be provided
1366  // through a connection profile or a DDL file.
1367  oneof seed_from {
1368    // Optional. Fully qualified (Uri) name of the source connection profile.
1369    string source_connection_profile = 100
1370        [(google.api.field_behavior) = OPTIONAL];
1371
1372    // Optional. Fully qualified (Uri) name of the destination connection
1373    // profile.
1374    string destination_connection_profile = 101
1375        [(google.api.field_behavior) = OPTIONAL];
1376  }
1377}
1378
1379// Request message for 'ConvertConversionWorkspace' request.
1380message ConvertConversionWorkspaceRequest {
1381  // Name of the conversion workspace resource to convert in the form of:
1382  // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1383  string name = 1 [(google.api.resource_reference) = {
1384    type: "datamigration.googleapis.com/ConversionWorkspace"
1385  }];
1386
1387  // Optional. Specifies whether the conversion workspace is to be committed
1388  // automatically after the conversion.
1389  bool auto_commit = 4 [(google.api.field_behavior) = OPTIONAL];
1390
1391  // Optional. Filter the entities to convert. Leaving this field empty will
1392  // convert all of the entities. Supports Google AIP-160 style filtering.
1393  string filter = 5 [(google.api.field_behavior) = OPTIONAL];
1394
1395  // Optional. Automatically convert the full entity path for each entity
1396  // specified by the filter. For example, if the filter specifies a table, that
1397  // table schema (and database if there is one) will also be converted.
1398  bool convert_full_path = 6 [(google.api.field_behavior) = OPTIONAL];
1399}
1400
1401// Request message for 'ImportMappingRules' request.
1402message ImportMappingRulesRequest {
1403  // Details of a single rules file.
1404  message RulesFile {
1405    // Required. The filename of the rules that needs to be converted. The
1406    // filename is used mainly so that future logs of the import rules job
1407    // contain it, and can therefore be searched by it.
1408    string rules_source_filename = 1 [(google.api.field_behavior) = REQUIRED];
1409
1410    // Required. The text content of the rules that needs to be converted.
1411    string rules_content = 2 [(google.api.field_behavior) = REQUIRED];
1412  }
1413
1414  // Required. Name of the conversion workspace resource to import the rules to
1415  // in the form of:
1416  // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1417  string parent = 1 [
1418    (google.api.field_behavior) = REQUIRED,
1419    (google.api.resource_reference) = {
1420      type: "datamigration.googleapis.com/ConversionWorkspace"
1421    }
1422  ];
1423
1424  // Required. The format of the rules content file.
1425  ImportRulesFileFormat rules_format = 2
1426      [(google.api.field_behavior) = REQUIRED];
1427
1428  // Required. One or more rules files.
1429  repeated RulesFile rules_files = 3 [(google.api.field_behavior) = REQUIRED];
1430
1431  // Required. Should the conversion workspace be committed automatically after
1432  // the import operation.
1433  bool auto_commit = 6 [(google.api.field_behavior) = REQUIRED];
1434}
1435
1436// Request message for 'DescribeDatabaseEntities' request.
1437message DescribeDatabaseEntitiesRequest {
1438  // The type of a tree to return
1439  enum DBTreeType {
1440    // Unspecified tree type.
1441    DB_TREE_TYPE_UNSPECIFIED = 0;
1442
1443    // The source database tree.
1444    SOURCE_TREE = 1;
1445
1446    // The draft database tree.
1447    DRAFT_TREE = 2;
1448
1449    // The destination database tree.
1450    DESTINATION_TREE = 3;
1451  }
1452
1453  // Required. Name of the conversion workspace resource whose database entities
1454  // are described. Must be in the form of:
1455  // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1456  string conversion_workspace = 1 [
1457    (google.api.field_behavior) = REQUIRED,
1458    (google.api.resource_reference) = {
1459      type: "datamigration.googleapis.com/ConversionWorkspace"
1460    }
1461  ];
1462
1463  // Optional. The maximum number of entities to return. The service may return
1464  // fewer entities than the value specifies.
1465  int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
1466
1467  // Optional. The nextPageToken value received in the previous call to
1468  // conversionWorkspace.describeDatabaseEntities, used in the subsequent
1469  // request to retrieve the next page of results. On first call this should be
1470  // left blank. When paginating, all other parameters provided to
1471  // conversionWorkspace.describeDatabaseEntities must match the call that
1472  // provided the page token.
1473  string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
1474
1475  // Required. The tree to fetch.
1476  DBTreeType tree = 6 [(google.api.field_behavior) = REQUIRED];
1477
1478  // Optional. Whether to retrieve the latest committed version of the entities
1479  // or the latest version. This field is ignored if a specific commit_id is
1480  // specified.
1481  bool uncommitted = 11 [(google.api.field_behavior) = OPTIONAL];
1482
1483  // Optional. Request a specific commit ID. If not specified, the entities from
1484  // the latest commit are returned.
1485  string commit_id = 12 [(google.api.field_behavior) = OPTIONAL];
1486
1487  // Optional. Filter the returned entities based on AIP-160 standard.
1488  string filter = 13 [(google.api.field_behavior) = OPTIONAL];
1489
1490  // Optional. Results view based on AIP-157
1491  DatabaseEntityView view = 14 [(google.api.field_behavior) = OPTIONAL];
1492}
1493
1494// Response message for 'DescribeDatabaseEntities' request.
1495message DescribeDatabaseEntitiesResponse {
1496  // The list of database entities for the conversion workspace.
1497  repeated DatabaseEntity database_entities = 1;
1498
1499  // A token which can be sent as `page_token` to retrieve the next page.
1500  // If this field is omitted, there are no subsequent pages.
1501  string next_page_token = 2;
1502}
1503
1504// Request message for 'SearchBackgroundJobs' request.
1505message SearchBackgroundJobsRequest {
1506  // Required. Name of the conversion workspace resource whose jobs are listed,
1507  // in the form of:
1508  // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1509  string conversion_workspace = 1 [
1510    (google.api.field_behavior) = REQUIRED,
1511    (google.api.resource_reference) = {
1512      type: "datamigration.googleapis.com/ConversionWorkspace"
1513    }
1514  ];
1515
1516  // Optional. Whether or not to return just the most recent job per job type,
1517  bool return_most_recent_per_job_type = 2
1518      [(google.api.field_behavior) = OPTIONAL];
1519
1520  // Optional. The maximum number of jobs to return. The service may return
1521  // fewer than this value. If unspecified, at most 100 jobs are
1522  // returned. The maximum value is 100; values above 100 are coerced to
1523  // 100.
1524  int32 max_size = 3 [(google.api.field_behavior) = OPTIONAL];
1525
1526  // Optional. If provided, only returns jobs that completed until (not
1527  // including) the given timestamp.
1528  google.protobuf.Timestamp completed_until_time = 4
1529      [(google.api.field_behavior) = OPTIONAL];
1530}
1531
1532// Response message for 'SearchBackgroundJobs' request.
1533message SearchBackgroundJobsResponse {
1534  // The list of conversion workspace mapping rules.
1535  repeated BackgroundJobLogEntry jobs = 1;
1536}
1537
1538// Request message for 'DescribeConversionWorkspaceRevisions' request.
1539message DescribeConversionWorkspaceRevisionsRequest {
1540  // Required. Name of the conversion workspace resource whose revisions are
1541  // listed. Must be in the form of:
1542  // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1543  string conversion_workspace = 1 [
1544    (google.api.field_behavior) = REQUIRED,
1545    (google.api.resource_reference) = {
1546      type: "datamigration.googleapis.com/ConversionWorkspace"
1547    }
1548  ];
1549
1550  // Optional. Optional filter to request a specific commit ID.
1551  string commit_id = 2 [(google.api.field_behavior) = OPTIONAL];
1552}
1553
1554// Response message for 'DescribeConversionWorkspaceRevisions' request.
1555message DescribeConversionWorkspaceRevisionsResponse {
1556  // The list of conversion workspace revisions.
1557  repeated ConversionWorkspace revisions = 1;
1558}
1559
1560// Request message for 'CreateMappingRule' command.
1561message CreateMappingRuleRequest {
1562  // Required. The parent which owns this collection of mapping rules.
1563  string parent = 1 [
1564    (google.api.field_behavior) = REQUIRED,
1565    (google.api.resource_reference) = {
1566      child_type: "datamigration.googleapis.com/MappingRule"
1567    }
1568  ];
1569
1570  // Required. The ID of the rule to create.
1571  string mapping_rule_id = 2 [(google.api.field_behavior) = REQUIRED];
1572
1573  // Required. Represents a [mapping rule]
1574  // (https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.mappingRules)
1575  // object.
1576  MappingRule mapping_rule = 3 [(google.api.field_behavior) = REQUIRED];
1577
1578  // A unique ID used to identify the request. If the server receives two
1579  // requests with the same ID, then the second request is ignored.
1580  //
1581  // It is recommended to always set this value to a UUID.
1582  //
1583  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
1584  // (_), and hyphens (-). The maximum length is 40 characters.
1585  string request_id = 4;
1586}
1587
1588// Request message for 'DeleteMappingRule' request.
1589message DeleteMappingRuleRequest {
1590  // Required. Name of the mapping rule resource to delete.
1591  string name = 1 [
1592    (google.api.field_behavior) = REQUIRED,
1593    (google.api.resource_reference) = {
1594      child_type: "datamigration.googleapis.com/MappingRule"
1595    }
1596  ];
1597
1598  // Optional. A unique ID used to identify the request. If the server receives
1599  // two requests with the same ID, then the second request is ignored.
1600  //
1601  // It is recommended to always set this value to a UUID.
1602  //
1603  // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
1604  // (_), and hyphens (-). The maximum length is 40 characters.
1605  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1606}
1607
1608// Request message for 'FetchStaticIps' request.
1609message FetchStaticIpsRequest {
1610  // Required. The resource name for the location for which static IPs should be
1611  // returned. Must be in the format `projects/*/locations/*`.
1612  string name = 1 [
1613    (google.api.field_behavior) = REQUIRED,
1614    (google.api.resource_reference) = {
1615      type: "locations.googleapis.com/Location"
1616    }
1617  ];
1618
1619  // Maximum number of IPs to return.
1620  int32 page_size = 2;
1621
1622  // A page token, received from a previous `FetchStaticIps` call.
1623  string page_token = 3;
1624}
1625
1626// Response message for a 'FetchStaticIps' request.
1627message FetchStaticIpsResponse {
1628  // List of static IPs.
1629  repeated string static_ips = 1;
1630
1631  // A token that can be sent as `page_token` to retrieve the next page.
1632  // If this field is omitted, there are no subsequent pages.
1633  string next_page_token = 2;
1634}
1635
1636// AIP-157 Partial Response view for Database Entity.
1637enum DatabaseEntityView {
1638  // Unspecified view. Defaults to basic view.
1639  DATABASE_ENTITY_VIEW_UNSPECIFIED = 0;
1640
1641  // Default view. Does not return DDLs or Issues.
1642  DATABASE_ENTITY_VIEW_BASIC = 1;
1643
1644  // Return full entity details including mappings, ddl and issues.
1645  DATABASE_ENTITY_VIEW_FULL = 2;
1646
1647  // Top-most (Database, Schema) nodes which are returned contains summary
1648  // details for their decendents such as the number of entities per type and
1649  // issues rollups. When this view is used, only a single page of result is
1650  // returned and the page_size property of the request is ignored. The
1651  // returned page will only include the top-most node types.
1652  DATABASE_ENTITY_VIEW_ROOT_SUMMARY = 3;
1653}
1654