Skip to content

Commit

Permalink
feat(run): update the API
Browse files Browse the repository at this point in the history
#### run:v1
The following keys were added:
- resources.projects.resources.authorizeddomains.methods.list.description
- resources.projects.resources.authorizeddomains.methods.list.flatPath
- resources.projects.resources.authorizeddomains.methods.list.httpMethod
- resources.projects.resources.authorizeddomains.methods.list.id
- resources.projects.resources.authorizeddomains.methods.list.parameterOrder
- resources.projects.resources.authorizeddomains.methods.list.parameters.pageSize.description
- resources.projects.resources.authorizeddomains.methods.list.parameters.pageSize.format
- resources.projects.resources.authorizeddomains.methods.list.parameters.pageSize.location
- resources.projects.resources.authorizeddomains.methods.list.parameters.pageSize.type
- resources.projects.resources.authorizeddomains.methods.list.parameters.pageToken.description
- resources.projects.resources.authorizeddomains.methods.list.parameters.pageToken.location
- resources.projects.resources.authorizeddomains.methods.list.parameters.pageToken.type
- resources.projects.resources.authorizeddomains.methods.list.parameters.parent.description
- resources.projects.resources.authorizeddomains.methods.list.parameters.parent.location
- resources.projects.resources.authorizeddomains.methods.list.parameters.parent.pattern
- resources.projects.resources.authorizeddomains.methods.list.parameters.parent.required
- resources.projects.resources.authorizeddomains.methods.list.parameters.parent.type
- resources.projects.resources.authorizeddomains.methods.list.path
- resources.projects.resources.authorizeddomains.methods.list.response.$ref
- resources.projects.resources.authorizeddomains.methods.list.scopes

The following keys were changed:
- resources.namespaces.resources.authorizeddomains.methods.list.parameters.parent.description
- resources.projects.resources.locations.resources.authorizeddomains.methods.list.parameters.parent.description
- schemas.AuthorizedDomain.properties.name.description
  • Loading branch information
