diff --git a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-orchestration-airflow-service/linkinator.config.json +++ b/packages/google-cloud-orchestration-airflow-service/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js index e92ad59d511..3ab48282295 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.create_environment.js @@ -27,7 +27,7 @@ function main() { /** * The environment to create. */ - // const environment = '' + // const environment = {} // Imports the Service library const {EnvironmentsClient} = @@ -36,7 +36,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function createEnvironment() { + async function callCreateEnvironment() { // Construct request const request = {}; @@ -46,7 +46,7 @@ function main() { console.log(response); } - createEnvironment(); + callCreateEnvironment(); // [END composer_v1_generated_Environments_CreateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js index 9754547ac28..30ef43b0af5 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.delete_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function deleteEnvironment() { + async function callDeleteEnvironment() { // Construct request const request = {}; @@ -42,7 +42,7 @@ function main() { console.log(response); } - deleteEnvironment(); + callDeleteEnvironment(); // [END composer_v1_generated_Environments_DeleteEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js index b2260d9b8c0..59500ab77c9 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.get_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function getEnvironment() { + async function callGetEnvironment() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - getEnvironment(); + callGetEnvironment(); // [END composer_v1_generated_Environments_GetEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js index 632ef6d66c2..044a5a371ed 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.list_environments.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function listEnvironments() { + async function callListEnvironments() { // Construct request const request = {}; @@ -51,7 +51,7 @@ function main() { } } - listEnvironments(); + callListEnvironments(); // [END composer_v1_generated_Environments_ListEnvironments_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js index e06225ccd46..a0341b3d01e 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/environments.update_environment.js @@ -28,7 +28,7 @@ function main() { * A patch environment. Fields specified by the `updateMask` will be copied * from the patch environment into the environment under update. */ - // const environment = '' + // const environment = {} /** * Required. A comma-separated list of paths, relative to `Environment`, of * fields to update. @@ -135,7 +135,7 @@ function main() { * It is an error to provide both this mask and a mask specifying one or * more individual environment variables. */ - // const updateMask = '' + // const updateMask = {} // Imports the Service library const {EnvironmentsClient} = @@ -144,7 +144,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function updateEnvironment() { + async function callUpdateEnvironment() { // Construct request const request = {}; @@ -154,7 +154,7 @@ function main() { console.log(response); } - updateEnvironment(); + callUpdateEnvironment(); // [END composer_v1_generated_Environments_UpdateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js index cac3944304a..aeb89d63b91 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/image_versions.list_image_versions.js @@ -44,7 +44,7 @@ function main() { // Instantiates a client const serviceClient = new ImageVersionsClient(); - async function listImageVersions() { + async function callListImageVersions() { // Construct request const request = {}; @@ -55,7 +55,7 @@ function main() { } } - listImageVersions(); + callListImageVersions(); // [END composer_v1_generated_ImageVersions_ListImageVersions_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js index 200d68bacf8..d196cfd09bf 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.check_upgrade.js @@ -33,15 +33,15 @@ function main() { * When used as input, the server also checks if the provided version is * supported and denies the request for an unsupported version. * The Cloud Composer portion of the version is a - * [semantic version](https://semver.org) or `latest`. When the patch version + * semantic version (https://semver.org) or `latest`. When the patch version * is omitted, the current Cloud Composer patch version is selected. * When `latest` is provided instead of an explicit version number, * the server replaces `latest` with the current Cloud Composer version * and stores that version number in the same field. * The portion of the image version that follows `airflow-` is an * official Apache Airflow repository - * [release name](https://github.com/apache/incubator-airflow/releases). - * See also [Version List] + * release name (https://github.com/apache/incubator-airflow/releases). + * See also Version List * (/composer/docs/concepts/versioning/composer-versions). */ // const imageVersion = 'abc123' @@ -53,7 +53,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function checkUpgrade() { + async function callCheckUpgrade() { // Construct request const request = {}; @@ -63,7 +63,7 @@ function main() { console.log(response); } - checkUpgrade(); + callCheckUpgrade(); // [END composer_v1beta1_generated_Environments_CheckUpgrade_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js index 13dab6ff723..ccaf548b3d5 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.create_environment.js @@ -27,7 +27,7 @@ function main() { /** * The environment to create. */ - // const environment = '' + // const environment = {} // Imports the Service library const {EnvironmentsClient} = @@ -36,7 +36,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function createEnvironment() { + async function callCreateEnvironment() { // Construct request const request = {}; @@ -46,7 +46,7 @@ function main() { console.log(response); } - createEnvironment(); + callCreateEnvironment(); // [END composer_v1beta1_generated_Environments_CreateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js index 88b0187133a..0cbbec313be 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.delete_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function deleteEnvironment() { + async function callDeleteEnvironment() { // Construct request const request = {}; @@ -42,7 +42,7 @@ function main() { console.log(response); } - deleteEnvironment(); + callDeleteEnvironment(); // [END composer_v1beta1_generated_Environments_DeleteEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js index 3277676fe4e..3584bb1b03f 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.get_environment.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function getEnvironment() { + async function callGetEnvironment() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - getEnvironment(); + callGetEnvironment(); // [END composer_v1beta1_generated_Environments_GetEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js index c7c1d97a47c..82b27231316 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.list_environments.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function listEnvironments() { + async function callListEnvironments() { // Construct request const request = {}; @@ -51,7 +51,7 @@ function main() { } } - listEnvironments(); + callListEnvironments(); // [END composer_v1beta1_generated_Environments_ListEnvironments_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js index a18c5d4e12b..201efb51ec4 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.restart_web_server.js @@ -33,7 +33,7 @@ function main() { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function restartWebServer() { + async function callRestartWebServer() { // Construct request const request = {}; @@ -43,7 +43,7 @@ function main() { console.log(response); } - restartWebServer(); + callRestartWebServer(); // [END composer_v1beta1_generated_Environments_RestartWebServer_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js index 0f2f66cfa7a..24226201e33 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/environments.update_environment.js @@ -28,7 +28,7 @@ function main(updateMask) { * A patch environment. Fields specified by the `updateMask` will be copied * from the patch environment into the environment under update. */ - // const environment = '' + // const environment = {} /** * Required. A comma-separated list of paths, relative to `Environment`, of * fields to update. @@ -135,8 +135,8 @@ function main(updateMask) { * new image version. Additionally, the new image version cannot effect * a version downgrade and must match the current image version's * Composer major version and Airflow major and minor versions. Consult - * the [Cloud Composer Version - * List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) + * the Cloud Composer Version + * List (https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) * for valid values. * * `config.softwareConfig.schedulerCount` * * Horizontally scale the number of schedulers in Airflow. A positive @@ -151,7 +151,7 @@ function main(updateMask) { * * Maintenance window during which Cloud Composer components may be * under maintenance. */ - // const updateMask = '' + // const updateMask = {} // Imports the Service library const {EnvironmentsClient} = @@ -160,7 +160,7 @@ function main(updateMask) { // Instantiates a client const serviceClient = new EnvironmentsClient(); - async function updateEnvironment() { + async function callUpdateEnvironment() { // Construct request const request = { updateMask, @@ -172,7 +172,7 @@ function main(updateMask) { console.log(response); } - updateEnvironment(); + callUpdateEnvironment(); // [END composer_v1beta1_generated_Environments_UpdateEnvironment_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js index 9bbbcf78a2b..e89ec5a0457 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/image_versions.list_image_versions.js @@ -44,7 +44,7 @@ function main() { // Instantiates a client const serviceClient = new ImageVersionsClient(); - async function listImageVersions() { + async function callListImageVersions() { // Construct request const request = {}; @@ -55,7 +55,7 @@ function main() { } } - listImageVersions(); + callListImageVersions(); // [END composer_v1beta1_generated_ImageVersions_ListImageVersions_async] } diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 95af3a10cf3..7e6d5aa595b 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -372,6 +372,24 @@ export class EnvironmentsClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/environments.get_environment.js + * region_tag:composer_v1_generated_Environments_GetEnvironment_async + */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, options?: CallOptions @@ -406,24 +424,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Get an existing environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getEnvironment(request); - */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, optionsOrCallback?: @@ -471,6 +471,28 @@ export class EnvironmentsClient { return this.innerApiCalls.getEnvironment(request, options, callback); } + /** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment + * The environment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/environments.create_environment.js + * region_tag:composer_v1_generated_Environments_CreateEnvironment_async + */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, options?: CallOptions @@ -507,29 +529,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Create a new environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment - * The environment to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createEnvironment(request); - * const [response] = await operation.promise(); - */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, optionsOrCallback?: @@ -587,11 +586,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/environments.create_environment.js + * region_tag:composer_v1_generated_Environments_CreateEnvironment_async */ async checkCreateEnvironmentProgress( name: string @@ -615,42 +611,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata >; } - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Update an environment. * @@ -785,10 +745,45 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.updateEnvironment(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/environments.update_environment.js + * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; updateEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, optionsOrCallback?: @@ -846,11 +841,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/environments.update_environment.js + * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async */ async checkUpdateEnvironmentProgress( name: string @@ -874,6 +866,26 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata >; } + /** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/environments.delete_environment.js + * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async + */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, options?: CallOptions @@ -910,27 +922,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Delete an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteEnvironment(request); - * const [response] = await operation.promise(); - */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, optionsOrCallback?: @@ -988,11 +979,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/environments.delete_environment.js + * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async */ async checkDeleteEnvironmentProgress( name: string @@ -1016,6 +1004,31 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata >; } + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listEnvironmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, options?: CallOptions @@ -1047,31 +1060,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1.IEnvironment > ): void; - /** - * List environments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Environment]{@link google.cloud.orchestration.airflow.service.v1.Environment}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listEnvironmentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, optionsOrCallback?: @@ -1184,11 +1172,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listEnvironmentsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/environments.list_environments.js + * region_tag:composer_v1_generated_Environments_ListEnvironments_async */ listEnvironmentsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, @@ -1202,7 +1187,6 @@ export class EnvironmentsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index 402bacf777d..bcaad4c2314 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -313,6 +313,33 @@ export class ImageVersionsClient { // -- Service calls -- // ------------------- + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1.ImageVersion}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listImageVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, options?: CallOptions @@ -344,33 +371,6 @@ export class ImageVersionsClient { protos.google.cloud.orchestration.airflow.service.v1.IImageVersion > ): void; - /** - * List ImageVersions for provided location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1.ImageVersion}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listImageVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, optionsOrCallback?: @@ -487,11 +487,8 @@ export class ImageVersionsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listImageVersionsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/image_versions.list_image_versions.js + * region_tag:composer_v1_generated_ImageVersions_ListImageVersions_async */ listImageVersionsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, @@ -505,7 +502,6 @@ export class ImageVersionsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index 9679f37ff46..d26ee127bb4 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -396,6 +396,24 @@ export class EnvironmentsClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/environments.get_environment.js + * region_tag:composer_v1beta1_generated_Environments_GetEnvironment_async + */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, options?: CallOptions @@ -430,24 +448,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Get an existing environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getEnvironment(request); - */ getEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, optionsOrCallback?: @@ -495,6 +495,28 @@ export class EnvironmentsClient { return this.innerApiCalls.getEnvironment(request, options, callback); } + /** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment + * The environment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/environments.create_environment.js + * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async + */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, options?: CallOptions @@ -531,29 +553,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Create a new environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment - * The environment to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createEnvironment(request); - * const [response] = await operation.promise(); - */ createEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, optionsOrCallback?: @@ -611,11 +610,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.create_environment.js + * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async */ async checkCreateEnvironmentProgress( name: string @@ -639,42 +635,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Update an environment. * @@ -825,10 +785,45 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.updateEnvironment(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1beta1/environments.update_environment.js + * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; updateEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, optionsOrCallback?: @@ -886,11 +881,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.update_environment.js + * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async */ async checkUpdateEnvironmentProgress( name: string @@ -914,6 +906,26 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } + /** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/environments.delete_environment.js + * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async + */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, options?: CallOptions @@ -950,27 +962,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Delete an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteEnvironment(request); - * const [response] = await operation.promise(); - */ deleteEnvironment( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, optionsOrCallback?: @@ -1028,11 +1019,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.delete_environment.js + * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async */ async checkDeleteEnvironmentProgress( name: string @@ -1056,6 +1044,27 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } + /** + * Restart Airflow web server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to restart the web server for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/environments.restart_web_server.js + * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async + */ restartWebServer( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, options?: CallOptions @@ -1092,28 +1101,6 @@ export class EnvironmentsClient { {} | null | undefined > ): void; - /** - * Restart Airflow web server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to restart the web server for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.restartWebServer(request); - * const [response] = await operation.promise(); - */ restartWebServer( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, optionsOrCallback?: @@ -1171,11 +1158,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkRestartWebServerProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.restart_web_server.js + * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async */ async checkRestartWebServerProgress( name: string @@ -1199,42 +1183,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } - checkUpgrade( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - callback: Callback< - LROperation< - protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Check if an upgrade operation on the environment will succeed. * @@ -1276,10 +1224,45 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.checkUpgrade(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1beta1/environments.check_upgrade.js + * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async */ + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + callback: Callback< + LROperation< + protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; checkUpgrade( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, optionsOrCallback?: @@ -1337,11 +1320,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCheckUpgradeProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/environments.check_upgrade.js + * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async */ async checkCheckUpgradeProgress( name: string @@ -1365,6 +1345,31 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata >; } + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listEnvironmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, options?: CallOptions @@ -1396,31 +1401,6 @@ export class EnvironmentsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment > ): void; - /** - * List environments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Environment]{@link google.cloud.orchestration.airflow.service.v1beta1.Environment}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listEnvironmentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listEnvironments( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, optionsOrCallback?: @@ -1533,11 +1513,8 @@ export class EnvironmentsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listEnvironmentsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/environments.list_environments.js + * region_tag:composer_v1beta1_generated_Environments_ListEnvironments_async */ listEnvironmentsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, @@ -1551,7 +1528,6 @@ export class EnvironmentsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index 8f9a2045bbf..5184fedbcbd 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -313,6 +313,33 @@ export class ImageVersionsClient { // -- Service calls -- // ------------------- + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listImageVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, options?: CallOptions @@ -344,33 +371,6 @@ export class ImageVersionsClient { protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion > ): void; - /** - * List ImageVersions for provided location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [ImageVersion]{@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listImageVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listImageVersions( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, optionsOrCallback?: @@ -487,11 +487,8 @@ export class ImageVersionsClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listImageVersionsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/image_versions.list_image_versions.js + * region_tag:composer_v1beta1_generated_ImageVersions_ListImageVersions_async */ listImageVersionsAsync( request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, @@ -505,7 +502,6 @@ export class ImageVersionsClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); this.initialize();