Files
old-slucajna-televizija/backend/node_modules/googleapis/apis/genomics/v1alpha2.js
GotPPay a75ea978f9 ..
2017-10-16 20:21:19 +02:00

912 lines
39 KiB
JavaScript

"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* 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.
*/
/* jshint maxlen: false */
const apirequest_1 = require("../../lib/apirequest");
/**
* Genomics API
*
* Upload, process, query, and search Genomics data in the cloud.
*
* @example
* const google = require('googleapis');
* const genomics = google.genomics('v1alpha2');
*
* @namespace genomics
* @type {Function}
* @version v1alpha2
* @variation v1alpha2
* @param {object=} options Options for Genomics
*/
function Genomics(options) {
const self = this;
self._options = options || {};
self.operations = {
/**
* genomics.operations.cancel
*
* @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* // The name of the operation resource to be cancelled.
* name: 'operations/my-operation', // TODO: Update placeholder value.
*
* resource: {
* // TODO: Add desired properties to the request body.
* },
*
* auth: authClient,
* };
*
* genomics.operations.cancel(request, function(err) {
* if (err) {
* console.error(err);
* return;
* }
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.operations.cancel
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {string} params.name The name of the operation resource to be cancelled.
* @param {genomics(v1alpha2).CancelOperationRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
cancel: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/{name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: ['name'],
pathParams: ['name'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.operations.get
*
* @desc Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* // The name of the operation resource.
* name: 'operations/my-operation', // TODO: Update placeholder value.
*
* auth: authClient,
* };
*
* genomics.operations.get(request, function(err, response) {
* if (err) {
* console.error(err);
* return;
* }
*
* // TODO: Change code below to process the `response` object:
* console.log(JSON.stringify(response, null, 2));
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.operations.get
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {string} params.name The name of the operation resource.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/{name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['name'],
pathParams: ['name'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.operations.list
*
* @desc Lists operations that match the specified filter in the request.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* // The name of the operation's parent resource.
* name: 'operations', // TODO: Update placeholder value.
*
* auth: authClient,
* };
*
* var handlePage = function(err, response) {
* if (err) {
* console.error(err);
* return;
* }
*
* var operationsPage = response['operations'];
* if (!operationsPage) {
* return;
* }
* for (var i = 0; i < operationsPage.length; i++) {
* // TODO: Change code below to process each resource in `operationsPage`:
* console.log(JSON.stringify(operationsPage[i], null, 2));
* }
*
* if (response.nextPageToken) {
* request.pageToken = response.nextPageToken;
* genomics.operations.list(request, handlePage);
* }
* };
*
* genomics.operations.list(request, handlePage);
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.operations.list
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {string=} params.filter A string for filtering Operations. The following filter fields are supported&#58; * projectId&#58; Required. Corresponds to OperationMetadata.projectId. * createTime&#58; The time this job was created, in seconds from the [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=` and/or `<=` operators. * status&#58; Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only one status may be specified. * labels.key where key is a label key. Examples&#58; * `projectId = my-project AND createTime >= 1432140000` * `projectId = my-project AND createTime >= 1432140000 AND createTime <= 1432150000 AND status = RUNNING` * `projectId = my-project AND labels.color = *` * `projectId = my-project AND labels.color = red`
* @param {string} params.name The name of the operation's parent resource.
* @param {integer=} params.pageSize The maximum number of results to return. If unspecified, defaults to 256. The maximum value is 2048.
* @param {string=} params.pageToken The standard list page token.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/{name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['name'],
pathParams: ['name'],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
self.pipelines = {
/**
* genomics.pipelines.create
*
* @desc Creates a pipeline that can be run later. Create takes a Pipeline that has all fields other than `pipelineId` populated, and then returns the same pipeline with `pipelineId` populated. This id can be used to run the pipeline. Caller must have WRITE permission to the project.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* resource: {
* // TODO: Add desired properties to the request body.
* },
*
* auth: authClient,
* };
*
* genomics.pipelines.create(request, function(err, response) {
* if (err) {
* console.error(err);
* return;
* }
*
* // TODO: Change code below to process the `response` object:
* console.log(JSON.stringify(response, null, 2));
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.pipelines.create
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {genomics(v1alpha2).Pipeline} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
create: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/pipelines').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.pipelines.delete
*
* @desc Deletes a pipeline based on ID. Caller must have WRITE permission to the project.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* // Caller must have WRITE access to the project in which this pipeline
* // is defined.
* pipelineId: 'my-pipeline-id', // TODO: Update placeholder value.
*
* auth: authClient,
* };
*
* genomics.pipelines.delete(request, function(err) {
* if (err) {
* console.error(err);
* return;
* }
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.pipelines.delete
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {string} params.pipelineId Caller must have WRITE access to the project in which this pipeline is defined.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
delete: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/pipelines/{pipelineId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE'
}, options),
params: params,
requiredParams: ['pipelineId'],
pathParams: ['pipelineId'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.pipelines.get
*
* @desc Retrieves a pipeline based on ID. Caller must have READ permission to the project.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* // Caller must have READ access to the project in which this pipeline
* // is defined.
* pipelineId: 'my-pipeline-id', // TODO: Update placeholder value.
*
* auth: authClient,
* };
*
* genomics.pipelines.get(request, function(err, response) {
* if (err) {
* console.error(err);
* return;
* }
*
* // TODO: Change code below to process the `response` object:
* console.log(JSON.stringify(response, null, 2));
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.pipelines.get
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {string} params.pipelineId Caller must have READ access to the project in which this pipeline is defined.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/pipelines/{pipelineId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['pipelineId'],
pathParams: ['pipelineId'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.pipelines.getControllerConfig
*
* @desc Gets controller configuration information. Should only be called by VMs created by the Pipelines Service and not by end users.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* auth: authClient,
* };
*
* genomics.pipelines.getControllerConfig(request, function(err, response) {
* if (err) {
* console.error(err);
* return;
* }
*
* // TODO: Change code below to process the `response` object:
* console.log(JSON.stringify(response, null, 2));
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.pipelines.getControllerConfig
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {string=} params.operationId The operation to retrieve controller configuration for.
* @param {string=} params.validationToken
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
getControllerConfig: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/pipelines:getControllerConfig').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.pipelines.list
*
* @desc Lists pipelines. Caller must have READ permission to the project.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* auth: authClient,
* };
*
* var handlePage = function(err, response) {
* if (err) {
* console.error(err);
* return;
* }
*
* var pipelinesPage = response['pipelines'];
* if (!pipelinesPage) {
* return;
* }
* for (var i = 0; i < pipelinesPage.length; i++) {
* // TODO: Change code below to process each resource in `pipelinesPage`:
* console.log(JSON.stringify(pipelinesPage[i], null, 2));
* }
*
* if (response.nextPageToken) {
* request.pageToken = response.nextPageToken;
* genomics.pipelines.list(request, handlePage);
* }
* };
*
* genomics.pipelines.list(request, handlePage);
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.pipelines.list
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {string=} params.namePrefix Pipelines with names that match this prefix should be returned. If unspecified, all pipelines in the project, up to `pageSize`, will be returned.
* @param {integer=} params.pageSize Number of pipelines to return at once. Defaults to 256, and max is 2048.
* @param {string=} params.pageToken Token to use to indicate where to start getting results. If unspecified, returns the first page of results.
* @param {string=} params.projectId Required. The name of the project to search for pipelines. Caller must have READ access to this project.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/pipelines').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.pipelines.run
*
* @desc Runs a pipeline. If `pipelineId` is specified in the request, then run a saved pipeline. If `ephemeralPipeline` is specified, then run that pipeline once without saving a copy. The caller must have READ permission to the project where the pipeline is stored and WRITE permission to the project where the pipeline will be run, as VMs will be created and storage will be used. If a pipeline operation is still running after 6 days, it will be canceled.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* resource: {
* // TODO: Add desired properties to the request body.
* },
*
* auth: authClient,
* };
*
* genomics.pipelines.run(request, function(err, response) {
* if (err) {
* console.error(err);
* return;
* }
*
* // TODO: Change code below to process the `response` object:
* console.log(JSON.stringify(response, null, 2));
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.pipelines.run
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {genomics(v1alpha2).RunPipelineRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
run: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/pipelines:run').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* genomics.pipelines.setOperationStatus
*
* @desc Sets status of a given operation. Any new timestamps (as determined by description) are appended to TimestampEvents. Should only be called by VMs created by the Pipelines Service and not by end users.
*
* @example
* // BEFORE RUNNING:
* // ---------------
* // 1. If not already done, enable the Genomics API
* // and check the quota for your project at
* // https://console.developers.google.com/apis/api/genomics
* // 2. This sample uses Application Default Credentials for authentication.
* // If not already done, install the gcloud CLI from
* // https://cloud.google.com/sdk and run
* // `gcloud beta auth application-default login`.
* // For more information, see
* // https://developers.google.com/identity/protocols/application-default-credentials
* // 3. Install the Node.js client library by running
* // `npm install googleapis --save`
*
* var google = require('googleapis');
* var genomics = google.genomics('v1alpha2');
*
* authorize(function(authClient) {
* var request = {
* resource: {
* // TODO: Add desired properties to the request body. All existing properties
* // will be replaced.
* },
*
* auth: authClient,
* };
*
* genomics.pipelines.setOperationStatus(request, function(err) {
* if (err) {
* console.error(err);
* return;
* }
* });
* });
*
* function authorize(callback) {
* google.auth.getApplicationDefault(function(err, authClient) {
* if (err) {
* console.error('authentication failed: ', err);
* return;
* }
* if (authClient.createScopedRequired && authClient.createScopedRequired()) {
* var scopes = ['https://www.googleapis.com/auth/cloud-platform'];
* authClient = authClient.createScoped(scopes);
* }
* callback(authClient);
* });
* }
*
* @alias genomics.pipelines.setOperationStatus
* @memberOf! genomics(v1alpha2)
*
* @param {object} params Parameters for request
* @param {genomics(v1alpha2).SetOperationStatusRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
setOperationStatus: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://genomics.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha2/pipelines:setOperationStatus').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
}
module.exports = Genomics;
//# sourceMappingURL=v1alpha2.js.map