yoshi-automation authored and sofisl committed Aug 3, 2020
1 parent 13bb576 commit 1cece79
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 11 deletions.
48 changes: 44 additions & 4 deletions discovery/run-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
"type": "string"
},
"parent": {
"description": "Name of the parent Application resource. Example: `apps/myapp`.",
"description": "Name of the parent Project resource. Example: `projects/myproject`.",
"location": "path",
"pattern": "^namespaces/[^/]+$",
"required": true,
Expand Down Expand Up @@ -963,6 +963,46 @@
},
"projects": {
"resources": {
"authorizeddomains": {
"methods": {
"list": {
"description": "List authorized domains.",
"flatPath": "v1/projects/{projectsId}/authorizeddomains",
"httpMethod": "GET",
"id": "run.projects.authorizeddomains.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"description": "Maximum results to return per page.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Continuation token for fetching the next page of results.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Name of the parent Project resource. Example: `projects/myproject`.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/authorizeddomains",
"response": {
"$ref": "ListAuthorizedDomainsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
},
"locations": {
"methods": {
"list": {
Expand Down Expand Up @@ -1031,7 +1071,7 @@
"type": "string"
},
"parent": {
"description": "Name of the parent Application resource. Example: `apps/myapp`.",
"description": "Name of the parent Project resource. Example: `projects/myproject`.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
Expand Down Expand Up @@ -1942,7 +1982,7 @@
}
}
},
"revision": "20200720",
"revision": "20200727",
"rootUrl": "https://run.googleapis.com/",
"schemas": {
"Addressable": {
Expand Down Expand Up @@ -2012,7 +2052,7 @@
"type": "string"
},
"name": {
"description": "Read only. Full path to the `AuthorizedDomain` resource in the API. Example: `apps/myapp/authorizedDomains/example.com`.",
"description": "Deprecated Read only. Full path to the `AuthorizedDomain` resource in the API. Example: `projects/myproject/authorizedDomains/example.com`.",
"type": "string"
}
},
Expand Down
188 changes: 181 additions & 7 deletions src/apis/run/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export namespace run_v1 {
*/
id?: string | null;
/**
* Read only. Full path to the `AuthorizedDomain` resource in the API. Example: `apps/myapp/authorizedDomains/example.com`.
* Deprecated Read only. Full path to the `AuthorizedDomain` resource in the API. Example: `projects/myproject/authorizedDomains/example.com`.
*/
name?: string | null;
}
Expand Down Expand Up @@ -2370,7 +2370,7 @@ export namespace run_v1 {
* pageSize: 'placeholder-value',
* // Continuation token for fetching the next page of results.
* pageToken: 'placeholder-value',
* // Name of the parent Application resource. Example: `apps/myapp`.
* // Name of the parent Project resource. Example: `projects/myproject`.
* parent: 'namespaces/my-namespace',
* });
* console.log(res.data);
Expand All @@ -2393,7 +2393,7 @@ export namespace run_v1 {
* @param {object} params Parameters for request
* @param {integer=} params.pageSize Maximum results to return per page.
* @param {string=} params.pageToken Continuation token for fetching the next page of results.
* @param {string} params.parent Name of the parent Application resource. Example: `apps/myapp`.
* @param {string} params.parent Name of the parent Project resource. Example: `projects/myproject`.
* @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
Expand Down Expand Up @@ -2498,7 +2498,7 @@ export namespace run_v1 {
*/
pageToken?: string;
/**
* Name of the parent Application resource. Example: `apps/myapp`.
* Name of the parent Project resource. Example: `projects/myproject`.
*/
parent?: string;
}
Expand Down Expand Up @@ -5202,13 +5202,187 @@ export namespace run_v1 {

export class Resource$Projects {
context: APIRequestContext;
authorizeddomains: Resource$Projects$Authorizeddomains;
locations: Resource$Projects$Locations;
constructor(context: APIRequestContext) {
this.context = context;
this.authorizeddomains = new Resource$Projects$Authorizeddomains(
this.context
);
this.locations = new Resource$Projects$Locations(this.context);
}
}

export class Resource$Projects$Authorizeddomains {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}

/**
* run.projects.authorizeddomains.list
* @desc List authorized domains.
* @example
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/run.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 run = google.run('v1');
*
* 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/cloud-platform'],
* });
*
* // 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 run.projects.authorizeddomains.list({
* // Maximum results to return per page.
* pageSize: 'placeholder-value',
* // Continuation token for fetching the next page of results.
* pageToken: 'placeholder-value',
* // Name of the parent Project resource. Example: `projects/myproject`.
* parent: 'projects/my-project',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "domains": [],
* // "nextPageToken": "my_nextPageToken"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* @alias run.projects.authorizeddomains.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer=} params.pageSize Maximum results to return per page.
* @param {string=} params.pageToken Continuation token for fetching the next page of results.
* @param {string} params.parent Name of the parent Project resource. Example: `projects/myproject`.
* @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(
params: Params$Resource$Projects$Authorizeddomains$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Projects$Authorizeddomains$List,
options?: MethodOptions
): GaxiosPromise<Schema$ListAuthorizedDomainsResponse>;
list(
params: Params$Resource$Projects$Authorizeddomains$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Projects$Authorizeddomains$List,
options:
| MethodOptions
| BodyResponseCallback<Schema$ListAuthorizedDomainsResponse>,
callback: BodyResponseCallback<Schema$ListAuthorizedDomainsResponse>
): void;
list(
params: Params$Resource$Projects$Authorizeddomains$List,
callback: BodyResponseCallback<Schema$ListAuthorizedDomainsResponse>
): void;
list(
callback: BodyResponseCallback<Schema$ListAuthorizedDomainsResponse>
): void;
list(
paramsOrCallback?:
| Params$Resource$Projects$Authorizeddomains$List
| BodyResponseCallback<Schema$ListAuthorizedDomainsResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ListAuthorizedDomainsResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ListAuthorizedDomainsResponse>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$ListAuthorizedDomainsResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Authorizeddomains$List;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Projects$Authorizeddomains$List;
options = {};
}

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

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

export interface Params$Resource$Projects$Authorizeddomains$List
extends StandardParameters {
/**
* Maximum results to return per page.
*/
pageSize?: number;
/**
* Continuation token for fetching the next page of results.
*/
pageToken?: string;
/**
* Name of the parent Project resource. Example: `projects/myproject`.
*/
parent?: string;
}

export class Resource$Projects$Locations {
context: APIRequestContext;
authorizeddomains: Resource$Projects$Locations$Authorizeddomains;
Expand Down Expand Up @@ -5443,7 +5617,7 @@ export namespace run_v1 {
* pageSize: 'placeholder-value',
* // Continuation token for fetching the next page of results.
* pageToken: 'placeholder-value',
* // Name of the parent Application resource. Example: `apps/myapp`.
* // Name of the parent Project resource. Example: `projects/myproject`.
* parent: 'projects/my-project/locations/my-location',
* });
* console.log(res.data);
Expand All @@ -5466,7 +5640,7 @@ export namespace run_v1 {
* @param {object} params Parameters for request
* @param {integer=} params.pageSize Maximum results to return per page.
* @param {string=} params.pageToken Continuation token for fetching the next page of results.
* @param {string} params.parent Name of the parent Application resource. Example: `apps/myapp`.
* @param {string} params.parent Name of the parent Project resource. Example: `projects/myproject`.
* @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
Expand Down Expand Up @@ -5571,7 +5745,7 @@ export namespace run_v1 {
*/
pageToken?: string;
/**
* Name of the parent Application resource. Example: `apps/myapp`.
* Name of the parent Project resource. Example: `projects/myproject`.
*/
parent?: string;
}
Expand Down

0 comments on commit 1cece79

Please sign in to comment.