Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: added library for Cloud Domains v1 API. Also added methods for …
Browse files Browse the repository at this point in the history
…the transfer-in flow

docs: improved API comments
Added Cloud Domains v1 API.
Also added support for transferring already registered domains from 3rd party domain registrars to Cloud Domains.
PiperOrigin-RevId: 404189502
Source-Link: googleapis/googleapis@6990d97
Source-Link: googleapis/googleapis-gen@36bf228
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzZiZjIyOGFhNzAxNmQ3YjUxMzk5MGU4NGQ2Njc2MmE4ODlmMmYwOSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Oct 19, 2021
1 parent dd8cf7c commit ce97a96
Show file tree
Hide file tree
Showing 66 changed files with 36,104 additions and 6,484 deletions.
1,147 changes: 1,147 additions & 0 deletions protos/google/cloud/domains/v1/domains.proto

Large diffs are not rendered by default.

232 changes: 198 additions & 34 deletions protos/google/cloud/domains/v1alpha2/domains.proto

Large diffs are not rendered by default.

232 changes: 198 additions & 34 deletions protos/google/cloud/domains/v1beta1/domains.proto

Large diffs are not rendered by default.

6,178 changes: 5,443 additions & 735 deletions protos/protos.d.ts

Large diffs are not rendered by default.

23,146 changes: 17,519 additions & 5,627 deletions protos/protos.js

Large diffs are not rendered by default.

1,501 changes: 1,499 additions & 2 deletions protos/protos.json

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions samples/generated/v1/domains.configure_contact_settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Copyright 2021 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
//
// http://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.

'use strict';

function main(registration, updateMask) {
// [START domains_v1_generated_Domains_ConfigureContactSettings_async]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the `Registration` whose contact settings are being updated,
* in the format `projects/* /locations/* /registrations/*`.
*/
// const registration = 'abc123'
/**
* Fields of the `ContactSettings` to update.
*/
// const contactSettings = ''
/**
* Required. The field mask describing which fields to update as a comma-separated list.
* For example, if only the registrant contact is being updated, the
* `update_mask` is `"registrant_contact"`.
*/
// const updateMask = ''
/**
* The list of contact notices that the caller acknowledges. The notices
* needed here depend on the values specified in `contact_settings`.
*/
// const contactNotices = 1234
/**
* Validate the request without actually updating the contact settings.
*/
// const validateOnly = true

// Imports the Domains library
const {DomainsClient} = require('@google-cloud/domains').v1;

// Instantiates a client
const domainsClient = new DomainsClient();

async function configureContactSettings() {
// Construct request
const request = {
registration,
updateMask,
};

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

configureContactSettings();
// [END domains_v1_generated_Domains_ConfigureContactSettings_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
74 changes: 74 additions & 0 deletions samples/generated/v1/domains.configure_dns_settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Copyright 2021 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
//
// http://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.

'use strict';

function main(registration, updateMask) {
// [START domains_v1_generated_Domains_ConfigureDnsSettings_async]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the `Registration` whose DNS settings are being updated,
* in the format `projects/* /locations/* /registrations/*`.
*/
// const registration = 'abc123'
/**
* Fields of the `DnsSettings` to update.
*/
// const dnsSettings = ''
/**
* Required. The field mask describing which fields to update as a comma-separated list.
* For example, if only the name servers are being updated for an existing
* Custom DNS configuration, the `update_mask` is
* `"custom_dns.name_servers"`.
* When changing the DNS provider from one type to another, pass the new
* provider's field name as part of the field mask. For example, when changing
* from a Google Domains DNS configuration to a Custom DNS configuration, the
* `update_mask` is `"custom_dns"`. //
*/
// const updateMask = ''
/**
* Validate the request without actually updating the DNS settings.
*/
// const validateOnly = true

// Imports the Domains library
const {DomainsClient} = require('@google-cloud/domains').v1;

// Instantiates a client
const domainsClient = new DomainsClient();

async function configureDnsSettings() {
// Construct request
const request = {
registration,
updateMask,
};

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

configureDnsSettings();
// [END domains_v1_generated_Domains_ConfigureDnsSettings_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
67 changes: 67 additions & 0 deletions samples/generated/v1/domains.configure_management_settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Copyright 2021 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
//
// http://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.

'use strict';

function main(registration, updateMask) {
// [START domains_v1_generated_Domains_ConfigureManagementSettings_async]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the `Registration` whose management settings are being updated,
* in the format `projects/* /locations/* /registrations/*`.
*/
// const registration = 'abc123'
/**
* Fields of the `ManagementSettings` to update.
*/
// const managementSettings = ''
/**
* Required. The field mask describing which fields to update as a comma-separated list.
* For example, if only the transfer lock is being updated, the `update_mask`
* is `"transfer_lock_state"`.
*/
// const updateMask = ''

// Imports the Domains library
const {DomainsClient} = require('@google-cloud/domains').v1;

// Instantiates a client
const domainsClient = new DomainsClient();

async function configureManagementSettings() {
// Construct request
const request = {
registration,
updateMask,
};

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

configureManagementSettings();
// [END domains_v1_generated_Domains_ConfigureManagementSettings_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
54 changes: 54 additions & 0 deletions samples/generated/v1/domains.delete_registration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright 2021 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
//
// http://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.

'use strict';

function main(name) {
// [START domains_v1_generated_Domains_DeleteRegistration_async]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the `Registration` to delete,
* in the format `projects/* /locations/* /registrations/*`.
*/
// const name = 'abc123'

// Imports the Domains library
const {DomainsClient} = require('@google-cloud/domains').v1;

// Instantiates a client
const domainsClient = new DomainsClient();

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

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

deleteRegistration();
// [END domains_v1_generated_Domains_DeleteRegistration_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
54 changes: 54 additions & 0 deletions samples/generated/v1/domains.export_registration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright 2021 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
//
// http://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.

'use strict';

function main(name) {
// [START domains_v1_generated_Domains_ExportRegistration_async]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the `Registration` to export,
* in the format `projects/* /locations/* /registrations/*`.
*/
// const name = 'abc123'

// Imports the Domains library
const {DomainsClient} = require('@google-cloud/domains').v1;

// Instantiates a client
const domainsClient = new DomainsClient();

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

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

exportRegistration();
// [END domains_v1_generated_Domains_ExportRegistration_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
53 changes: 53 additions & 0 deletions samples/generated/v1/domains.get_registration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Copyright 2021 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
//
// http://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.

'use strict';

function main(name) {
// [START domains_v1_generated_Domains_GetRegistration_async]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the `Registration` to get, in the format
* `projects/* /locations/* /registrations/*`.
*/
// const name = 'abc123'

// Imports the Domains library
const {DomainsClient} = require('@google-cloud/domains').v1;

// Instantiates a client
const domainsClient = new DomainsClient();

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

// Run request
const response = await domainsClient.getRegistration(request);
console.log(response);
}

getRegistration();
// [END domains_v1_generated_Domains_GetRegistration_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Loading

0 comments on commit ce97a96

Please sign in to comment.