Skip to content

Commit

Permalink
feat(appengine): update the API
Browse files Browse the repository at this point in the history
#### appengine:v1beta

The following keys were added:
- schemas.FlexibleRuntimeSettings.description
- schemas.FlexibleRuntimeSettings.id
- schemas.FlexibleRuntimeSettings.properties.operatingSystem.description
- schemas.FlexibleRuntimeSettings.properties.operatingSystem.type
- schemas.FlexibleRuntimeSettings.properties.runtimeVersion.description
- schemas.FlexibleRuntimeSettings.properties.runtimeVersion.type
- schemas.FlexibleRuntimeSettings.type
- schemas.Version.properties.flexibleRuntimeSettings.$ref
- schemas.Version.properties.flexibleRuntimeSettings.description

#### appengine:v1

The following keys were added:
- resources.projects.resources.locations.resources.applications.methods.get.description
- resources.projects.resources.locations.resources.applications.methods.get.flatPath
- resources.projects.resources.locations.resources.applications.methods.get.httpMethod
- resources.projects.resources.locations.resources.applications.methods.get.id
- resources.projects.resources.locations.resources.applications.methods.get.parameterOrder
- resources.projects.resources.locations.resources.applications.methods.get.parameters.applicationsId.description
- resources.projects.resources.locations.resources.applications.methods.get.parameters.applicationsId.location
- resources.projects.resources.locations.resources.applications.methods.get.parameters.applicationsId.required
- resources.projects.resources.locations.resources.applications.methods.get.parameters.applicationsId.type
- resources.projects.resources.locations.resources.applications.methods.get.parameters.locationsId.description
- resources.projects.resources.locations.resources.applications.methods.get.parameters.locationsId.location
- resources.projects.resources.locations.resources.applications.methods.get.parameters.locationsId.required
- resources.projects.resources.locations.resources.applications.methods.get.parameters.locationsId.type
- resources.projects.resources.locations.resources.applications.methods.get.parameters.projectsId.description
- resources.projects.resources.locations.resources.applications.methods.get.parameters.projectsId.location
- resources.projects.resources.locations.resources.applications.methods.get.parameters.projectsId.required
- resources.projects.resources.locations.resources.applications.methods.get.parameters.projectsId.type
- resources.projects.resources.locations.resources.applications.methods.get.path
- resources.projects.resources.locations.resources.applications.methods.get.response.$ref
- resources.projects.resources.locations.resources.applications.methods.get.scopes
  • Loading branch information
