Skip to content

Commit

Permalink
feat(prod_tt_sasportal): update the API
Browse files Browse the repository at this point in the history
#### prod_tt_sasportal:v1alpha1
The following keys were added:
- resources.nodes.methods.get.description
- resources.nodes.methods.get.flatPath
- resources.nodes.methods.get.httpMethod
- resources.nodes.methods.get.id
- resources.nodes.methods.get.parameterOrder
- resources.nodes.methods.get.parameters.name.description
- resources.nodes.methods.get.parameters.name.location
- resources.nodes.methods.get.parameters.name.pattern
- resources.nodes.methods.get.parameters.name.required
- resources.nodes.methods.get.parameters.name.type
- resources.nodes.methods.get.path
- resources.nodes.methods.get.response.$ref
- resources.nodes.methods.get.scopes
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jun 5, 2020
1 parent 81cd993 commit 8a3fbc3
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 1 deletion.
29 changes: 28 additions & 1 deletion discovery/prod_tt_sasportal-v1alpha1.json
Expand Up @@ -785,6 +785,33 @@
}
},
"nodes": {
"methods": {
"get": {
"description": "Returns a requested node.",
"flatPath": "v1alpha1/nodes/{nodesId}",
"httpMethod": "GET",
"id": "prod_tt_sasportal.nodes.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the node.",
"location": "path",
"pattern": "^nodes/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha1/{+name}",
"response": {
"$ref": "SasPortalNode"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
}
},
"resources": {
"devices": {
"methods": {
Expand Down Expand Up @@ -1523,7 +1550,7 @@
}
}
},
"revision": "20200511",
"revision": "20200605",
"rootUrl": "https://prod-tt-sasportal.googleapis.com/",
"schemas": {
"SasPortalAssignment": {
Expand Down
137 changes: 137 additions & 0 deletions src/apis/prod_tt_sasportal/v1alpha1.ts
Expand Up @@ -4295,6 +4295,143 @@ export namespace prod_tt_sasportal_v1alpha1 {
this.devices = new Resource$Nodes$Devices(this.context);
this.nodes = new Resource$Nodes$Nodes(this.context);
}

/**
* prod_tt_sasportal.nodes.get
* @desc Returns a requested node.
* @example
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/prod_tt_sasportal.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const prod_tt_sasportal = google.prod_tt_sasportal('v1alpha1');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/userinfo.email'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options('auth', authClient);
*
* // Do the magic
* const res = await prod_tt_sasportal.nodes.get({
* // Required. The name of the node.
* name: 'nodes/my-node',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "displayName": "my_displayName",
* // "name": "my_name",
* // "sasUserIds": []
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* @alias prod_tt_sasportal.nodes.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name Required. The name of the node.
* @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(
params: Params$Resource$Nodes$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Nodes$Get,
options?: MethodOptions
): GaxiosPromise<Schema$SasPortalNode>;
get(
params: Params$Resource$Nodes$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Nodes$Get,
options: MethodOptions | BodyResponseCallback<Schema$SasPortalNode>,
callback: BodyResponseCallback<Schema$SasPortalNode>
): void;
get(
params: Params$Resource$Nodes$Get,
callback: BodyResponseCallback<Schema$SasPortalNode>
): void;
get(callback: BodyResponseCallback<Schema$SasPortalNode>): void;
get(
paramsOrCallback?:
| Params$Resource$Nodes$Get
| BodyResponseCallback<Schema$SasPortalNode>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$SasPortalNode>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$SasPortalNode>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$SasPortalNode> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Nodes$Get;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Nodes$Get;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl =
options.rootUrl || 'https://prod-tt-sasportal.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$SasPortalNode>(
parameters,
callback as BodyResponseCallback<{} | void>
);
} else {
return createAPIRequest<Schema$SasPortalNode>(parameters);
}
}
}

export interface Params$Resource$Nodes$Get extends StandardParameters {
/**
* Required. The name of the node.
*/
name?: string;
}

export class Resource$Nodes$Devices {
Expand Down

0 comments on commit 8a3fbc3

Please sign in to comment.