Skip to content

Commit

Permalink
feat: [clouddms] add Oracle to PostgreSQL migration APIs (#4285)
Browse files Browse the repository at this point in the history
* feat: add Oracle to PostgreSQL migration APIs

PiperOrigin-RevId: 533037268

Source-Link: googleapis/googleapis@d45c9a2

Source-Link: googleapis/googleapis-gen@40c3304
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNsb3VkZG1zLy5Pd2xCb3QueWFtbCIsImgiOiI0MGMzMzA0M2UzZDc5YTBkZDM4ZWMyOWRhYmRlNjY0OTBkY2NlODA5In0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Denis DelGrosso <[email protected]>
  • Loading branch information
3 people authored May 18, 2023
1 parent f064ec1 commit 65fadd5
Show file tree
Hide file tree
Showing 42 changed files with 57,922 additions and 12,738 deletions.
60 changes: 39 additions & 21 deletions packages/google-cloud-clouddms/README.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10,218 changes: 9,210 additions & 1,008 deletions packages/google-cloud-clouddms/protos/protos.d.ts

Large diffs are not rendered by default.

39,194 changes: 30,099 additions & 9,095 deletions packages/google-cloud-clouddms/protos/protos.js

Large diffs are not rendered by default.

3,639 changes: 2,923 additions & 716 deletions packages/google-cloud-clouddms/protos/protos.json

Large diffs are not rendered by default.

356 changes: 340 additions & 16 deletions packages/google-cloud-clouddms/samples/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(name) {
// [START datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the conversion workspace resource for which to apply
* the draft tree. Must be in the form of:
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
*/
// const name = 'abc123'
/**
* Filter which entities to apply. Leaving this field empty will apply all of
* the entities. Supports Google AIP 160 based filtering.
*/
// const filter = 'abc123'
/**
* Fully qualified (Uri) name of the destination connection profile.
*/
// const connectionProfile = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callApplyConversionWorkspace() {
// Construct request
const request = {
name,
};

// Run request
const [operation] = await clouddmsClient.applyConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callApplyConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(name) {
// [START datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the conversion workspace resource to commit.
*/
// const name = 'abc123'
/**
* Optional. Optional name of the commit.
*/
// const commitName = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callCommitConversionWorkspace() {
// Construct request
const request = {
name,
};

// Run request
const [operation] = await clouddmsClient.commitConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callCommitConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main() {
// [START datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Name of the conversion workspace resource to convert in the form of:
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
*/
// const name = 'abc123'
/**
* Specifies whether the conversion workspace is to be committed automatically
* after the conversion.
*/
// const autoCommit = true
/**
* Filter the entities to convert. Leaving this field empty will convert all
* of the entities. Supports Google AIP-160 style filtering.
*/
// const filter = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callConvertConversionWorkspace() {
// Construct request
const request = {
};

// Run request
const [operation] = await clouddmsClient.convertConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callConvertConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function main(parent, connectionProfileId, connectionProfile) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent, which owns this collection of connection profiles.
* Required. The parent which owns this collection of connection profiles.
*/
// const parent = 'abc123'
/**
Expand All @@ -41,13 +41,25 @@ function main(parent, connectionProfileId, connectionProfile) {
*/
// const connectionProfile = {}
/**
* A unique id used to identify the request. If the server receives two
* requests with the same id, then the second request will be ignored.
* Optional. A unique ID used to identify the request. If the server receives
* two requests with the same ID, then the second request is ignored.
* It is recommended to always set this value to a UUID.
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
* The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
/**
* Optional. Only validate the connection profile, but don't create any
* resources. The default is false. Only supported for Oracle connection
* profiles.
*/
// const validateOnly = true
/**
* Optional. Create the connection profile without validating it.
* The default is false.
* Only supported for Oracle connection profiles.
*/
// const skipValidation = true

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(parent, conversionWorkspaceId, conversionWorkspace) {
// [START datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent which owns this collection of conversion workspaces.
*/
// const parent = 'abc123'
/**
* Required. The ID of the conversion workspace to create.
*/
// const conversionWorkspaceId = 'abc123'
/**
* Required. Represents a conversion workspace object.
*/
// const conversionWorkspace = {}
/**
* A unique ID used to identify the request. If the server receives two
* requests with the same ID, then the second request is ignored.
* It is recommended to always set this value to a UUID.
* The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'

// Imports the Clouddms library
const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

// Instantiates a client
const clouddmsClient = new DataMigrationServiceClient();

async function callCreateConversionWorkspace() {
// Construct request
const request = {
parent,
conversionWorkspaceId,
conversionWorkspace,
};

// Run request
const [operation] = await clouddmsClient.createConversionWorkspace(request);
const [response] = await operation.promise();
console.log(response);
}

callCreateConversionWorkspace();
// [END datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function main(parent, migrationJobId, migrationJob) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent, which owns this collection of migration jobs.
* Required. The parent which owns this collection of migration jobs.
*/
// const parent = 'abc123'
/**
Expand All @@ -43,10 +43,10 @@ function main(parent, migrationJobId, migrationJob) {
*/
// const migrationJob = {}
/**
* A unique id used to identify the request. If the server receives two
* requests with the same id, then the second request will be ignored.
* A unique ID used to identify the request. If the server receives two
* requests with the same ID, then the second request is ignored.
* It is recommended to always set this value to a UUID.
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
* The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
* (_), and hyphens (-). The maximum length is 40 characters.
*/
// const requestId = 'abc123'
Expand Down
Loading

0 comments on commit 65fadd5

Please sign in to comment.