yoshi-automation authored and sofisl committed Feb 2, 2023
1 parent 42d51d0 commit cfde2c1
Show file tree
Hide file tree
Showing 4 changed files with 289 additions and 2 deletions.
54 changes: 53 additions & 1 deletion discovery/appengine-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1593,9 +1593,61 @@
}
}
}
},
"projects": {
"resources": {
"locations": {
"resources": {
"applications": {
"methods": {
"get": {
"description": "Gets information about an application.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}",
"httpMethod": "GET",
"id": "appengine.projects.locations.applications.get",
"parameterOrder": [
"projectsId",
"locationsId",
"applicationsId"
],
"parameters": {
"applicationsId": {
"description": "Part of `name`. See documentation of `projectsId`.",
"location": "path",
"required": true,
"type": "string"
},
"locationsId": {
"description": "Part of `name`. See documentation of `projectsId`.",
"location": "path",
"required": true,
"type": "string"
},
"projectsId": {
"description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}",
"response": {
"$ref": "Application"
},
"scopes": [
"https://www.googleapis.com/auth/appengine.admin",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"
]
}
}
}
}
}
}
}
},
"revision": "20221212",
"revision": "20230123",
"rootUrl": "https://appengine.googleapis.com/",
"schemas": {
"ApiConfigHandler": {
Expand Down
21 changes: 20 additions & 1 deletion discovery/appengine-v1beta.json
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@
}
}
},
"revision": "20221212",
"revision": "20230123",
"rootUrl": "https://appengine.googleapis.com/",
"schemas": {
"ApiConfigHandler": {
Expand Down Expand Up @@ -2636,6 +2636,21 @@
},
"type": "object"
},
"FlexibleRuntimeSettings": {
"description": "Runtime settings for the App Engine flexible environment.",
"id": "FlexibleRuntimeSettings",
"properties": {
"operatingSystem": {
"description": "The operating system of the application runtime.",
"type": "string"
},
"runtimeVersion": {
"description": "The runtime version of an App Engine flexible application.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppengineV1betaLocationMetadata": {
"description": "Metadata for the given google.cloud.location.Location.",
"id": "GoogleAppengineV1betaLocationMetadata",
Expand Down Expand Up @@ -4118,6 +4133,10 @@
},
"type": "array"
},
"flexibleRuntimeSettings": {
"$ref": "FlexibleRuntimeSettings",
"description": "Settings for App Engine flexible runtimes."
},
"handlers": {
"description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.",
"items": {
Expand Down
196 changes: 196 additions & 0 deletions src/apis/appengine/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export namespace appengine_v1 {
export class Appengine {
context: APIRequestContext;
apps: Resource$Apps;
projects: Resource$Projects;

constructor(options: GlobalOptions, google?: GoogleConfigurable) {
this.context = {
Expand All @@ -121,6 +122,7 @@ export namespace appengine_v1 {
};

this.apps = new Resource$Apps(this.context);
this.projects = new Resource$Projects(this.context);
}
}

Expand Down Expand Up @@ -8022,4 +8024,198 @@ export namespace appengine_v1 {
*/
versionsId?: string;
}

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

export class Resource$Projects$Locations {
context: APIRequestContext;
applications: Resource$Projects$Locations$Applications;
constructor(context: APIRequestContext) {
this.context = context;
this.applications = new Resource$Projects$Locations$Applications(
this.context
);
}
}

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

/**
* Gets information about an application.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/appengine.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 appengine = google.appengine('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/appengine.admin',
* 'https://www.googleapis.com/auth/cloud-platform',
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
* ],
* });
*
* // 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 appengine.projects.locations.applications.get({
* // Part of `name`. See documentation of `projectsId`.
* applicationsId: 'placeholder-value',
* // Part of `name`. See documentation of `projectsId`.
* locationsId: 'placeholder-value',
* // Part of `name`. Name of the Application resource to get. Example: apps/myapp.
* projectsId: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "authDomain": "my_authDomain",
* // "codeBucket": "my_codeBucket",
* // "databaseType": "my_databaseType",
* // "defaultBucket": "my_defaultBucket",
* // "defaultCookieExpiration": "my_defaultCookieExpiration",
* // "defaultHostname": "my_defaultHostname",
* // "dispatchRules": [],
* // "featureSettings": {},
* // "gcrDomain": "my_gcrDomain",
* // "iap": {},
* // "id": "my_id",
* // "locationId": "my_locationId",
* // "name": "my_name",
* // "serviceAccount": "my_serviceAccount",
* // "servingStatus": "my_servingStatus"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
get(
params: Params$Resource$Projects$Locations$Applications$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Projects$Locations$Applications$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Application>;
get(
params: Params$Resource$Projects$Locations$Applications$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Projects$Locations$Applications$Get,
options: MethodOptions | BodyResponseCallback<Schema$Application>,
callback: BodyResponseCallback<Schema$Application>
): void;
get(
params: Params$Resource$Projects$Locations$Applications$Get,
callback: BodyResponseCallback<Schema$Application>
): void;
get(callback: BodyResponseCallback<Schema$Application>): void;
get(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Applications$Get
| BodyResponseCallback<Schema$Application>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Application>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Application>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Application> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Applications$Get;
let options = (optionsOrCallback || {}) as MethodOptions;

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

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

const rootUrl = options.rootUrl || 'https://appengine.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl +
'/v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['projectsId', 'locationsId', 'applicationsId'],
pathParams: ['applicationsId', 'locationsId', 'projectsId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Application>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Application>(parameters);
}
}
}

export interface Params$Resource$Projects$Locations$Applications$Get
extends StandardParameters {
/**
* Part of `name`. See documentation of `projectsId`.
*/
applicationsId?: string;
/**
* Part of `name`. See documentation of `projectsId`.
*/
locationsId?: string;
/**
* Part of `name`. Name of the Application resource to get. Example: apps/myapp.
*/
projectsId?: string;
}
}
20 changes: 20 additions & 0 deletions src/apis/appengine/v1beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,19 @@ export namespace appengine_v1beta {
*/
sourceRange?: string | null;
}
/**
* Runtime settings for the App Engine flexible environment.
*/
export interface Schema$FlexibleRuntimeSettings {
/**
* The operating system of the application runtime.
*/
operatingSystem?: string | null;
/**
* The runtime version of an App Engine flexible application.
*/
runtimeVersion?: string | null;
}
/**
* Metadata for the given google.cloud.location.Location.
*/
Expand Down Expand Up @@ -1639,6 +1652,10 @@ export namespace appengine_v1beta {
* Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.
*/
errorHandlers?: Schema$ErrorHandler[];
/**
* Settings for App Engine flexible runtimes.
*/
flexibleRuntimeSettings?: Schema$FlexibleRuntimeSettings;
/**
* An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.
*/
Expand Down Expand Up @@ -6522,6 +6539,7 @@ export namespace appengine_v1beta {
* // "env": "my_env",
* // "envVariables": {},
* // "errorHandlers": [],
* // "flexibleRuntimeSettings": {},
* // "handlers": [],
* // "healthCheck": {},
* // "id": "my_id",
Expand Down Expand Up @@ -6848,6 +6866,7 @@ export namespace appengine_v1beta {
* // "env": "my_env",
* // "envVariables": {},
* // "errorHandlers": [],
* // "flexibleRuntimeSettings": {},
* // "handlers": [],
* // "healthCheck": {},
* // "id": "my_id",
Expand Down Expand Up @@ -7168,6 +7187,7 @@ export namespace appengine_v1beta {
* // "env": "my_env",
* // "envVariables": {},
* // "errorHandlers": [],
* // "flexibleRuntimeSettings": {},
* // "handlers": [],
* // "healthCheck": {},
* // "id": "my_id",
Expand Down

0 comments on commit cfde2c1

Please sign in to comment.