Projektstart

This commit is contained in:
2026-01-22 16:04:42 +01:00
parent 57e5f652f8
commit 5174b88af9
2716 changed files with 4225555 additions and 128 deletions

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { abusiveexperiencereport_v1 } from './v1';
export declare const VERSIONS: {
v1: typeof abusiveexperiencereport_v1.Abusiveexperiencereport;
};
export declare function abusiveexperiencereport(version: 'v1'): abusiveexperiencereport_v1.Abusiveexperiencereport;
export declare function abusiveexperiencereport(options: abusiveexperiencereport_v1.Options): abusiveexperiencereport_v1.Abusiveexperiencereport;
declare const auth: AuthPlus;
export { auth };
export { abusiveexperiencereport_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.abusiveexperiencereport_v1 = exports.auth = exports.VERSIONS = void 0;
exports.abusiveexperiencereport = abusiveexperiencereport;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "abusiveexperiencereport_v1", { enumerable: true, get: function () { return v1_1.abusiveexperiencereport_v1; } });
exports.VERSIONS = {
v1: v1_1.abusiveexperiencereport_v1.Abusiveexperiencereport,
};
function abusiveexperiencereport(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('abusiveexperiencereport', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,256 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace abusiveexperiencereport_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Abusive Experience Report API
*
* Views Abusive Experience Report data, and gets a list of sites that have a significant number of abusive experiences.
*
* @example
* ```js
* const {google} = require('googleapis');
* const abusiveexperiencereport = google.abusiveexperiencereport('v1');
* ```
*/
export class Abusiveexperiencereport {
context: APIRequestContext;
sites: Resource$Sites;
violatingSites: Resource$Violatingsites;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Response message for GetSiteSummary.
*/
export interface Schema$SiteSummaryResponse {
/**
* The site's Abusive Experience Report status.
*/
abusiveStatus?: string | null;
/**
* The time at which [enforcement](https://support.google.com/webtools/answer/7538608) against the site began or will begin. Not set when the filter_status is OFF.
*/
enforcementTime?: string | null;
/**
* The site's [enforcement status](https://support.google.com/webtools/answer/7538608).
*/
filterStatus?: string | null;
/**
* The time at which the site's status last changed.
*/
lastChangeTime?: string | null;
/**
* A link to the full Abusive Experience Report for the site. Not set in ViolatingSitesResponse. Note that you must complete the [Search Console verification process](https://support.google.com/webmasters/answer/9008080) for the site before you can access the full report.
*/
reportUrl?: string | null;
/**
* The name of the reviewed site, e.g. `google.com`.
*/
reviewedSite?: string | null;
/**
* Whether the site is currently under review.
*/
underReview?: boolean | null;
}
/**
* Response message for ListViolatingSites.
*/
export interface Schema$ViolatingSitesResponse {
/**
* The list of violating sites.
*/
violatingSites?: Schema$SiteSummaryResponse[];
}
export class Resource$Sites {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Gets a site's Abusive Experience Report summary.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/abusiveexperiencereport.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const abusiveexperiencereport = google.abusiveexperiencereport('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: [],
* });
*
* // 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 abusiveexperiencereport.sites.get({
* // Required. The name of the site whose summary to get, e.g. `sites/http%3A%2F%2Fwww.google.com%2F`. Format: `sites/{site\}`
* name: 'sites/my-site',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "abusiveStatus": "my_abusiveStatus",
* // "enforcementTime": "my_enforcementTime",
* // "filterStatus": "my_filterStatus",
* // "lastChangeTime": "my_lastChangeTime",
* // "reportUrl": "my_reportUrl",
* // "reviewedSite": "my_reviewedSite",
* // "underReview": false
* // }
* }
*
* 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$Sites$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Sites$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$SiteSummaryResponse>>;
get(params: Params$Resource$Sites$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Sites$Get, options: MethodOptions | BodyResponseCallback<Schema$SiteSummaryResponse>, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(params: Params$Resource$Sites$Get, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
}
export interface Params$Resource$Sites$Get extends StandardParameters {
/**
* Required. The name of the site whose summary to get, e.g. `sites/http%3A%2F%2Fwww.google.com%2F`. Format: `sites/{site\}`
*/
name?: string;
}
export class Resource$Violatingsites {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Lists sites that are failing in the Abusive Experience Report.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/abusiveexperiencereport.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const abusiveexperiencereport = google.abusiveexperiencereport('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: [],
* });
*
* // 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 abusiveexperiencereport.violatingSites.list({});
* console.log(res.data);
*
* // Example response
* // {
* // "violatingSites": []
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Violatingsites$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Violatingsites$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ViolatingSitesResponse>>;
list(params: Params$Resource$Violatingsites$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Violatingsites$List, options: MethodOptions | BodyResponseCallback<Schema$ViolatingSitesResponse>, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(params: Params$Resource$Violatingsites$List, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
}
export interface Params$Resource$Violatingsites$List extends StandardParameters {
}
export {};
}

View File

@@ -0,0 +1,126 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.abusiveexperiencereport_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var abusiveexperiencereport_v1;
(function (abusiveexperiencereport_v1) {
/**
* Abusive Experience Report API
*
* Views Abusive Experience Report data, and gets a list of sites that have a significant number of abusive experiences.
*
* @example
* ```js
* const {google} = require('googleapis');
* const abusiveexperiencereport = google.abusiveexperiencereport('v1');
* ```
*/
class Abusiveexperiencereport {
context;
sites;
violatingSites;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.sites = new Resource$Sites(this.context);
this.violatingSites = new Resource$Violatingsites(this.context);
}
}
abusiveexperiencereport_v1.Abusiveexperiencereport = Abusiveexperiencereport;
class Resource$Sites {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://abusiveexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
abusiveexperiencereport_v1.Resource$Sites = Resource$Sites;
class Resource$Violatingsites {
context;
constructor(context) {
this.context = context;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://abusiveexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/violatingSites').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
abusiveexperiencereport_v1.Resource$Violatingsites = Resource$Violatingsites;
})(abusiveexperiencereport_v1 || (exports.abusiveexperiencereport_v1 = abusiveexperiencereport_v1 = {}));

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { acceleratedmobilepageurl_v1 } from './v1';
export declare const VERSIONS: {
v1: typeof acceleratedmobilepageurl_v1.Acceleratedmobilepageurl;
};
export declare function acceleratedmobilepageurl(version: 'v1'): acceleratedmobilepageurl_v1.Acceleratedmobilepageurl;
export declare function acceleratedmobilepageurl(options: acceleratedmobilepageurl_v1.Options): acceleratedmobilepageurl_v1.Acceleratedmobilepageurl;
declare const auth: AuthPlus;
export { auth };
export { acceleratedmobilepageurl_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.acceleratedmobilepageurl_v1 = exports.auth = exports.VERSIONS = void 0;
exports.acceleratedmobilepageurl = acceleratedmobilepageurl;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "acceleratedmobilepageurl_v1", { enumerable: true, get: function () { return v1_1.acceleratedmobilepageurl_v1; } });
exports.VERSIONS = {
v1: v1_1.acceleratedmobilepageurl_v1.Acceleratedmobilepageurl,
};
function acceleratedmobilepageurl(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('acceleratedmobilepageurl', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,211 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace acceleratedmobilepageurl_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Accelerated Mobile Pages (AMP) URL API
*
* Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given list of public URL(s).
*
* @example
* ```js
* const {google} = require('googleapis');
* const acceleratedmobilepageurl = google.acceleratedmobilepageurl('v1');
* ```
*/
export class Acceleratedmobilepageurl {
context: APIRequestContext;
ampUrls: Resource$Ampurls;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* AMP URL response for a requested URL.
*/
export interface Schema$AmpUrl {
/**
* The AMP URL pointing to the publisher's web server.
*/
ampUrl?: string | null;
/**
* The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to the cached document in the Google AMP Cache.
*/
cdnAmpUrl?: string | null;
/**
* The original non-AMP URL.
*/
originalUrl?: string | null;
}
/**
* AMP URL Error resource for a requested URL that couldn't be found.
*/
export interface Schema$AmpUrlError {
/**
* The error code of an API call.
*/
errorCode?: string | null;
/**
* An optional descriptive error message.
*/
errorMessage?: string | null;
/**
* The original non-AMP URL.
*/
originalUrl?: string | null;
}
/**
* AMP URL request for a batch of URLs.
*/
export interface Schema$BatchGetAmpUrlsRequest {
/**
* The lookup_strategy being requested.
*/
lookupStrategy?: string | null;
/**
* List of URLs to look up for the paired AMP URLs. The URLs are case-sensitive. Up to 50 URLs per lookup (see [Usage Limits](/amp/cache/reference/limits)).
*/
urls?: string[] | null;
}
/**
* Batch AMP URL response.
*/
export interface Schema$BatchGetAmpUrlsResponse {
/**
* For each URL in BatchAmpUrlsRequest, the URL response. The response might not be in the same order as URLs in the batch request. If BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated only once.
*/
ampUrls?: Schema$AmpUrl[];
/**
* The errors for requested URLs that have no AMP URL.
*/
urlErrors?: Schema$AmpUrlError[];
}
export class Resource$Ampurls {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Returns AMP URL(s) and equivalent [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/acceleratedmobilepageurl.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const acceleratedmobilepageurl = google.acceleratedmobilepageurl('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: [],
* });
*
* // 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 acceleratedmobilepageurl.ampUrls.batchGet({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "lookupStrategy": "my_lookupStrategy",
* // "urls": []
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "ampUrls": [],
* // "urlErrors": []
* // }
* }
*
* 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.
*/
batchGet(params: Params$Resource$Ampurls$Batchget, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
batchGet(params?: Params$Resource$Ampurls$Batchget, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BatchGetAmpUrlsResponse>>;
batchGet(params: Params$Resource$Ampurls$Batchget, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
batchGet(params: Params$Resource$Ampurls$Batchget, options: MethodOptions | BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>, callback: BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>): void;
batchGet(params: Params$Resource$Ampurls$Batchget, callback: BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>): void;
batchGet(callback: BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>): void;
}
export interface Params$Resource$Ampurls$Batchget extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$BatchGetAmpUrlsRequest;
}
export {};
}

View File

@@ -0,0 +1,85 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.acceleratedmobilepageurl_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var acceleratedmobilepageurl_v1;
(function (acceleratedmobilepageurl_v1) {
/**
* Accelerated Mobile Pages (AMP) URL API
*
* Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given list of public URL(s).
*
* @example
* ```js
* const {google} = require('googleapis');
* const acceleratedmobilepageurl = google.acceleratedmobilepageurl('v1');
* ```
*/
class Acceleratedmobilepageurl {
context;
ampUrls;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.ampUrls = new Resource$Ampurls(this.context);
}
}
acceleratedmobilepageurl_v1.Acceleratedmobilepageurl = Acceleratedmobilepageurl;
class Resource$Ampurls {
context;
constructor(context) {
this.context = context;
}
batchGet(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://acceleratedmobilepageurl.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/ampUrls:batchGet').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
acceleratedmobilepageurl_v1.Resource$Ampurls = Resource$Ampurls;
})(acceleratedmobilepageurl_v1 || (exports.acceleratedmobilepageurl_v1 = acceleratedmobilepageurl_v1 = {}));

View File

@@ -0,0 +1,17 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { accessapproval_v1 } from './v1';
import { accessapproval_v1beta1 } from './v1beta1';
export declare const VERSIONS: {
v1: typeof accessapproval_v1.Accessapproval;
v1beta1: typeof accessapproval_v1beta1.Accessapproval;
};
export declare function accessapproval(version: 'v1'): accessapproval_v1.Accessapproval;
export declare function accessapproval(options: accessapproval_v1.Options): accessapproval_v1.Accessapproval;
export declare function accessapproval(version: 'v1beta1'): accessapproval_v1beta1.Accessapproval;
export declare function accessapproval(options: accessapproval_v1beta1.Options): accessapproval_v1beta1.Accessapproval;
declare const auth: AuthPlus;
export { auth };
export { accessapproval_v1 };
export { accessapproval_v1beta1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,33 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.accessapproval_v1beta1 = exports.accessapproval_v1 = exports.auth = exports.VERSIONS = void 0;
exports.accessapproval = accessapproval;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "accessapproval_v1", { enumerable: true, get: function () { return v1_1.accessapproval_v1; } });
const v1beta1_1 = require("./v1beta1");
Object.defineProperty(exports, "accessapproval_v1beta1", { enumerable: true, get: function () { return v1beta1_1.accessapproval_v1beta1; } });
exports.VERSIONS = {
v1: v1_1.accessapproval_v1.Accessapproval,
v1beta1: v1beta1_1.accessapproval_v1beta1.Accessapproval,
};
function accessapproval(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('accessapproval', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,966 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.accessapproval_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var accessapproval_v1;
(function (accessapproval_v1) {
/**
* Access Approval API
*
* An API for controlling access to data by Google personnel.
*
* @example
* ```js
* const {google} = require('googleapis');
* const accessapproval = google.accessapproval('v1');
* ```
*/
class Accessapproval {
context;
folders;
organizations;
projects;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.folders = new Resource$Folders(this.context);
this.organizations = new Resource$Organizations(this.context);
this.projects = new Resource$Projects(this.context);
}
}
accessapproval_v1.Accessapproval = Accessapproval;
class Resource$Folders {
context;
approvalRequests;
constructor(context) {
this.context = context;
this.approvalRequests = new Resource$Folders$Approvalrequests(this.context);
}
deleteAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getServiceAccount(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1.Resource$Folders = Resource$Folders;
class Resource$Folders$Approvalrequests {
context;
constructor(context) {
this.context = context;
}
approve(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:approve').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
dismiss(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:dismiss').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
invalidate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:invalidate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/approvalRequests').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1.Resource$Folders$Approvalrequests = Resource$Folders$Approvalrequests;
class Resource$Organizations {
context;
approvalRequests;
constructor(context) {
this.context = context;
this.approvalRequests = new Resource$Organizations$Approvalrequests(this.context);
}
deleteAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getServiceAccount(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1.Resource$Organizations = Resource$Organizations;
class Resource$Organizations$Approvalrequests {
context;
constructor(context) {
this.context = context;
}
approve(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:approve').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
dismiss(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:dismiss').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
invalidate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:invalidate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/approvalRequests').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1.Resource$Organizations$Approvalrequests = Resource$Organizations$Approvalrequests;
class Resource$Projects {
context;
approvalRequests;
constructor(context) {
this.context = context;
this.approvalRequests = new Resource$Projects$Approvalrequests(this.context);
}
deleteAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getServiceAccount(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1.Resource$Projects = Resource$Projects;
class Resource$Projects$Approvalrequests {
context;
constructor(context) {
this.context = context;
}
approve(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:approve').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
dismiss(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:dismiss').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
invalidate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:invalidate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/approvalRequests').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1.Resource$Projects$Approvalrequests = Resource$Projects$Approvalrequests;
})(accessapproval_v1 || (exports.accessapproval_v1 = accessapproval_v1 = {}));

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,755 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.accessapproval_v1beta1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/class-name-casing */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var accessapproval_v1beta1;
(function (accessapproval_v1beta1) {
/**
* Access Approval API
*
* An API for controlling access to data by Google personnel.
*
* @example
* const {google} = require('googleapis');
* const accessapproval = google.accessapproval('v1beta1');
*
* @namespace accessapproval
* @type {Function}
* @version v1beta1
* @variation v1beta1
* @param {object=} options Options for Accessapproval
*/
class Accessapproval {
context;
folders;
organizations;
projects;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.folders = new Resource$Folders(this.context);
this.organizations = new Resource$Organizations(this.context);
this.projects = new Resource$Projects(this.context);
}
}
accessapproval_v1beta1.Accessapproval = Accessapproval;
class Resource$Folders {
context;
approvalRequests;
constructor(context) {
this.context = context;
this.approvalRequests = new Resource$Folders$Approvalrequests(this.context);
}
deleteAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1beta1.Resource$Folders = Resource$Folders;
class Resource$Folders$Approvalrequests {
context;
constructor(context) {
this.context = context;
}
approve(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:approve').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
dismiss(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:dismiss').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}/approvalRequests').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1beta1.Resource$Folders$Approvalrequests = Resource$Folders$Approvalrequests;
class Resource$Organizations {
context;
approvalRequests;
constructor(context) {
this.context = context;
this.approvalRequests = new Resource$Organizations$Approvalrequests(this.context);
}
deleteAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1beta1.Resource$Organizations = Resource$Organizations;
class Resource$Organizations$Approvalrequests {
context;
constructor(context) {
this.context = context;
}
approve(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:approve').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
dismiss(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:dismiss').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}/approvalRequests').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1beta1.Resource$Organizations$Approvalrequests = Resource$Organizations$Approvalrequests;
class Resource$Projects {
context;
approvalRequests;
constructor(context) {
this.context = context;
this.approvalRequests = new Resource$Projects$Approvalrequests(this.context);
}
deleteAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateAccessApprovalSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1beta1.Resource$Projects = Resource$Projects;
class Resource$Projects$Approvalrequests {
context;
constructor(context) {
this.context = context;
}
approve(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:approve').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
dismiss(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:dismiss').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accessapproval.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}/approvalRequests').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accessapproval_v1beta1.Resource$Projects$Approvalrequests = Resource$Projects$Approvalrequests;
})(accessapproval_v1beta1 || (exports.accessapproval_v1beta1 = accessapproval_v1beta1 = {}));

View File

@@ -0,0 +1,17 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { accesscontextmanager_v1 } from './v1';
import { accesscontextmanager_v1beta } from './v1beta';
export declare const VERSIONS: {
v1: typeof accesscontextmanager_v1.Accesscontextmanager;
v1beta: typeof accesscontextmanager_v1beta.Accesscontextmanager;
};
export declare function accesscontextmanager(version: 'v1'): accesscontextmanager_v1.Accesscontextmanager;
export declare function accesscontextmanager(options: accesscontextmanager_v1.Options): accesscontextmanager_v1.Accesscontextmanager;
export declare function accesscontextmanager(version: 'v1beta'): accesscontextmanager_v1beta.Accesscontextmanager;
export declare function accesscontextmanager(options: accesscontextmanager_v1beta.Options): accesscontextmanager_v1beta.Accesscontextmanager;
declare const auth: AuthPlus;
export { auth };
export { accesscontextmanager_v1 };
export { accesscontextmanager_v1beta };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,33 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.accesscontextmanager_v1beta = exports.accesscontextmanager_v1 = exports.auth = exports.VERSIONS = void 0;
exports.accesscontextmanager = accesscontextmanager;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "accesscontextmanager_v1", { enumerable: true, get: function () { return v1_1.accesscontextmanager_v1; } });
const v1beta_1 = require("./v1beta");
Object.defineProperty(exports, "accesscontextmanager_v1beta", { enumerable: true, get: function () { return v1beta_1.accesscontextmanager_v1beta; } });
exports.VERSIONS = {
v1: v1_1.accesscontextmanager_v1.Accesscontextmanager,
v1beta: v1beta_1.accesscontextmanager_v1beta.Accesscontextmanager,
};
function accesscontextmanager(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('accesscontextmanager', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,792 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace accesscontextmanager_v1beta {
export interface Options extends GlobalOptions {
version: 'v1beta';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Access Context Manager API
*
* An API for setting attribute based access control to requests to Google Cloud services.
*
* @example
* ```js
* const {google} = require('googleapis');
* const accesscontextmanager = google.accesscontextmanager('v1beta');
* ```
*/
export class Accesscontextmanager {
context: APIRequestContext;
accessPolicies: Resource$Accesspolicies;
operations: Resource$Operations;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Metadata of Access Context Manager's Long Running Operations.
*/
export interface Schema$AccessContextManagerOperationMetadata {
}
/**
* An `AccessLevel` is a label that can be applied to requests to Google Cloud services, along with a list of requirements necessary for the label to be applied.
*/
export interface Schema$AccessLevel {
/**
* A `BasicLevel` composed of `Conditions`.
*/
basic?: Schema$BasicLevel;
/**
* A `CustomLevel` written in the Common Expression Language.
*/
custom?: Schema$CustomLevel;
/**
* Description of the `AccessLevel` and its use. Does not affect behavior.
*/
description?: string | null;
/**
* Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy\}/accessLevels/{access_level\}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.
*/
name?: string | null;
/**
* Human readable title. Must be unique within the Policy.
*/
title?: string | null;
}
/**
* `AccessPolicy` is a container for `AccessLevels` (which define the necessary attributes to use Google Cloud services) and `ServicePerimeters` (which define regions of services able to freely pass data within a perimeter). An access policy is globally visible within an organization, and the restrictions it specifies apply to all projects within an organization.
*/
export interface Schema$AccessPolicy {
/**
* Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{policy_id\}`
*/
name?: string | null;
/**
* Required. The parent of this `AccessPolicy` in the Cloud Resource Hierarchy. Currently immutable once created. Format: `organizations/{organization_id\}`
*/
parent?: string | null;
/**
* Required. Human readable title. Does not affect behavior.
*/
title?: string | null;
}
/**
* `BasicLevel` is an `AccessLevel` using a set of recommended features.
*/
export interface Schema$BasicLevel {
/**
* How the `conditions` list should be combined to determine if a request is granted this `AccessLevel`. If AND is used, each `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. If OR is used, at least one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. Default behavior is AND.
*/
combiningFunction?: string | null;
/**
* Required. A list of requirements for the `AccessLevel` to be granted.
*/
conditions?: Schema$Condition[];
}
/**
* A condition necessary for an `AccessLevel` to be granted. The Condition is an AND over its fields. So a Condition is true if: 1) the request IP is from one of the listed subnetworks AND 2) the originating device complies with the listed device policy AND 3) all listed access levels are granted AND 4) the request was sent at a time allowed by the DateTimeRestriction.
*/
export interface Schema$Condition {
/**
* Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed.
*/
devicePolicy?: Schema$DevicePolicy;
/**
* CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.
*/
ipSubnetworks?: string[] | null;
/**
* The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: `user:{emailid\}` `serviceAccount:{emailid\}` If not specified, a request may come from any user.
*/
members?: string[] | null;
/**
* Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields. Any non-empty field criteria evaluating to false will result in the Condition to be satisfied. Defaults to false.
*/
negate?: boolean | null;
/**
* The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes.
*/
regions?: string[] | null;
/**
* A list of other access levels defined in the same `Policy`, referenced by resource name. Referencing an `AccessLevel` which does not exist is an error. All access levels listed must be granted for the Condition to be true. Example: "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"`
*/
requiredAccessLevels?: string[] | null;
}
/**
* `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec
*/
export interface Schema$CustomLevel {
/**
* Required. A Cloud CEL expression evaluating to a boolean.
*/
expr?: Schema$Expr;
}
/**
* `DevicePolicy` specifies device specific restrictions necessary to acquire a given access level. A `DevicePolicy` specifies requirements for requests from devices to be granted access levels, it does not do any enforcement on the device. `DevicePolicy` acts as an AND over all specified fields, and each repeated field is an OR over its elements. Any unset fields are ignored. For example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX, encryption_status: ENCRYPTED\}, then the DevicePolicy will be true for requests originating from encrypted Linux desktops and encrypted Windows desktops.
*/
export interface Schema$DevicePolicy {
/**
* Allowed device management levels, an empty list allows all management levels.
*/
allowedDeviceManagementLevels?: string[] | null;
/**
* Allowed encryptions statuses, an empty list allows all statuses.
*/
allowedEncryptionStatuses?: string[] | null;
/**
* Allowed OS versions, an empty list allows all types and all versions.
*/
osConstraints?: Schema$OsConstraint[];
/**
* Whether the device needs to be approved by the customer admin.
*/
requireAdminApproval?: boolean | null;
/**
* Whether the device needs to be corp owned.
*/
requireCorpOwned?: boolean | null;
/**
* Whether or not screenlock is required for the DevicePolicy to be true. Defaults to `false`.
*/
requireScreenlock?: boolean | null;
}
/**
* Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
*/
export interface Schema$Expr {
/**
* Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
*/
description?: string | null;
/**
* Textual representation of an expression in Common Expression Language syntax.
*/
expression?: string | null;
/**
* Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
*/
location?: string | null;
/**
* Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
*/
title?: string | null;
}
/**
* A response to `ListAccessLevelsRequest`.
*/
export interface Schema$ListAccessLevelsResponse {
/**
* List of the Access Level instances.
*/
accessLevels?: Schema$AccessLevel[];
/**
* The pagination token to retrieve the next page of results. If the value is empty, no further results remain.
*/
nextPageToken?: string | null;
}
/**
* A response to `ListAccessPoliciesRequest`.
*/
export interface Schema$ListAccessPoliciesResponse {
/**
* List of the AccessPolicy instances.
*/
accessPolicies?: Schema$AccessPolicy[];
/**
* The pagination token to retrieve the next page of results. If the value is empty, no further results remain.
*/
nextPageToken?: string | null;
}
/**
* A response to `ListServicePerimetersRequest`.
*/
export interface Schema$ListServicePerimetersResponse {
/**
* The pagination token to retrieve the next page of results. If the value is empty, no further results remain.
*/
nextPageToken?: string | null;
/**
* List of the Service Perimeter instances.
*/
servicePerimeters?: Schema$ServicePerimeter[];
}
/**
* This resource represents a long-running operation that is the result of a network API call.
*/
export interface Schema$Operation {
/**
* If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
*/
done?: boolean | null;
/**
* The error result of the operation in case of failure or cancellation.
*/
error?: Schema$Status;
/**
* Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
*/
metadata?: {
[key: string]: any;
} | null;
/**
* The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`.
*/
name?: string | null;
/**
* The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*/
response?: {
[key: string]: any;
} | null;
}
/**
* A restriction on the OS type and version of devices making requests.
*/
export interface Schema$OsConstraint {
/**
* The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: `"major.minor.patch"`. Examples: `"10.5.301"`, `"9.2.1"`.
*/
minimumVersion?: string | null;
/**
* Required. The allowed OS type.
*/
osType?: string | null;
/**
* Only allows requests from devices with a verified Chrome OS. Verifications includes requirements that the device is enterprise-managed, conformant to domain policies, and the caller has permission to call the API targeted by the request.
*/
requireVerifiedChromeOs?: boolean | null;
}
/**
* `ServicePerimeter` describes a set of Google Cloud resources which can freely import and export data amongst themselves, but not export outside of the `ServicePerimeter`. If a request with a source within this `ServicePerimeter` has a target outside of the `ServicePerimeter`, the request will be blocked. Otherwise the request is allowed. There are two types of Service Perimeter - Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google Cloud project can only belong to a single regular Service Perimeter. Service Perimeter Bridges can contain only Google Cloud projects as members, a single Google Cloud project may belong to multiple Service Perimeter Bridges.
*/
export interface Schema$ServicePerimeter {
/**
* Description of the `ServicePerimeter` and its use. Does not affect behavior.
*/
description?: string | null;
/**
* Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy\}/servicePerimeters/{service_perimeter\}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.
*/
name?: string | null;
/**
* Perimeter type indicator. A single project is allowed to be a member of single regular perimeter, but multiple service perimeter bridges. A project cannot be a included in a perimeter bridge without being included in regular perimeter. For perimeter bridges, restricted/unrestricted service lists as well as access lists must be empty.
*/
perimeterType?: string | null;
/**
* Current ServicePerimeter configuration. Specifies sets of resources, restricted/unrestricted services and access levels that determine perimeter content and boundaries.
*/
status?: Schema$ServicePerimeterConfig;
/**
* Human readable title. Must be unique within the Policy.
*/
title?: string | null;
}
/**
* `ServicePerimeterConfig` specifies a set of Google Cloud resources that describe specific Service Perimeter configuration.
*/
export interface Schema$ServicePerimeterConfig {
/**
* A list of `AccessLevel` resource names that allow resources within the `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty.
*/
accessLevels?: string[] | null;
/**
* A list of Google Cloud resources that are inside of the service perimeter. Currently only projects are allowed. Format: `projects/{project_number\}`
*/
resources?: string[] | null;
/**
* Google Cloud services that are subject to the Service Perimeter restrictions. Must contain a list of services. For example, if `storage.googleapis.com` is specified, access to the storage buckets inside the perimeter must meet the perimeter's access restrictions.
*/
restrictedServices?: string[] | null;
/**
* Google Cloud services that are not subject to the Service Perimeter restrictions. Deprecated. Must be set to a single wildcard "*". The wildcard means that unless explicitly specified by "restricted_services" list, any service is treated as unrestricted.
*/
unrestrictedServices?: string[] | null;
/**
* Beta. Configuration for APIs allowed within Perimeter.
*/
vpcAccessibleServices?: Schema$VpcAccessibleServices;
}
/**
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
*/
export interface Schema$Status {
/**
* The status code, which should be an enum value of google.rpc.Code.
*/
code?: number | null;
/**
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
*/
details?: Array<{
[key: string]: any;
}> | null;
/**
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
*/
message?: string | null;
}
/**
* Specifies how APIs are allowed to communicate within the Service Perimeter.
*/
export interface Schema$VpcAccessibleServices {
/**
* The list of APIs usable within the Service Perimeter. Must be empty unless 'enable_restriction' is True. You can specify a list of individual services, as well as include the 'RESTRICTED-SERVICES' value, which automatically includes all of the services protected by the perimeter.
*/
allowedServices?: string[] | null;
/**
* Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowed_services'.
*/
enableRestriction?: boolean | null;
}
export class Resource$Accesspolicies {
context: APIRequestContext;
accessLevels: Resource$Accesspolicies$Accesslevels;
servicePerimeters: Resource$Accesspolicies$Serviceperimeters;
constructor(context: APIRequestContext);
/**
* Create an `AccessPolicy`. Fails if this organization already has a `AccessPolicy`. The longrunning Operation will have a successful status once the `AccessPolicy` has propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in `metadata` as a BadRequest proto.
*
* @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.
*/
create(params: Params$Resource$Accesspolicies$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
create(params?: Params$Resource$Accesspolicies$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
create(params: Params$Resource$Accesspolicies$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
create(params: Params$Resource$Accesspolicies$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
create(params: Params$Resource$Accesspolicies$Create, callback: BodyResponseCallback<Schema$Operation>): void;
create(callback: BodyResponseCallback<Schema$Operation>): void;
/**
* Delete an AccessPolicy by resource name. The longrunning Operation will have a successful status once the AccessPolicy has been removed from long-lasting storage.
*
* @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.
*/
delete(params: Params$Resource$Accesspolicies$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
delete(params?: Params$Resource$Accesspolicies$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
delete(params: Params$Resource$Accesspolicies$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
delete(params: Params$Resource$Accesspolicies$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
delete(params: Params$Resource$Accesspolicies$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
delete(callback: BodyResponseCallback<Schema$Operation>): void;
/**
* Get an AccessPolicy by name.
*
* @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$Accesspolicies$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Accesspolicies$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AccessPolicy>>;
get(params: Params$Resource$Accesspolicies$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Accesspolicies$Get, options: MethodOptions | BodyResponseCallback<Schema$AccessPolicy>, callback: BodyResponseCallback<Schema$AccessPolicy>): void;
get(params: Params$Resource$Accesspolicies$Get, callback: BodyResponseCallback<Schema$AccessPolicy>): void;
get(callback: BodyResponseCallback<Schema$AccessPolicy>): void;
/**
* List all AccessPolicies under a container.
*
* @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.
*/
list(params: Params$Resource$Accesspolicies$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Accesspolicies$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListAccessPoliciesResponse>>;
list(params: Params$Resource$Accesspolicies$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Accesspolicies$List, options: MethodOptions | BodyResponseCallback<Schema$ListAccessPoliciesResponse>, callback: BodyResponseCallback<Schema$ListAccessPoliciesResponse>): void;
list(params: Params$Resource$Accesspolicies$List, callback: BodyResponseCallback<Schema$ListAccessPoliciesResponse>): void;
list(callback: BodyResponseCallback<Schema$ListAccessPoliciesResponse>): void;
/**
* Update an AccessPolicy. The longrunning Operation from this RPC will have a successful status once the changes to the AccessPolicy have propagated to long-lasting storage. Syntactic and basic semantic errors will be returned in `metadata` as a BadRequest proto.
*
* @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.
*/
patch(params: Params$Resource$Accesspolicies$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
patch(params?: Params$Resource$Accesspolicies$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
patch(params: Params$Resource$Accesspolicies$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
patch(params: Params$Resource$Accesspolicies$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
patch(params: Params$Resource$Accesspolicies$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
patch(callback: BodyResponseCallback<Schema$Operation>): void;
}
export interface Params$Resource$Accesspolicies$Create extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$AccessPolicy;
}
export interface Params$Resource$Accesspolicies$Delete extends StandardParameters {
/**
* Required. Resource name for the access policy to delete. Format `accessPolicies/{policy_id\}`
*/
name?: string;
}
export interface Params$Resource$Accesspolicies$Get extends StandardParameters {
/**
* Required. Resource name for the access policy to get. Format `accessPolicies/{policy_id\}`
*/
name?: string;
}
export interface Params$Resource$Accesspolicies$List extends StandardParameters {
/**
* Number of AccessPolicy instances to include in the list. Default 100.
*/
pageSize?: number;
/**
* Next page token for the next batch of AccessPolicy instances. Defaults to the first page of results.
*/
pageToken?: string;
/**
* Required. Resource name for the container to list AccessPolicy instances from. Format: `organizations/{org_id\}`
*/
parent?: string;
}
export interface Params$Resource$Accesspolicies$Patch extends StandardParameters {
/**
* Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{policy_id\}`
*/
name?: string;
/**
* Required. Mask to control which fields get updated. Must be non-empty.
*/
updateMask?: string;
/**
* Request body metadata
*/
requestBody?: Schema$AccessPolicy;
}
export class Resource$Accesspolicies$Accesslevels {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Create an Access Level. The longrunning operation from this RPC will have a successful status once the Access Level has propagated to long-lasting storage. Access Levels containing errors will result in an error response for the first error encountered.
*
* @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.
*/
create(params: Params$Resource$Accesspolicies$Accesslevels$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
create(params?: Params$Resource$Accesspolicies$Accesslevels$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
create(params: Params$Resource$Accesspolicies$Accesslevels$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
create(params: Params$Resource$Accesspolicies$Accesslevels$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
create(params: Params$Resource$Accesspolicies$Accesslevels$Create, callback: BodyResponseCallback<Schema$Operation>): void;
create(callback: BodyResponseCallback<Schema$Operation>): void;
/**
* Delete an Access Level by resource name. The longrunning operation from this RPC will have a successful status once the Access Level has been removed from long-lasting storage.
*
* @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.
*/
delete(params: Params$Resource$Accesspolicies$Accesslevels$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
delete(params?: Params$Resource$Accesspolicies$Accesslevels$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
delete(params: Params$Resource$Accesspolicies$Accesslevels$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
delete(params: Params$Resource$Accesspolicies$Accesslevels$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
delete(params: Params$Resource$Accesspolicies$Accesslevels$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
delete(callback: BodyResponseCallback<Schema$Operation>): void;
/**
* Get an Access Level by resource name.
*
* @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$Accesspolicies$Accesslevels$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Accesspolicies$Accesslevels$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AccessLevel>>;
get(params: Params$Resource$Accesspolicies$Accesslevels$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Accesspolicies$Accesslevels$Get, options: MethodOptions | BodyResponseCallback<Schema$AccessLevel>, callback: BodyResponseCallback<Schema$AccessLevel>): void;
get(params: Params$Resource$Accesspolicies$Accesslevels$Get, callback: BodyResponseCallback<Schema$AccessLevel>): void;
get(callback: BodyResponseCallback<Schema$AccessLevel>): void;
/**
* List all Access Levels for an access policy.
*
* @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.
*/
list(params: Params$Resource$Accesspolicies$Accesslevels$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Accesspolicies$Accesslevels$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListAccessLevelsResponse>>;
list(params: Params$Resource$Accesspolicies$Accesslevels$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Accesspolicies$Accesslevels$List, options: MethodOptions | BodyResponseCallback<Schema$ListAccessLevelsResponse>, callback: BodyResponseCallback<Schema$ListAccessLevelsResponse>): void;
list(params: Params$Resource$Accesspolicies$Accesslevels$List, callback: BodyResponseCallback<Schema$ListAccessLevelsResponse>): void;
list(callback: BodyResponseCallback<Schema$ListAccessLevelsResponse>): void;
/**
* Update an Access Level. The longrunning operation from this RPC will have a successful status once the changes to the Access Level have propagated to long-lasting storage. Access Levels containing errors will result in an error response for the first error encountered.
*
* @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.
*/
patch(params: Params$Resource$Accesspolicies$Accesslevels$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
patch(params?: Params$Resource$Accesspolicies$Accesslevels$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
patch(params: Params$Resource$Accesspolicies$Accesslevels$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
patch(params: Params$Resource$Accesspolicies$Accesslevels$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
patch(params: Params$Resource$Accesspolicies$Accesslevels$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
patch(callback: BodyResponseCallback<Schema$Operation>): void;
}
export interface Params$Resource$Accesspolicies$Accesslevels$Create extends StandardParameters {
/**
* Required. Resource name for the access policy which owns this Access Level. Format: `accessPolicies/{policy_id\}`
*/
parent?: string;
/**
* Request body metadata
*/
requestBody?: Schema$AccessLevel;
}
export interface Params$Resource$Accesspolicies$Accesslevels$Delete extends StandardParameters {
/**
* Required. Resource name for the Access Level. Format: `accessPolicies/{policy_id\}/accessLevels/{access_level_id\}`
*/
name?: string;
}
export interface Params$Resource$Accesspolicies$Accesslevels$Get extends StandardParameters {
/**
* Whether to return `BasicLevels` in the Cloud Common Expression Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where Access Levels are returned as `BasicLevels` or `CustomLevels` based on how they were created. If set to CEL, all Access Levels are returned as `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent `CustomLevels`.
*/
accessLevelFormat?: string;
/**
* Required. Resource name for the Access Level. Format: `accessPolicies/{policy_id\}/accessLevels/{access_level_id\}`
*/
name?: string;
}
export interface Params$Resource$Accesspolicies$Accesslevels$List extends StandardParameters {
/**
* Whether to return `BasicLevels` in the Cloud Common Expression language, as `CustomLevels`, rather than as `BasicLevels`. Defaults to returning `AccessLevels` in the format they were defined.
*/
accessLevelFormat?: string;
/**
* Number of Access Levels to include in the list. Default 100.
*/
pageSize?: number;
/**
* Next page token for the next batch of Access Level instances. Defaults to the first page of results.
*/
pageToken?: string;
/**
* Required. Resource name for the access policy to list Access Levels from. Format: `accessPolicies/{policy_id\}`
*/
parent?: string;
}
export interface Params$Resource$Accesspolicies$Accesslevels$Patch extends StandardParameters {
/**
* Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy\}/accessLevels/{access_level\}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.
*/
name?: string;
/**
* Required. Mask to control which fields get updated. Must be non-empty.
*/
updateMask?: string;
/**
* Request body metadata
*/
requestBody?: Schema$AccessLevel;
}
export class Resource$Accesspolicies$Serviceperimeters {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Create a Service Perimeter. The longrunning operation from this RPC will have a successful status once the Service Perimeter has propagated to long-lasting storage. Service Perimeters containing errors will result in an error response for the first error encountered.
*
* @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.
*/
create(params: Params$Resource$Accesspolicies$Serviceperimeters$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
create(params?: Params$Resource$Accesspolicies$Serviceperimeters$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
create(params: Params$Resource$Accesspolicies$Serviceperimeters$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
create(params: Params$Resource$Accesspolicies$Serviceperimeters$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
create(params: Params$Resource$Accesspolicies$Serviceperimeters$Create, callback: BodyResponseCallback<Schema$Operation>): void;
create(callback: BodyResponseCallback<Schema$Operation>): void;
/**
* Delete a Service Perimeter by resource name. The longrunning operation from this RPC will have a successful status once the Service Perimeter has been removed from long-lasting storage.
*
* @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.
*/
delete(params: Params$Resource$Accesspolicies$Serviceperimeters$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
delete(params?: Params$Resource$Accesspolicies$Serviceperimeters$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
delete(params: Params$Resource$Accesspolicies$Serviceperimeters$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
delete(params: Params$Resource$Accesspolicies$Serviceperimeters$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
delete(params: Params$Resource$Accesspolicies$Serviceperimeters$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
delete(callback: BodyResponseCallback<Schema$Operation>): void;
/**
* Get a Service Perimeter by resource name.
*
* @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$Accesspolicies$Serviceperimeters$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Accesspolicies$Serviceperimeters$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ServicePerimeter>>;
get(params: Params$Resource$Accesspolicies$Serviceperimeters$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Accesspolicies$Serviceperimeters$Get, options: MethodOptions | BodyResponseCallback<Schema$ServicePerimeter>, callback: BodyResponseCallback<Schema$ServicePerimeter>): void;
get(params: Params$Resource$Accesspolicies$Serviceperimeters$Get, callback: BodyResponseCallback<Schema$ServicePerimeter>): void;
get(callback: BodyResponseCallback<Schema$ServicePerimeter>): void;
/**
* List all Service Perimeters for an access policy.
*
* @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.
*/
list(params: Params$Resource$Accesspolicies$Serviceperimeters$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Accesspolicies$Serviceperimeters$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListServicePerimetersResponse>>;
list(params: Params$Resource$Accesspolicies$Serviceperimeters$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Accesspolicies$Serviceperimeters$List, options: MethodOptions | BodyResponseCallback<Schema$ListServicePerimetersResponse>, callback: BodyResponseCallback<Schema$ListServicePerimetersResponse>): void;
list(params: Params$Resource$Accesspolicies$Serviceperimeters$List, callback: BodyResponseCallback<Schema$ListServicePerimetersResponse>): void;
list(callback: BodyResponseCallback<Schema$ListServicePerimetersResponse>): void;
/**
* Update a Service Perimeter. The longrunning operation from this RPC will have a successful status once the changes to the Service Perimeter have propagated to long-lasting storage. Service Perimeter containing errors will result in an error response for the first error encountered.
*
* @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.
*/
patch(params: Params$Resource$Accesspolicies$Serviceperimeters$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
patch(params?: Params$Resource$Accesspolicies$Serviceperimeters$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
patch(params: Params$Resource$Accesspolicies$Serviceperimeters$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
patch(params: Params$Resource$Accesspolicies$Serviceperimeters$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
patch(params: Params$Resource$Accesspolicies$Serviceperimeters$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
patch(callback: BodyResponseCallback<Schema$Operation>): void;
}
export interface Params$Resource$Accesspolicies$Serviceperimeters$Create extends StandardParameters {
/**
* Required. Resource name for the access policy which owns this Service Perimeter. Format: `accessPolicies/{policy_id\}`
*/
parent?: string;
/**
* Request body metadata
*/
requestBody?: Schema$ServicePerimeter;
}
export interface Params$Resource$Accesspolicies$Serviceperimeters$Delete extends StandardParameters {
/**
* Required. Resource name for the Service Perimeter. Format: `accessPolicies/{policy_id\}/servicePerimeters/{service_perimeter_id\}`
*/
name?: string;
}
export interface Params$Resource$Accesspolicies$Serviceperimeters$Get extends StandardParameters {
/**
* Required. Resource name for the Service Perimeter. Format: `accessPolicies/{policy_id\}/servicePerimeters/{service_perimeters_id\}`
*/
name?: string;
}
export interface Params$Resource$Accesspolicies$Serviceperimeters$List extends StandardParameters {
/**
* Number of Service Perimeters to include in the list. Default 100.
*/
pageSize?: number;
/**
* Next page token for the next batch of Service Perimeter instances. Defaults to the first page of results.
*/
pageToken?: string;
/**
* Required. Resource name for the access policy to list Service Perimeters from. Format: `accessPolicies/{policy_id\}`
*/
parent?: string;
}
export interface Params$Resource$Accesspolicies$Serviceperimeters$Patch extends StandardParameters {
/**
* Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy\}/servicePerimeters/{service_perimeter\}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.
*/
name?: string;
/**
* Required. Mask to control which fields get updated. Must be non-empty.
*/
updateMask?: string;
/**
* Request body metadata
*/
requestBody?: Schema$ServicePerimeter;
}
export class Resource$Operations {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* 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.
*
* @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$Operations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Operations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
get(params: Params$Resource$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
get(params: Params$Resource$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
get(callback: BodyResponseCallback<Schema$Operation>): void;
}
export interface Params$Resource$Operations$Get extends StandardParameters {
/**
* The name of the operation resource.
*/
name?: string;
}
export {};
}

View File

@@ -0,0 +1,576 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.accesscontextmanager_v1beta = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var accesscontextmanager_v1beta;
(function (accesscontextmanager_v1beta) {
/**
* Access Context Manager API
*
* An API for setting attribute based access control to requests to Google Cloud services.
*
* @example
* ```js
* const {google} = require('googleapis');
* const accesscontextmanager = google.accesscontextmanager('v1beta');
* ```
*/
class Accesscontextmanager {
context;
accessPolicies;
operations;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accessPolicies = new Resource$Accesspolicies(this.context);
this.operations = new Resource$Operations(this.context);
}
}
accesscontextmanager_v1beta.Accesscontextmanager = Accesscontextmanager;
class Resource$Accesspolicies {
context;
accessLevels;
servicePerimeters;
constructor(context) {
this.context = context;
this.accessLevels = new Resource$Accesspolicies$Accesslevels(this.context);
this.servicePerimeters = new Resource$Accesspolicies$Serviceperimeters(this.context);
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/accessPolicies').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/accessPolicies').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accesscontextmanager_v1beta.Resource$Accesspolicies = Resource$Accesspolicies;
class Resource$Accesspolicies$Accesslevels {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/accessLevels').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/accessLevels').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accesscontextmanager_v1beta.Resource$Accesspolicies$Accesslevels = Resource$Accesspolicies$Accesslevels;
class Resource$Accesspolicies$Serviceperimeters {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/servicePerimeters').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/servicePerimeters').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accesscontextmanager_v1beta.Resource$Accesspolicies$Serviceperimeters = Resource$Accesspolicies$Serviceperimeters;
class Resource$Operations {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://accesscontextmanager.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
accesscontextmanager_v1beta.Resource$Operations = Resource$Operations;
})(accesscontextmanager_v1beta || (exports.accesscontextmanager_v1beta = accesscontextmanager_v1beta = {}));

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { acmedns_v1 } from './v1';
export declare const VERSIONS: {
v1: typeof acmedns_v1.Acmedns;
};
export declare function acmedns(version: 'v1'): acmedns_v1.Acmedns;
export declare function acmedns(options: acmedns_v1.Options): acmedns_v1.Acmedns;
declare const auth: AuthPlus;
export { auth };
export { acmedns_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.acmedns_v1 = exports.auth = exports.VERSIONS = void 0;
exports.acmedns = acmedns;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "acmedns_v1", { enumerable: true, get: function () { return v1_1.acmedns_v1; } });
exports.VERSIONS = {
v1: v1_1.acmedns_v1.Acmedns,
};
function acmedns(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('acmedns', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,169 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace acmedns_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* ACME DNS API
*
* Google Domains ACME DNS API that allows users to complete ACME DNS-01 challenges for a domain.
*
* @example
* ```js
* const {google} = require('googleapis');
* const acmedns = google.acmedns('v1');
* ```
*/
export class Acmedns {
context: APIRequestContext;
acmeChallengeSets: Resource$Acmechallengesets;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* The up-to-date ACME challenge set on a domain for an RPC. This contains all of the ACME TXT records that exist on the domain.
*/
export interface Schema$AcmeChallengeSet {
/**
* The ACME challenges on the requested domain represented as individual TXT records.
*/
record?: Schema$AcmeTxtRecord[];
}
/**
* The TXT record message that represents an ACME DNS-01 challenge.
*/
export interface Schema$AcmeTxtRecord {
/**
* Holds the ACME challenge data put in the TXT record. This will be checked to be a valid TXT record data entry.
*/
digest?: string | null;
/**
* The domain/subdomain for the record. In a request, this MAY be Unicode or Punycode. In a response, this will be in Unicode. The fqdn MUST contain the root_domain field on the request.
*/
fqdn?: string | null;
/**
* Output only. The time when this record was last updated. This will be in UTC time.
*/
updateTime?: string | null;
}
/**
* The request message for the RotateChallenges RPC. Requires an access token, a root domain, and either records_to_add or records_to_remove to be populated. Records may be set for multiple subdomains at once to support SAN requests for multiple subdomains in a single domain. By default, ACME TXT record challenges that are older than 30 days will be removed. Set `keep_expired_records` to false if this behavior is undesired. There is a record maximum of 100 records per domain including expired records. Any request sent that would exceed this maximum will result in a FAILED_PRECONDITION error. NEXT ID: 6
*/
export interface Schema$RotateChallengesRequest {
/**
* Required. ACME DNS access token. This is a base64 token secret that is procured from the Google Domains website. It authorizes ACME TXT record updates for a domain.
*/
accessToken?: string | null;
/**
* Keep records older than 30 days that were used for previous requests.
*/
keepExpiredRecords?: boolean | null;
/**
* ACME TXT record challenges to add. Supports multiple challenges on the same FQDN.
*/
recordsToAdd?: Schema$AcmeTxtRecord[];
/**
* ACME TXT record challenges to remove.
*/
recordsToRemove?: Schema$AcmeTxtRecord[];
}
export class Resource$Acmechallengesets {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Gets the ACME challenge set for a given domain name. Domain names must be provided in Punycode.
*
* @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$Acmechallengesets$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Acmechallengesets$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AcmeChallengeSet>>;
get(params: Params$Resource$Acmechallengesets$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Acmechallengesets$Get, options: MethodOptions | BodyResponseCallback<Schema$AcmeChallengeSet>, callback: BodyResponseCallback<Schema$AcmeChallengeSet>): void;
get(params: Params$Resource$Acmechallengesets$Get, callback: BodyResponseCallback<Schema$AcmeChallengeSet>): void;
get(callback: BodyResponseCallback<Schema$AcmeChallengeSet>): void;
/**
* Rotate the ACME challenges for a given domain name. By default, removes any challenges that are older than 30 days. Domain names must be provided in Punycode.
*
* @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.
*/
rotateChallenges(params: Params$Resource$Acmechallengesets$Rotatechallenges, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
rotateChallenges(params?: Params$Resource$Acmechallengesets$Rotatechallenges, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AcmeChallengeSet>>;
rotateChallenges(params: Params$Resource$Acmechallengesets$Rotatechallenges, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
rotateChallenges(params: Params$Resource$Acmechallengesets$Rotatechallenges, options: MethodOptions | BodyResponseCallback<Schema$AcmeChallengeSet>, callback: BodyResponseCallback<Schema$AcmeChallengeSet>): void;
rotateChallenges(params: Params$Resource$Acmechallengesets$Rotatechallenges, callback: BodyResponseCallback<Schema$AcmeChallengeSet>): void;
rotateChallenges(callback: BodyResponseCallback<Schema$AcmeChallengeSet>): void;
}
export interface Params$Resource$Acmechallengesets$Get extends StandardParameters {
/**
* Required. SLD + TLD domain name to list challenges. For example, this would be "google.com" for any FQDN under "google.com". That includes challenges for "subdomain.google.com". This MAY be Unicode or Punycode.
*/
rootDomain?: string;
}
export interface Params$Resource$Acmechallengesets$Rotatechallenges extends StandardParameters {
/**
* Required. SLD + TLD domain name to update records for. For example, this would be "google.com" for any FQDN under "google.com". That includes challenges for "subdomain.google.com". This MAY be Unicode or Punycode.
*/
rootDomain?: string;
/**
* Request body metadata
*/
requestBody?: Schema$RotateChallengesRequest;
}
export {};
}

View File

@@ -0,0 +1,118 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.acmedns_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var acmedns_v1;
(function (acmedns_v1) {
/**
* ACME DNS API
*
* Google Domains ACME DNS API that allows users to complete ACME DNS-01 challenges for a domain.
*
* @example
* ```js
* const {google} = require('googleapis');
* const acmedns = google.acmedns('v1');
* ```
*/
class Acmedns {
context;
acmeChallengeSets;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.acmeChallengeSets = new Resource$Acmechallengesets(this.context);
}
}
acmedns_v1.Acmedns = Acmedns;
class Resource$Acmechallengesets {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://acmedns.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/acmeChallengeSets/{rootDomain}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['rootDomain'],
pathParams: ['rootDomain'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
rotateChallenges(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://acmedns.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/acmeChallengeSets/{rootDomain}:rotateChallenges').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['rootDomain'],
pathParams: ['rootDomain'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
acmedns_v1.Resource$Acmechallengesets = Resource$Acmechallengesets;
})(acmedns_v1 || (exports.acmedns_v1 = acmedns_v1 = {}));

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { addressvalidation_v1 } from './v1';
export declare const VERSIONS: {
v1: typeof addressvalidation_v1.Addressvalidation;
};
export declare function addressvalidation(version: 'v1'): addressvalidation_v1.Addressvalidation;
export declare function addressvalidation(options: addressvalidation_v1.Options): addressvalidation_v1.Addressvalidation;
declare const auth: AuthPlus;
export { auth };
export { addressvalidation_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.addressvalidation_v1 = exports.auth = exports.VERSIONS = void 0;
exports.addressvalidation = addressvalidation;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "addressvalidation_v1", { enumerable: true, get: function () { return v1_1.addressvalidation_v1; } });
exports.VERSIONS = {
v1: v1_1.addressvalidation_v1.Addressvalidation,
};
function addressvalidation(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('addressvalidation', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,768 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace addressvalidation_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Address Validation API
*
* The Address Validation API allows developers to verify the accuracy of addresses. Given an address, it returns information about the correctness of the components of the parsed address, a geocode, and a verdict on the deliverability of the parsed address.
*
* @example
* ```js
* const {google} = require('googleapis');
* const addressvalidation = google.addressvalidation('v1');
* ```
*/
export class Addressvalidation {
context: APIRequestContext;
v1: Resource$V1;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* A latitude-longitude viewport, represented as two diagonally opposite `low` and `high` points. A viewport is considered a closed region, i.e. it includes its boundary. The latitude bounds must range between -90 to 90 degrees inclusive, and the longitude bounds must range between -180 to 180 degrees inclusive. Various cases include: - If `low` = `high`, the viewport consists of that single point. - If `low.longitude` \> `high.longitude`, the longitude range is inverted (the viewport crosses the 180 degree longitude line). - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport includes all longitudes. - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` \> `high.latitude`, the latitude range is empty. Both `low` and `high` must be populated, and the represented box cannot be empty (as specified by the definitions above). An empty viewport will result in an error. For example, this viewport fully encloses New York City: { "low": { "latitude": 40.477398, "longitude": -74.259087 \}, "high": { "latitude": 40.91618, "longitude": -73.70018 \} \}
*/
export interface Schema$GoogleGeoTypeViewport {
/**
* Required. The high point of the viewport.
*/
high?: Schema$GoogleTypeLatLng;
/**
* Required. The low point of the viewport.
*/
low?: Schema$GoogleTypeLatLng;
}
/**
* Details of the post-processed address. Post-processing includes correcting misspelled parts of the address, replacing incorrect parts, and inferring missing parts.
*/
export interface Schema$GoogleMapsAddressvalidationV1Address {
/**
* Unordered list. The individual address components of the formatted and corrected address, along with validation information. This provides information on the validation status of the individual components. Address components are not ordered in a particular way. Do not make any assumptions on the ordering of the address components in the list.
*/
addressComponents?: Schema$GoogleMapsAddressvalidationV1AddressComponent[];
/**
* The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located. Note: the format of this address may not match the format of the address in the `postal_address` field. For example, the `postal_address` always represents the country as a 2 letter `region_code`, such as "US" or "NZ". By contrast, this field uses a longer form of the country name, such as "USA" or "New Zealand".
*/
formattedAddress?: string | null;
/**
* The types of components that were expected to be present in a correctly formatted mailing address but were not found in the input AND could not be inferred. An example might be `['street_number', 'route']` for an input like "Boulder, Colorado, 80301, USA". The list of possible types can be found [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types). **Note: you might see a missing component type when you think you've already supplied the missing component.** For example, this can happen when the input address contains the building name, but not the premise number. In the address "渋谷区渋谷丁目 Shibuya Stream", the building name "Shibuya Stream" has the component type `premise`, but the premise number is missing, so `missing_component_types` will contain `premise`.
*/
missingComponentTypes?: string[] | null;
/**
* The post-processed address represented as a postal address.
*/
postalAddress?: Schema$GoogleTypePostalAddress;
/**
* The types of the components that are present in the `address_components` but could not be confirmed to be correct. This field is provided for the sake of convenience: its contents are equivalent to iterating through the `address_components` to find the types of all the components where the confirmation_level is not CONFIRMED or the inferred flag is not set to `true`. The list of possible types can be found [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
*/
unconfirmedComponentTypes?: string[] | null;
/**
* Any tokens in the input that could not be resolved. This might be an input that was not recognized as a valid part of an address. For example, for an input such as "Parcel 0000123123 & 0000456456 Str # Guthrie Center IA 50115 US", the unresolved tokens might look like `["Parcel", "0000123123", "&", "0000456456"]`.
*/
unresolvedTokens?: string[] | null;
}
/**
* Represents an address component, such as a street, city, or state.
*/
export interface Schema$GoogleMapsAddressvalidationV1AddressComponent {
/**
* The name for this component.
*/
componentName?: Schema$GoogleMapsAddressvalidationV1ComponentName;
/**
* The type of the address component. See [Table 2: Additional types returned by the Places service](https://developers.google.com/places/web-service/supported_types#table2) for a list of possible types.
*/
componentType?: string | null;
/**
* Indicates the level of certainty that we have that the component is correct.
*/
confirmationLevel?: string | null;
/**
* Indicates that the component was not part of the input, but we inferred it for the address location and believe it should be provided for a complete address.
*/
inferred?: boolean | null;
/**
* Indicates the name of the component was replaced with a completely different one, for example a wrong postal code being replaced with one that is correct for the address. This is not a cosmetic change, the input component has been changed to a different one.
*/
replaced?: boolean | null;
/**
* Indicates a correction to a misspelling in the component name. The API does not always flag changes from one spelling variant to another, such as when changing "centre" to "center". It also does not always flag common misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre Pkwy".
*/
spellCorrected?: boolean | null;
/**
* Indicates an address component that is not expected to be present in a postal address for the given region. We have retained it only because it was part of the input.
*/
unexpected?: boolean | null;
}
/**
* The metadata for the post-processed address. `metadata` is not guaranteed to be fully populated for every address sent to the Address Validation API.
*/
export interface Schema$GoogleMapsAddressvalidationV1AddressMetadata {
/**
* Indicates that this is the address of a business. If unset, indicates that the value is unknown.
*/
business?: boolean | null;
/**
* Indicates that the address of a PO box. If unset, indicates that the value is unknown.
*/
poBox?: boolean | null;
/**
* Indicates that this is the address of a residence. If unset, indicates that the value is unknown.
*/
residential?: boolean | null;
}
/**
* A wrapper for the name of the component.
*/
export interface Schema$GoogleMapsAddressvalidationV1ComponentName {
/**
* The BCP-47 language code. This will not be present if the component name is not associated with a language, such as a street number.
*/
languageCode?: string | null;
/**
* The name text. For example, "5th Avenue" for a street name or "1253" for a street number.
*/
text?: string | null;
}
/**
* Contains information about the place the input was geocoded to.
*/
export interface Schema$GoogleMapsAddressvalidationV1Geocode {
/**
* The bounds of the geocoded place.
*/
bounds?: Schema$GoogleGeoTypeViewport;
/**
* The size of the geocoded place, in meters. This is another measure of the coarseness of the geocoded location, but in physical size rather than in semantic meaning.
*/
featureSizeMeters?: number | null;
/**
* The geocoded location of the input. Using place IDs is preferred over using addresses, latitude/longitude coordinates, or plus codes. Using coordinates when routing or calculating driving directions will always result in the point being snapped to the road nearest to those coordinates. This may not be a road that will quickly or safely lead to the destination and may not be near an access point to the property. Additionally, when a location is reverse geocoded, there is no guarantee that the returned address will match the original.
*/
location?: Schema$GoogleTypeLatLng;
/**
* The PlaceID of the place this input geocodes to. For more information about Place IDs see [here](https://developers.google.com/maps/documentation/places/web-service/place-id).
*/
placeId?: string | null;
/**
* The type(s) of place that the input geocoded to. For example, `['locality', 'political']`. The full list of types can be found [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
*/
placeTypes?: string[] | null;
/**
* The plus code corresponding to the `location`.
*/
plusCode?: Schema$GoogleMapsAddressvalidationV1PlusCode;
}
/**
* Preview: This feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage descriptions](https://developers.google.com/maps/launch-stages). Enables the Address Validation API to include additional information in the response.
*/
export interface Schema$GoogleMapsAddressvalidationV1LanguageOptions {
/**
* Preview: Return a [google.maps.addressvalidation.v1.Address] in English. See [google.maps.addressvalidation.v1.ValidationResult.english_latin_address] for details.
*/
returnEnglishLatinAddress?: boolean | null;
}
/**
* Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.
*/
export interface Schema$GoogleMapsAddressvalidationV1PlusCode {
/**
* Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the suffix of the global code and replacing the prefix with a formatted name of a reference entity.
*/
compoundCode?: string | null;
/**
* Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000 by 1/8000 degree area (~14 by 14 meters).
*/
globalCode?: string | null;
}
/**
* The request for sending validation feedback.
*/
export interface Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest {
/**
* Required. The outcome of the sequence of validation attempts. If this field is set to `VALIDATION_CONCLUSION_UNSPECIFIED`, an `INVALID_ARGUMENT` error will be returned.
*/
conclusion?: string | null;
/**
* Required. The ID of the response that this feedback is for. This should be the response_id from the first response in a series of address validation attempts.
*/
responseId?: string | null;
}
/**
* The response for validation feedback. The response is empty if the feedback is sent successfully.
*/
export interface Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse {
}
/**
* USPS representation of a US address.
*/
export interface Schema$GoogleMapsAddressvalidationV1UspsAddress {
/**
* City name.
*/
city?: string | null;
/**
* City + state + postal code.
*/
cityStateZipAddressLine?: string | null;
/**
* Firm name.
*/
firm?: string | null;
/**
* First address line.
*/
firstAddressLine?: string | null;
/**
* Second address line.
*/
secondAddressLine?: string | null;
/**
* 2 letter state code.
*/
state?: string | null;
/**
* Puerto Rican urbanization name.
*/
urbanization?: string | null;
/**
* Postal code e.g. 10009.
*/
zipCode?: string | null;
/**
* 4-digit postal code extension e.g. 5023.
*/
zipCodeExtension?: string | null;
}
/**
* The USPS data for the address. `uspsData` is not guaranteed to be fully populated for every US or PR address sent to the Address Validation API. It's recommended to integrate the backup address fields in the response if you utilize uspsData as the primary part of the response.
*/
export interface Schema$GoogleMapsAddressvalidationV1UspsData {
/**
* Abbreviated city.
*/
abbreviatedCity?: string | null;
/**
* Type of the address record that matches the input address. * `F`: FIRM. This is a match to a Firm Record, which is the finest level of match available for an address. * `G`: GENERAL DELIVERY. This is a match to a General Delivery record. * `H`: BUILDING / APARTMENT. This is a match to a Building or Apartment record. * `P`: POST OFFICE BOX. This is a match to a Post Office Box. * `R`: RURAL ROUTE or HIGHWAY CONTRACT: This is a match to either a Rural Route or a Highway Contract record, both of which may have associated Box Number ranges. * `S`: STREET RECORD: This is a match to a Street record containing a valid primary number range.
*/
addressRecordType?: string | null;
/**
* The carrier route code. A four character code consisting of a one letter prefix and a three digit route designator. Prefixes: * `C`: Carrier route (or city route) * `R`: Rural route * `H`: Highway Contract Route * `B`: Post Office Box Section * `G`: General delivery unit
*/
carrierRoute?: string | null;
/**
* Carrier route rate sort indicator.
*/
carrierRouteIndicator?: string | null;
/**
* Indicator that the request has been CASS processed.
*/
cassProcessed?: boolean | null;
/**
* County name.
*/
county?: string | null;
/**
* Indicator that a default address was found, but more specific addresses exists.
*/
defaultAddress?: boolean | null;
/**
* The delivery point check digit. This number is added to the end of the delivery_point_barcode for mechanically scanned mail. Adding all the digits of the delivery_point_barcode, delivery_point_check_digit, postal code, and ZIP+4 together should yield a number divisible by 10.
*/
deliveryPointCheckDigit?: string | null;
/**
* 2 digit delivery point code
*/
deliveryPointCode?: string | null;
/**
* Indicates if the address is a CMRA (Commercial Mail Receiving Agency)--a private business receiving mail for clients. Returns a single character. * `Y`: The address is a CMRA * `N`: The address is not a CMRA
*/
dpvCmra?: string | null;
/**
* The possible values for DPV confirmation. Returns a single character or returns no value. * `N`: Primary and any secondary number information failed to DPV confirm. * `D`: Address was DPV confirmed for the primary number only, and the secondary number information was missing. * `S`: Address was DPV confirmed for the primary number only, and the secondary number information was present but not confirmed. * `Y`: Address was DPV confirmed for primary and any secondary numbers. * Empty: If the response does not contain a `dpv_confirmation` value, the address was not submitted for DPV confirmation.
*/
dpvConfirmation?: string | null;
/**
* Flag indicates addresses where USPS cannot knock on a door to deliver mail. Returns a single character. * `Y`: The door is not accessible. * `N`: No indication the door is not accessible.
*/
dpvDoorNotAccessible?: string | null;
/**
* Flag indicates mail is delivered to a single receptable at a site. Returns a single character. * `Y`: The mail is delivered to a single receptable at a site. * `N`: The mail is not delivered to a single receptable at a site.
*/
dpvDrop?: string | null;
/**
* Indicates that more than one DPV return code is valid for the address. Returns a single character. * `Y`: Address was DPV confirmed for primary and any secondary numbers. * `N`: Primary and any secondary number information failed to DPV confirm. * `S`: Address was DPV confirmed for the primary number only, and the secondary number information was present but not confirmed, or a single trailing alpha on a primary number was dropped to make a DPV match and secondary information required. * `D`: Address was DPV confirmed for the primary number only, and the secondary number information was missing. * `R`: Address confirmed but assigned to phantom route R777 and R779 and USPS delivery is not provided.
*/
dpvEnhancedDeliveryCode?: string | null;
/**
* The footnotes from delivery point validation. Multiple footnotes may be strung together in the same string. * `AA`: Input address matched to the ZIP+4 file * `A1`: Input address was not matched to the ZIP+4 file * `BB`: Matched to DPV (all components) * `CC`: Secondary number not matched and not required * `C1`: Secondary number not matched but required * `N1`: High-rise address missing secondary number * `M1`: Primary number missing * `M3`: Primary number invalid * `P1`: Input address PO, RR or HC box number missing * `P3`: Input address PO, RR, or HC Box number invalid * `F1`: Input address matched to a military address * `G1`: Input address matched to a general delivery address * `U1`: Input address matched to a unique ZIP code * `PB`: Input address matched to PBSA record * `RR`: DPV confirmed address with PMB information * `R1`: DPV confirmed address without PMB information * `R7`: Carrier Route R777 or R779 record * `IA`: Informed Address identified * `TA`: Primary number matched by dropping a trailing alpha
*/
dpvFootnote?: string | null;
/**
* Flag indicates mail delivery is not performed every day of the week. Returns a single character. * `Y`: The mail delivery is not performed every day of the week. * `N`: No indication the mail delivery is not performed every day of the week.
*/
dpvNonDeliveryDays?: string | null;
/**
* Integer identifying non-delivery days. It can be interrogated using bit flags: 0x40 Sunday is a non-delivery day 0x20 Monday is a non-delivery day 0x10 Tuesday is a non-delivery day 0x08 Wednesday is a non-delivery day 0x04 Thursday is a non-delivery day 0x02 Friday is a non-delivery day 0x01 Saturday is a non-delivery day
*/
dpvNonDeliveryDaysValues?: number | null;
/**
* Flag indicates door is accessible, but package will not be left due to security concerns. Returns a single character. * `Y`: The package will not be left due to security concerns. * `N`: No indication the package will not be left due to security concerns.
*/
dpvNoSecureLocation?: string | null;
/**
* Is this a no stat address or an active address? No stat addresses are ones which are not continuously occupied or addresses that the USPS does not service. Returns a single character. * `Y`: The address is not active * `N`: The address is active
*/
dpvNoStat?: string | null;
/**
* Indicates the NoStat type. Returns a reason code as int. * `1`: IDA (Internal Drop Address) Addresses that do not receive mail directly from the USPS but are delivered to a drop address that services them. * `2`: CDS - Addresses that have not yet become deliverable. For example, a new subdivision where lots and primary numbers have been determined, but no structure exists yet for occupancy. * `3`: Collision - Addresses that do not actually DPV confirm. * `4`: CMZ (College, Military and Other Types) - ZIP + 4 records USPS has incorporated into the data. * `5`: Regular - Indicates addresses not receiving delivery and the addresses are not counted as possible deliveries. * `6`: Secondary Required - The address requires secondary information.
*/
dpvNoStatReasonCode?: number | null;
/**
* Indicates the address was matched to PBSA record. Returns a single character. * `Y`: The address was matched to PBSA record. * `N`: The address was not matched to PBSA record.
*/
dpvPbsa?: string | null;
/**
* Indicates that mail is not delivered to the street address. Returns a single character. * `Y`: The mail is not delivered to the street address. * `N`: The mail is delivered to the street address.
*/
dpvThrowback?: string | null;
/**
* Is this place vacant? Returns a single character. * `Y`: The address is vacant * `N`: The address is not vacant
*/
dpvVacant?: string | null;
/**
* eLOT Ascending/Descending Flag (A/D).
*/
elotFlag?: string | null;
/**
* Enhanced Line of Travel (eLOT) number.
*/
elotNumber?: string | null;
/**
* Error message for USPS data retrieval. This is populated when USPS processing is suspended because of the detection of artificially created addresses. The USPS data fields might not be populated when this error is present.
*/
errorMessage?: string | null;
/**
* The delivery address is matchable, but the EWS file indicates that an exact match will be available soon.
*/
ewsNoMatch?: boolean | null;
/**
* FIPS county code.
*/
fipsCountyCode?: string | null;
/**
* LACSLink indicator.
*/
lacsLinkIndicator?: string | null;
/**
* LACSLink return code.
*/
lacsLinkReturnCode?: string | null;
/**
* PMB (Private Mail Box) unit designator.
*/
pmbDesignator?: string | null;
/**
* PMB (Private Mail Box) number;
*/
pmbNumber?: string | null;
/**
* PO Box only postal code.
*/
poBoxOnlyPostalCode?: boolean | null;
/**
* Main post office city.
*/
postOfficeCity?: string | null;
/**
* Main post office state.
*/
postOfficeState?: string | null;
/**
* USPS standardized address.
*/
standardizedAddress?: Schema$GoogleMapsAddressvalidationV1UspsAddress;
/**
* Footnotes from matching a street or highrise record to suite information. If business name match is found, the secondary number is returned. * `A`: SuiteLink record match, business address improved. * `00`: No match, business address is not improved.
*/
suitelinkFootnote?: string | null;
}
/**
* The request for validating an address.
*/
export interface Schema$GoogleMapsAddressvalidationV1ValidateAddressRequest {
/**
* Required. The address being validated. Unformatted addresses should be submitted via `address_lines`. The total length of the fields in this input must not exceed 280 characters. Supported regions can be found [here](https://developers.google.com/maps/documentation/address-validation/coverage). The language_code value in the input address is reserved for future uses and is ignored today. The validated address result will be populated based on the preferred language for the given address, as identified by the system. The Address Validation API ignores the values in recipients and organization. Any values in those fields will be discarded and not returned. Please do not set them.
*/
address?: Schema$GoogleTypePostalAddress;
/**
* Enables USPS CASS compatible mode. This affects _only_ the [google.maps.addressvalidation.v1.ValidationResult.usps_data] field of [google.maps.addressvalidation.v1.ValidationResult]. Note: for USPS CASS enabled requests for addresses in Puerto Rico, a [google.type.PostalAddress.region_code] of the `address` must be provided as "PR", or an [google.type.PostalAddress.administrative_area] of the `address` must be provided as "Puerto Rico" (case-insensitive) or "PR". It's recommended to use a componentized `address`, or alternatively specify at least two [google.type.PostalAddress.address_lines] where the first line contains the street number and name and the second line contains the city, state, and zip code.
*/
enableUspsCass?: boolean | null;
/**
* Optional. Preview: This feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage descriptions](https://developers.google.com/maps/launch-stages). Enables the Address Validation API to include additional information in the response.
*/
languageOptions?: Schema$GoogleMapsAddressvalidationV1LanguageOptions;
/**
* This field must be empty for the first address validation request. If more requests are necessary to fully validate a single address (for example if the changes the user makes after the initial validation need to be re-validated), then each followup request must populate this field with the response_id from the very first response in the validation sequence.
*/
previousResponseId?: string | null;
/**
* Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user makes an Autocomplete query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple Autocomplete queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `sessionToken` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). Note: Address Validation can only be used in sessions with the Autocomplete (New) API, not the Autocomplete API. See https://developers.google.com/maps/documentation/places/web-service/session-pricing for more details.
*/
sessionToken?: string | null;
}
/**
* The response to an address validation request.
*/
export interface Schema$GoogleMapsAddressvalidationV1ValidateAddressResponse {
/**
* The UUID that identifies this response. If the address needs to be re-validated, this UUID *must* accompany the new request.
*/
responseId?: string | null;
/**
* The result of the address validation.
*/
result?: Schema$GoogleMapsAddressvalidationV1ValidationResult;
}
/**
* The result of validating an address.
*/
export interface Schema$GoogleMapsAddressvalidationV1ValidationResult {
/**
* Information about the address itself as opposed to the geocode.
*/
address?: Schema$GoogleMapsAddressvalidationV1Address;
/**
* Preview: This feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage descriptions](https://developers.google.com/maps/launch-stages). The address translated to English. Translated addresses are not reusable as API input. The service provides them so that the user can use their native language to confirm or deny the validation of the originally-provided address. If part of the address doesn't have an English translation, the service returns that part in an alternate language that uses a Latin script. See [here](https://developers.google.com/maps/documentation/address-validation/convert-addresses-english) for an explanation of how the alternate language is selected. If part of the address doesn't have any translations or transliterations in a language that uses a Latin script, the service returns that part in the local language associated with the address. Enable this output by using the [google.maps.addressvalidation.v1.LanguageOptions.return_english_latin_address] flag. Note: the [google.maps.addressvalidation.v1.Address.unconfirmed_component_types] field in the `english_latin_address` and the [google.maps.addressvalidation.v1.AddressComponent.confirmation_level] fields in `english_latin_address.address_components` are not populated.
*/
englishLatinAddress?: Schema$GoogleMapsAddressvalidationV1Address;
/**
* Information about the location and place that the address geocoded to.
*/
geocode?: Schema$GoogleMapsAddressvalidationV1Geocode;
/**
* Other information relevant to deliverability. `metadata` is not guaranteed to be fully populated for every address sent to the Address Validation API.
*/
metadata?: Schema$GoogleMapsAddressvalidationV1AddressMetadata;
/**
* Extra deliverability flags provided by USPS. Only provided in region `US` and `PR`.
*/
uspsData?: Schema$GoogleMapsAddressvalidationV1UspsData;
/**
* Overall verdict flags
*/
verdict?: Schema$GoogleMapsAddressvalidationV1Verdict;
}
/**
* High level overview of the address validation result and geocode.
*/
export interface Schema$GoogleMapsAddressvalidationV1Verdict {
/**
* The post-processed address is considered complete if there are no unresolved tokens, no unexpected or missing address components. If unset, indicates that the value is `false`. See `missing_component_types`, `unresolved_tokens` or `unexpected` fields for more details.
*/
addressComplete?: boolean | null;
/**
* Information about the granularity of the `geocode`. This can be understood as the semantic meaning of how coarse or fine the geocoded location is. This can differ from the `validation_granularity` above occasionally. For example, our database might record the existence of an apartment number but do not have a precise location for the apartment within a big apartment complex. In that case, the `validation_granularity` will be `SUB_PREMISE` but the `geocode_granularity` will be `PREMISE`.
*/
geocodeGranularity?: string | null;
/**
* At least one address component was inferred (added) that wasn't in the input, see [google.maps.addressvalidation.v1.Address.address_components] for details.
*/
hasInferredComponents?: boolean | null;
/**
* At least one address component was replaced, see [google.maps.addressvalidation.v1.Address.address_components] for details.
*/
hasReplacedComponents?: boolean | null;
/**
* At least one address component was spell-corrected, see [google.maps.addressvalidation.v1.Address.address_components] for details.
*/
hasSpellCorrectedComponents?: boolean | null;
/**
* At least one address component cannot be categorized or validated, see [google.maps.addressvalidation.v1.Address.address_components] for details.
*/
hasUnconfirmedComponents?: boolean | null;
/**
* The granularity of the **input** address. This is the result of parsing the input address and does not give any validation signals. For validation signals, refer to `validation_granularity` below. For example, if the input address includes a specific apartment number, then the `input_granularity` here will be `SUB_PREMISE`. If the address validation service cannot match the apartment number in the databases or the apartment number is invalid, the `validation_granularity` will likely be `PREMISE` or more coarse.
*/
inputGranularity?: string | null;
/**
* Preview: This feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage descriptions](https://developers.google.com/maps/launch-stages). Offers an interpretive summary of the API response, intended to assist in determining a potential subsequent action to take. This field is derived from other fields in the API response and should not be considered as a guarantee of address accuracy or deliverability. See [Build your validation logic](https://developers.google.com/maps/documentation/address-validation/build-validation-logic) for more details.
*/
possibleNextAction?: string | null;
/**
* The level of granularity for the post-processed address that the API can fully validate. For example, a `validation_granularity` of `PREMISE` indicates all address components at the level of `PREMISE` or more coarse can be validated. Per address component validation result can be found in [google.maps.addressvalidation.v1.Address.address_components].
*/
validationGranularity?: string | null;
}
/**
* An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
*/
export interface Schema$GoogleTypeLatLng {
/**
* The latitude in degrees. It must be in the range [-90.0, +90.0].
*/
latitude?: number | null;
/**
* The longitude in degrees. It must be in the range [-180.0, +180.0].
*/
longitude?: number | null;
}
/**
* Represents a postal address, such as for postal delivery or payments addresses. With a postal address, a postal service can deliver items to a premise, P.O. box, or similar. A postal address is not intended to model geographical locations like roads, towns, or mountains. In typical usage, an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input or editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput. - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478.
*/
export interface Schema$GoogleTypePostalAddress {
/**
* Unstructured address lines describing the lower levels of an address. Because values in `address_lines` do not have type information and may sometimes contain multiple values in a single field (for example, "Austin, TX"), it is important that the line order is clear. The order of address lines should be "envelope order" for the country or region of the address. In places where this can vary (for example, Japan), `address_language` is used to make it explicit (for example, "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a `region_code` with all remaining information placed in the `address_lines`. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a `region_code` and `address_lines` and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
*/
addressLines?: string[] | null;
/**
* Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. For Spain, this is the province and not the autonomous community (for example, "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. For example, in Switzerland, this should be left unpopulated.
*/
administrativeArea?: string | null;
/**
* Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
*/
languageCode?: string | null;
/**
* Optional. Generally refers to the city or town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave `locality` empty and use `address_lines`.
*/
locality?: string | null;
/**
* Optional. The name of the organization at the address.
*/
organization?: string | null;
/**
* Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (for example, state or zip code validation in the United States).
*/
postalCode?: string | null;
/**
* Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information.
*/
recipients?: string[] | null;
/**
* Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.
*/
regionCode?: string | null;
/**
* The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
*/
revision?: number | null;
/**
* Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (Côte d'Ivoire).
*/
sortingCode?: string | null;
/**
* Optional. Sublocality of the address. For example, this can be a neighborhood, borough, or district.
*/
sublocality?: string | null;
}
export class Resource$V1 {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Feedback about the outcome of the sequence of validation attempts. This should be the last call made after a sequence of validation calls for the same address, and should be called once the transaction is concluded. This should only be sent once for the sequence of `ValidateAddress` requests needed to validate an address fully.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/addressvalidation.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const addressvalidation = google.addressvalidation('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',
* 'https://www.googleapis.com/auth/maps-platform.addressvalidation',
* ],
* });
*
* // 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 addressvalidation.provideValidationFeedback({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "conclusion": "my_conclusion",
* // "responseId": "my_responseId"
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {}
* }
*
* 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.
*/
provideValidationFeedback(params: Params$Resource$V1$Providevalidationfeedback, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
provideValidationFeedback(params?: Params$Resource$V1$Providevalidationfeedback, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse>>;
provideValidationFeedback(params: Params$Resource$V1$Providevalidationfeedback, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
provideValidationFeedback(params: Params$Resource$V1$Providevalidationfeedback, options: MethodOptions | BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse>, callback: BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse>): void;
provideValidationFeedback(params: Params$Resource$V1$Providevalidationfeedback, callback: BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse>): void;
provideValidationFeedback(callback: BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse>): void;
/**
* Validates an address.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/addressvalidation.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const addressvalidation = google.addressvalidation('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',
* 'https://www.googleapis.com/auth/maps-platform.addressvalidation',
* ],
* });
*
* // 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 addressvalidation.validateAddress({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "address": {},
* // "enableUspsCass": false,
* // "languageOptions": {},
* // "previousResponseId": "my_previousResponseId",
* // "sessionToken": "my_sessionToken"
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "responseId": "my_responseId",
* // "result": {}
* // }
* }
*
* 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.
*/
validateAddress(params: Params$Resource$V1$Validateaddress, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
validateAddress(params?: Params$Resource$V1$Validateaddress, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleMapsAddressvalidationV1ValidateAddressResponse>>;
validateAddress(params: Params$Resource$V1$Validateaddress, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
validateAddress(params: Params$Resource$V1$Validateaddress, options: MethodOptions | BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ValidateAddressResponse>, callback: BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ValidateAddressResponse>): void;
validateAddress(params: Params$Resource$V1$Validateaddress, callback: BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ValidateAddressResponse>): void;
validateAddress(callback: BodyResponseCallback<Schema$GoogleMapsAddressvalidationV1ValidateAddressResponse>): void;
}
export interface Params$Resource$V1$Providevalidationfeedback extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest;
}
export interface Params$Resource$V1$Validateaddress extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$GoogleMapsAddressvalidationV1ValidateAddressRequest;
}
export {};
}

View File

@@ -0,0 +1,118 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.addressvalidation_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var addressvalidation_v1;
(function (addressvalidation_v1) {
/**
* Address Validation API
*
* The Address Validation API allows developers to verify the accuracy of addresses. Given an address, it returns information about the correctness of the components of the parsed address, a geocode, and a verdict on the deliverability of the parsed address.
*
* @example
* ```js
* const {google} = require('googleapis');
* const addressvalidation = google.addressvalidation('v1');
* ```
*/
class Addressvalidation {
context;
v1;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.v1 = new Resource$V1(this.context);
}
}
addressvalidation_v1.Addressvalidation = Addressvalidation;
class Resource$V1 {
context;
constructor(context) {
this.context = context;
}
provideValidationFeedback(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://addressvalidation.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1:provideValidationFeedback').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
validateAddress(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://addressvalidation.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1:validateAddress').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
addressvalidation_v1.Resource$V1 = Resource$V1;
})(addressvalidation_v1 || (exports.addressvalidation_v1 = addressvalidation_v1 = {}));

View File

@@ -0,0 +1,22 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { adexchangebuyer_v1_2 } from './v1.2';
import { adexchangebuyer_v1_3 } from './v1.3';
import { adexchangebuyer_v1_4 } from './v1.4';
export declare const VERSIONS: {
'v1.2': typeof adexchangebuyer_v1_2.Adexchangebuyer;
'v1.3': typeof adexchangebuyer_v1_3.Adexchangebuyer;
'v1.4': typeof adexchangebuyer_v1_4.Adexchangebuyer;
};
export declare function adexchangebuyer(version: 'v1.2'): adexchangebuyer_v1_2.Adexchangebuyer;
export declare function adexchangebuyer(options: adexchangebuyer_v1_2.Options): adexchangebuyer_v1_2.Adexchangebuyer;
export declare function adexchangebuyer(version: 'v1.3'): adexchangebuyer_v1_3.Adexchangebuyer;
export declare function adexchangebuyer(options: adexchangebuyer_v1_3.Options): adexchangebuyer_v1_3.Adexchangebuyer;
export declare function adexchangebuyer(version: 'v1.4'): adexchangebuyer_v1_4.Adexchangebuyer;
export declare function adexchangebuyer(options: adexchangebuyer_v1_4.Options): adexchangebuyer_v1_4.Adexchangebuyer;
declare const auth: AuthPlus;
export { auth };
export { adexchangebuyer_v1_2 };
export { adexchangebuyer_v1_3 };
export { adexchangebuyer_v1_4 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,36 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.adexchangebuyer_v1_4 = exports.adexchangebuyer_v1_3 = exports.adexchangebuyer_v1_2 = exports.auth = exports.VERSIONS = void 0;
exports.adexchangebuyer = adexchangebuyer;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_2_1 = require("./v1.2");
Object.defineProperty(exports, "adexchangebuyer_v1_2", { enumerable: true, get: function () { return v1_2_1.adexchangebuyer_v1_2; } });
const v1_3_1 = require("./v1.3");
Object.defineProperty(exports, "adexchangebuyer_v1_3", { enumerable: true, get: function () { return v1_3_1.adexchangebuyer_v1_3; } });
const v1_4_1 = require("./v1.4");
Object.defineProperty(exports, "adexchangebuyer_v1_4", { enumerable: true, get: function () { return v1_4_1.adexchangebuyer_v1_4; } });
exports.VERSIONS = {
'v1.2': v1_2_1.adexchangebuyer_v1_2.Adexchangebuyer,
'v1.3': v1_3_1.adexchangebuyer_v1_3.Adexchangebuyer,
'v1.4': v1_4_1.adexchangebuyer_v1_4.Adexchangebuyer,
};
function adexchangebuyer(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('adexchangebuyer', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,825 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace adexchangebuyer_v1_2 {
export interface Options extends GlobalOptions {
version: 'v1.2';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* Data format for the response.
*/
alt?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
*/
quotaUser?: string;
/**
* Deprecated. Please use quotaUser instead.
*/
userIp?: string;
}
/**
* Ad Exchange Buyer API
*
* Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.
*
* @example
* ```js
* const {google} = require('googleapis');
* const adexchangebuyer = google.adexchangebuyer('v1.2');
* ```
*/
export class Adexchangebuyer {
context: APIRequestContext;
accounts: Resource$Accounts;
creatives: Resource$Creatives;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Configuration data for an Ad Exchange buyer account.
*/
export interface Schema$Account {
/**
* Your bidder locations that have distinct URLs.
*/
bidderLocation?: Array<{
maximumQps?: number;
region?: string;
url?: string;
}> | null;
/**
* The nid parameter value used in cookie match requests. Please contact your technical account manager if you need to change this.
*/
cookieMatchingNid?: string | null;
/**
* The base URL used in cookie match requests.
*/
cookieMatchingUrl?: string | null;
/**
* Account id.
*/
id?: number | null;
/**
* Resource type.
*/
kind?: string | null;
/**
* The maximum number of active creatives that an account can have, where a creative is active if it was inserted or bid with in the last 30 days. Please contact your technical account manager if you need to change this.
*/
maximumActiveCreatives?: number | null;
/**
* The sum of all bidderLocation.maximumQps values cannot exceed this. Please contact your technical account manager if you need to change this.
*/
maximumTotalQps?: number | null;
/**
* The number of creatives that this account inserted or bid with in the last 30 days.
*/
numberActiveCreatives?: number | null;
}
/**
* An account feed lists Ad Exchange buyer accounts that the user has access to. Each entry in the feed corresponds to a single buyer account.
*/
export interface Schema$AccountsList {
/**
* A list of accounts.
*/
items?: Schema$Account[];
/**
* Resource type.
*/
kind?: string | null;
}
/**
* A creative and its classification data.
*/
export interface Schema$Creative {
/**
* Account id.
*/
accountId?: number | null;
/**
* Detected advertiser id, if any. Read-only. This field should not be set in requests.
*/
advertiserId?: string[] | null;
/**
* The name of the company being advertised in the creative.
*/
advertiserName?: string | null;
/**
* The agency id for this creative.
*/
agencyId?: string | null;
/**
* The last upload timestamp of this creative if it was uploaded via API. Read-only. The value of this field is generated, and will be ignored for uploads. (formatted RFC 3339 timestamp).
*/
apiUploadTimestamp?: string | null;
/**
* All attributes for the ads that may be shown from this snippet.
*/
attribute?: number[] | null;
/**
* A buyer-specific id identifying the creative in this ad.
*/
buyerCreativeId?: string | null;
/**
* The set of destination urls for the snippet.
*/
clickThroughUrl?: string[] | null;
/**
* Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests.
*/
corrections?: Array<{
details?: string[];
reason?: string;
}> | null;
/**
* The reasons for disapproval, if any. Note that not all disapproval reasons may be categorized, so it is possible for the creative to have a status of DISAPPROVED with an empty list for disapproval_reasons. In this case, please reach out to your TAM to help debug the issue. Read-only. This field should not be set in requests.
*/
disapprovalReasons?: Array<{
details?: string[];
reason?: string;
}> | null;
/**
* The filtering reasons for the creative. Read-only. This field should not be set in requests.
*/
filteringReasons?: {
date?: string;
reasons?: Array<{
filteringCount?: string;
filteringStatus?: number;
}>;
} | null;
/**
* Ad height.
*/
height?: number | null;
/**
* The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set.
*/
HTMLSnippet?: string | null;
/**
* The set of urls to be called to record an impression.
*/
impressionTrackingUrl?: string[] | null;
/**
* Resource type.
*/
kind?: string | null;
/**
* Detected product categories, if any. Read-only. This field should not be set in requests.
*/
productCategories?: number[] | null;
/**
* All restricted categories for the ads that may be shown from this snippet.
*/
restrictedCategories?: number[] | null;
/**
* Detected sensitive categories, if any. Read-only. This field should not be set in requests.
*/
sensitiveCategories?: number[] | null;
/**
* Creative serving status. Read-only. This field should not be set in requests.
*/
status?: string | null;
/**
* All vendor types for the ads that may be shown from this snippet.
*/
vendorType?: number[] | null;
/**
* The version for this creative. Read-only. This field should not be set in requests.
*/
version?: number | null;
/**
* The url to fetch a video ad. If set, HTMLSnippet should not be set.
*/
videoURL?: string | null;
/**
* Ad width.
*/
width?: number | null;
}
/**
* The creatives feed lists the active creatives for the Ad Exchange buyer accounts that the user has access to. Each entry in the feed corresponds to a single creative.
*/
export interface Schema$CreativesList {
/**
* A list of creatives.
*/
items?: Schema$Creative[];
/**
* Resource type.
*/
kind?: string | null;
/**
* Continuation token used to page through creatives. To retrieve the next page of results, set the next request's "pageToken" value to this.
*/
nextPageToken?: string | null;
}
export class Resource$Accounts {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Gets one account by ID.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexchangebuyer.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 adexchangebuyer = google.adexchangebuyer('v1.2');
*
* 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/adexchange.buyer'],
* });
*
* // 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 adexchangebuyer.accounts.get({
* // The account id
* id: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "bidderLocation": [],
* // "cookieMatchingNid": "my_cookieMatchingNid",
* // "cookieMatchingUrl": "my_cookieMatchingUrl",
* // "id": 0,
* // "kind": "my_kind",
* // "maximumActiveCreatives": 0,
* // "maximumTotalQps": 0,
* // "numberActiveCreatives": 0
* // }
* }
*
* 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$Accounts$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Accounts$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Account>>;
get(params: Params$Resource$Accounts$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Accounts$Get, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
get(params: Params$Resource$Accounts$Get, callback: BodyResponseCallback<Schema$Account>): void;
get(callback: BodyResponseCallback<Schema$Account>): void;
/**
* Retrieves the authenticated user's list of accounts.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexchangebuyer.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 adexchangebuyer = google.adexchangebuyer('v1.2');
*
* 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/adexchange.buyer'],
* });
*
* // 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 adexchangebuyer.accounts.list({});
* console.log(res.data);
*
* // Example response
* // {
* // "items": [],
* // "kind": "my_kind"
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Accounts$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Accounts$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AccountsList>>;
list(params: Params$Resource$Accounts$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Accounts$List, options: MethodOptions | BodyResponseCallback<Schema$AccountsList>, callback: BodyResponseCallback<Schema$AccountsList>): void;
list(params: Params$Resource$Accounts$List, callback: BodyResponseCallback<Schema$AccountsList>): void;
list(callback: BodyResponseCallback<Schema$AccountsList>): void;
/**
* Updates an existing account. This method supports patch semantics.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexchangebuyer.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 adexchangebuyer = google.adexchangebuyer('v1.2');
*
* 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/adexchange.buyer'],
* });
*
* // 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 adexchangebuyer.accounts.patch({
* // The account id
* id: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "bidderLocation": [],
* // "cookieMatchingNid": "my_cookieMatchingNid",
* // "cookieMatchingUrl": "my_cookieMatchingUrl",
* // "id": 0,
* // "kind": "my_kind",
* // "maximumActiveCreatives": 0,
* // "maximumTotalQps": 0,
* // "numberActiveCreatives": 0
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "bidderLocation": [],
* // "cookieMatchingNid": "my_cookieMatchingNid",
* // "cookieMatchingUrl": "my_cookieMatchingUrl",
* // "id": 0,
* // "kind": "my_kind",
* // "maximumActiveCreatives": 0,
* // "maximumTotalQps": 0,
* // "numberActiveCreatives": 0
* // }
* }
*
* 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.
*/
patch(params: Params$Resource$Accounts$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
patch(params?: Params$Resource$Accounts$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Account>>;
patch(params: Params$Resource$Accounts$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
patch(params: Params$Resource$Accounts$Patch, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
patch(params: Params$Resource$Accounts$Patch, callback: BodyResponseCallback<Schema$Account>): void;
patch(callback: BodyResponseCallback<Schema$Account>): void;
/**
* Updates an existing account.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexchangebuyer.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 adexchangebuyer = google.adexchangebuyer('v1.2');
*
* 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/adexchange.buyer'],
* });
*
* // 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 adexchangebuyer.accounts.update({
* // The account id
* id: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "bidderLocation": [],
* // "cookieMatchingNid": "my_cookieMatchingNid",
* // "cookieMatchingUrl": "my_cookieMatchingUrl",
* // "id": 0,
* // "kind": "my_kind",
* // "maximumActiveCreatives": 0,
* // "maximumTotalQps": 0,
* // "numberActiveCreatives": 0
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "bidderLocation": [],
* // "cookieMatchingNid": "my_cookieMatchingNid",
* // "cookieMatchingUrl": "my_cookieMatchingUrl",
* // "id": 0,
* // "kind": "my_kind",
* // "maximumActiveCreatives": 0,
* // "maximumTotalQps": 0,
* // "numberActiveCreatives": 0
* // }
* }
*
* 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.
*/
update(params: Params$Resource$Accounts$Update, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
update(params?: Params$Resource$Accounts$Update, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Account>>;
update(params: Params$Resource$Accounts$Update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
update(params: Params$Resource$Accounts$Update, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
update(params: Params$Resource$Accounts$Update, callback: BodyResponseCallback<Schema$Account>): void;
update(callback: BodyResponseCallback<Schema$Account>): void;
}
export interface Params$Resource$Accounts$Get extends StandardParameters {
/**
* The account id
*/
id?: number;
}
export interface Params$Resource$Accounts$List extends StandardParameters {
}
export interface Params$Resource$Accounts$Patch extends StandardParameters {
/**
* The account id
*/
id?: number;
/**
* Request body metadata
*/
requestBody?: Schema$Account;
}
export interface Params$Resource$Accounts$Update extends StandardParameters {
/**
* The account id
*/
id?: number;
/**
* Request body metadata
*/
requestBody?: Schema$Account;
}
export class Resource$Creatives {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Gets the status for a single creative. A creative will be available 30-40 minutes after submission.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexchangebuyer.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 adexchangebuyer = google.adexchangebuyer('v1.2');
*
* 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/adexchange.buyer'],
* });
*
* // 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 adexchangebuyer.creatives.get({
* // The id for the account that will serve this creative.
* accountId: 'placeholder-value',
* // The buyer-specific id for this creative.
* buyerCreativeId: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "HTMLSnippet": "my_HTMLSnippet",
* // "accountId": 0,
* // "advertiserId": [],
* // "advertiserName": "my_advertiserName",
* // "agencyId": "my_agencyId",
* // "apiUploadTimestamp": "my_apiUploadTimestamp",
* // "attribute": [],
* // "buyerCreativeId": "my_buyerCreativeId",
* // "clickThroughUrl": [],
* // "corrections": [],
* // "disapprovalReasons": [],
* // "filteringReasons": {},
* // "height": 0,
* // "impressionTrackingUrl": [],
* // "kind": "my_kind",
* // "productCategories": [],
* // "restrictedCategories": [],
* // "sensitiveCategories": [],
* // "status": "my_status",
* // "vendorType": [],
* // "version": 0,
* // "videoURL": "my_videoURL",
* // "width": 0
* // }
* }
*
* 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$Creatives$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Creatives$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Creative>>;
get(params: Params$Resource$Creatives$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Creatives$Get, options: MethodOptions | BodyResponseCallback<Schema$Creative>, callback: BodyResponseCallback<Schema$Creative>): void;
get(params: Params$Resource$Creatives$Get, callback: BodyResponseCallback<Schema$Creative>): void;
get(callback: BodyResponseCallback<Schema$Creative>): void;
/**
* Submit a new creative.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexchangebuyer.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 adexchangebuyer = google.adexchangebuyer('v1.2');
*
* 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/adexchange.buyer'],
* });
*
* // 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 adexchangebuyer.creatives.insert({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "HTMLSnippet": "my_HTMLSnippet",
* // "accountId": 0,
* // "advertiserId": [],
* // "advertiserName": "my_advertiserName",
* // "agencyId": "my_agencyId",
* // "apiUploadTimestamp": "my_apiUploadTimestamp",
* // "attribute": [],
* // "buyerCreativeId": "my_buyerCreativeId",
* // "clickThroughUrl": [],
* // "corrections": [],
* // "disapprovalReasons": [],
* // "filteringReasons": {},
* // "height": 0,
* // "impressionTrackingUrl": [],
* // "kind": "my_kind",
* // "productCategories": [],
* // "restrictedCategories": [],
* // "sensitiveCategories": [],
* // "status": "my_status",
* // "vendorType": [],
* // "version": 0,
* // "videoURL": "my_videoURL",
* // "width": 0
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "HTMLSnippet": "my_HTMLSnippet",
* // "accountId": 0,
* // "advertiserId": [],
* // "advertiserName": "my_advertiserName",
* // "agencyId": "my_agencyId",
* // "apiUploadTimestamp": "my_apiUploadTimestamp",
* // "attribute": [],
* // "buyerCreativeId": "my_buyerCreativeId",
* // "clickThroughUrl": [],
* // "corrections": [],
* // "disapprovalReasons": [],
* // "filteringReasons": {},
* // "height": 0,
* // "impressionTrackingUrl": [],
* // "kind": "my_kind",
* // "productCategories": [],
* // "restrictedCategories": [],
* // "sensitiveCategories": [],
* // "status": "my_status",
* // "vendorType": [],
* // "version": 0,
* // "videoURL": "my_videoURL",
* // "width": 0
* // }
* }
*
* 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.
*/
insert(params: Params$Resource$Creatives$Insert, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
insert(params?: Params$Resource$Creatives$Insert, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Creative>>;
insert(params: Params$Resource$Creatives$Insert, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
insert(params: Params$Resource$Creatives$Insert, options: MethodOptions | BodyResponseCallback<Schema$Creative>, callback: BodyResponseCallback<Schema$Creative>): void;
insert(params: Params$Resource$Creatives$Insert, callback: BodyResponseCallback<Schema$Creative>): void;
insert(callback: BodyResponseCallback<Schema$Creative>): void;
/**
* Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexchangebuyer.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 adexchangebuyer = google.adexchangebuyer('v1.2');
*
* 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/adexchange.buyer'],
* });
*
* // 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 adexchangebuyer.creatives.list({
* // Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
* maxResults: 'placeholder-value',
* // A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
* pageToken: 'placeholder-value',
* // When specified, only creatives having the given status are returned.
* statusFilter: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "items": [],
* // "kind": "my_kind",
* // "nextPageToken": "my_nextPageToken"
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Creatives$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Creatives$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$CreativesList>>;
list(params: Params$Resource$Creatives$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Creatives$List, options: MethodOptions | BodyResponseCallback<Schema$CreativesList>, callback: BodyResponseCallback<Schema$CreativesList>): void;
list(params: Params$Resource$Creatives$List, callback: BodyResponseCallback<Schema$CreativesList>): void;
list(callback: BodyResponseCallback<Schema$CreativesList>): void;
}
export interface Params$Resource$Creatives$Get extends StandardParameters {
/**
* The id for the account that will serve this creative.
*/
accountId?: number;
/**
* The buyer-specific id for this creative.
*/
buyerCreativeId?: string;
}
export interface Params$Resource$Creatives$Insert extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$Creative;
}
export interface Params$Resource$Creatives$List extends StandardParameters {
/**
* Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
*/
maxResults?: number;
/**
* A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
*/
pageToken?: string;
/**
* When specified, only creatives having the given status are returned.
*/
statusFilter?: string;
}
export {};
}

View File

@@ -0,0 +1,275 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.adexchangebuyer_v1_2 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/class-name-casing */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var adexchangebuyer_v1_2;
(function (adexchangebuyer_v1_2) {
/**
* Ad Exchange Buyer API
*
* Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.
*
* @example
* ```js
* const {google} = require('googleapis');
* const adexchangebuyer = google.adexchangebuyer('v1.2');
* ```
*/
class Adexchangebuyer {
context;
accounts;
creatives;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
this.creatives = new Resource$Creatives(this.context);
}
}
adexchangebuyer_v1_2.Adexchangebuyer = Adexchangebuyer;
class Resource$Accounts {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts/{id}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts/{id}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts/{id}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_2.Resource$Accounts = Resource$Accounts;
class Resource$Creatives {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.2/creatives/{accountId}/{buyerCreativeId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['accountId', 'buyerCreativeId'],
pathParams: ['accountId', 'buyerCreativeId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/creatives').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/creatives').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_2.Resource$Creatives = Resource$Creatives;
})(adexchangebuyer_v1_2 || (exports.adexchangebuyer_v1_2 = adexchangebuyer_v1_2 = {}));

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,754 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.adexchangebuyer_v1_3 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/class-name-casing */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var adexchangebuyer_v1_3;
(function (adexchangebuyer_v1_3) {
/**
* Ad Exchange Buyer API
*
* Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.
*
* @example
* ```js
* const {google} = require('googleapis');
* const adexchangebuyer = google.adexchangebuyer('v1.3');
* ```
*/
class Adexchangebuyer {
context;
accounts;
billingInfo;
budget;
creatives;
directDeals;
performanceReport;
pretargetingConfig;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
this.billingInfo = new Resource$Billinginfo(this.context);
this.budget = new Resource$Budget(this.context);
this.creatives = new Resource$Creatives(this.context);
this.directDeals = new Resource$Directdeals(this.context);
this.performanceReport = new Resource$Performancereport(this.context);
this.pretargetingConfig = new Resource$Pretargetingconfig(this.context);
}
}
adexchangebuyer_v1_3.Adexchangebuyer = Adexchangebuyer;
class Resource$Accounts {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts/{id}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts/{id}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts/{id}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Accounts = Resource$Accounts;
class Resource$Billinginfo {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/billinginfo/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/billinginfo').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Billinginfo = Resource$Billinginfo;
class Resource$Budget {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['accountId', 'billingId'],
pathParams: ['accountId', 'billingId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['accountId', 'billingId'],
pathParams: ['accountId', 'billingId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['accountId', 'billingId'],
pathParams: ['accountId', 'billingId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Budget = Resource$Budget;
class Resource$Creatives {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/creatives/{accountId}/{buyerCreativeId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['accountId', 'buyerCreativeId'],
pathParams: ['accountId', 'buyerCreativeId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/creatives').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/creatives').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Creatives = Resource$Creatives;
class Resource$Directdeals {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/directdeals/{id}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/directdeals').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Directdeals = Resource$Directdeals;
class Resource$Performancereport {
context;
constructor(context) {
this.context = context;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/performancereport').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['accountId', 'endDateTime', 'startDateTime'],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Performancereport = Resource$Performancereport;
class Resource$Pretargetingconfig {
context;
constructor(context) {
this.context = context;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Pretargetingconfig = Resource$Pretargetingconfig;
})(adexchangebuyer_v1_3 || (exports.adexchangebuyer_v1_3 = adexchangebuyer_v1_3 = {}));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { adexchangebuyer2_v2beta1 } from './v2beta1';
export declare const VERSIONS: {
v2beta1: typeof adexchangebuyer2_v2beta1.Adexchangebuyer2;
};
export declare function adexchangebuyer2(version: 'v2beta1'): adexchangebuyer2_v2beta1.Adexchangebuyer2;
export declare function adexchangebuyer2(options: adexchangebuyer2_v2beta1.Options): adexchangebuyer2_v2beta1.Adexchangebuyer2;
declare const auth: AuthPlus;
export { auth };
export { adexchangebuyer2_v2beta1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.adexchangebuyer2_v2beta1 = exports.auth = exports.VERSIONS = void 0;
exports.adexchangebuyer2 = adexchangebuyer2;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v2beta1_1 = require("./v2beta1");
Object.defineProperty(exports, "adexchangebuyer2_v2beta1", { enumerable: true, get: function () { return v2beta1_1.adexchangebuyer2_v2beta1; } });
exports.VERSIONS = {
v2beta1: v2beta1_1.adexchangebuyer2_v2beta1.Adexchangebuyer2,
};
function adexchangebuyer2(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('adexchangebuyer2', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { adexperiencereport_v1 } from './v1';
export declare const VERSIONS: {
v1: typeof adexperiencereport_v1.Adexperiencereport;
};
export declare function adexperiencereport(version: 'v1'): adexperiencereport_v1.Adexperiencereport;
export declare function adexperiencereport(options: adexperiencereport_v1.Options): adexperiencereport_v1.Adexperiencereport;
declare const auth: AuthPlus;
export { auth };
export { adexperiencereport_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.adexperiencereport_v1 = exports.auth = exports.VERSIONS = void 0;
exports.adexperiencereport = adexperiencereport;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "adexperiencereport_v1", { enumerable: true, get: function () { return v1_1.adexperiencereport_v1; } });
exports.VERSIONS = {
v1: v1_1.adexperiencereport_v1.Adexperiencereport,
};
function adexperiencereport(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('adexperiencereport', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,269 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace adexperiencereport_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Ad Experience Report API
*
* Views Ad Experience Report data, and gets a list of sites that have a significant number of annoying ads.
*
* @example
* ```js
* const {google} = require('googleapis');
* const adexperiencereport = google.adexperiencereport('v1');
* ```
*/
export class Adexperiencereport {
context: APIRequestContext;
sites: Resource$Sites;
violatingSites: Resource$Violatingsites;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* A site's Ad Experience Report summary on a single platform.
*/
export interface Schema$PlatformSummary {
/**
* The site's Ad Experience Report status on this platform.
*/
betterAdsStatus?: string | null;
/**
* The time at which [enforcement](https://support.google.com/webtools/answer/7308033) against the site began or will begin on this platform. Not set when the filter_status is OFF.
*/
enforcementTime?: string | null;
/**
* The site's [enforcement status](https://support.google.com/webtools/answer/7308033) on this platform.
*/
filterStatus?: string | null;
/**
* The time at which the site's status last changed on this platform.
*/
lastChangeTime?: string | null;
/**
* The site's regions on this platform. No longer populated, because there is no longer any semantic difference between sites in different regions.
*/
region?: string[] | null;
/**
* A link to the full Ad Experience Report for the site on this platform.. Not set in ViolatingSitesResponse. Note that you must complete the [Search Console verification process](https://support.google.com/webmasters/answer/9008080) for the site before you can access the full report.
*/
reportUrl?: string | null;
/**
* Whether the site is currently under review on this platform.
*/
underReview?: boolean | null;
}
/**
* Response message for GetSiteSummary.
*/
export interface Schema$SiteSummaryResponse {
/**
* The site's Ad Experience Report summary on desktop.
*/
desktopSummary?: Schema$PlatformSummary;
/**
* The site's Ad Experience Report summary on mobile.
*/
mobileSummary?: Schema$PlatformSummary;
/**
* The name of the reviewed site, e.g. `google.com`.
*/
reviewedSite?: string | null;
}
/**
* Response message for ListViolatingSites.
*/
export interface Schema$ViolatingSitesResponse {
/**
* The list of violating sites.
*/
violatingSites?: Schema$SiteSummaryResponse[];
}
export class Resource$Sites {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Gets a site's Ad Experience Report summary.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexperiencereport.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const adexperiencereport = google.adexperiencereport('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: [],
* });
*
* // 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 adexperiencereport.sites.get({
* // Required. The name of the site whose summary to get, e.g. `sites/http%3A%2F%2Fwww.google.com%2F`. Format: `sites/{site\}`
* name: 'sites/my-site',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "desktopSummary": {},
* // "mobileSummary": {},
* // "reviewedSite": "my_reviewedSite"
* // }
* }
*
* 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$Sites$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Sites$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$SiteSummaryResponse>>;
get(params: Params$Resource$Sites$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Sites$Get, options: MethodOptions | BodyResponseCallback<Schema$SiteSummaryResponse>, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(params: Params$Resource$Sites$Get, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
}
export interface Params$Resource$Sites$Get extends StandardParameters {
/**
* Required. The name of the site whose summary to get, e.g. `sites/http%3A%2F%2Fwww.google.com%2F`. Format: `sites/{site\}`
*/
name?: string;
}
export class Resource$Violatingsites {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Lists sites that are failing in the Ad Experience Report on at least one platform.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/adexperiencereport.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const adexperiencereport = google.adexperiencereport('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: [],
* });
*
* // 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 adexperiencereport.violatingSites.list({});
* console.log(res.data);
*
* // Example response
* // {
* // "violatingSites": []
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Violatingsites$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Violatingsites$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ViolatingSitesResponse>>;
list(params: Params$Resource$Violatingsites$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Violatingsites$List, options: MethodOptions | BodyResponseCallback<Schema$ViolatingSitesResponse>, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(params: Params$Resource$Violatingsites$List, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
}
export interface Params$Resource$Violatingsites$List extends StandardParameters {
}
export {};
}

View File

@@ -0,0 +1,126 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.adexperiencereport_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var adexperiencereport_v1;
(function (adexperiencereport_v1) {
/**
* Ad Experience Report API
*
* Views Ad Experience Report data, and gets a list of sites that have a significant number of annoying ads.
*
* @example
* ```js
* const {google} = require('googleapis');
* const adexperiencereport = google.adexperiencereport('v1');
* ```
*/
class Adexperiencereport {
context;
sites;
violatingSites;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.sites = new Resource$Sites(this.context);
this.violatingSites = new Resource$Violatingsites(this.context);
}
}
adexperiencereport_v1.Adexperiencereport = Adexperiencereport;
class Resource$Sites {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexperiencereport_v1.Resource$Sites = Resource$Sites;
class Resource$Violatingsites {
context;
constructor(context) {
this.context = context;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/violatingSites').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adexperiencereport_v1.Resource$Violatingsites = Resource$Violatingsites;
})(adexperiencereport_v1 || (exports.adexperiencereport_v1 = adexperiencereport_v1 = {}));

View File

@@ -0,0 +1,637 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace admin_datatransfer_v1 {
export interface Options extends GlobalOptions {
version: 'datatransfer_v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Admin SDK API
*
* Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.
*
* @example
* ```js
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_v1');
* ```
*/
export class Admin {
context: APIRequestContext;
applications: Resource$Applications;
transfers: Resource$Transfers;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Application resources represent applications installed on the domain that support transferring ownership of user data.
*/
export interface Schema$Application {
/**
* Etag of the resource.
*/
etag?: string | null;
/**
* The application's ID. Retrievable by using the [`applications.list()`](https://developers.google.com/workspace/admin/data-transfer/reference/rest/v1/applications/list) method.
*/
id?: string | null;
/**
* Identifies the resource as a DataTransfer Application Resource.
*/
kind?: string | null;
/**
* The application's name.
*/
name?: string | null;
/**
* The list of all possible transfer parameters for this application. These parameters select which categories of the user's data to transfer.
*/
transferParams?: Schema$ApplicationTransferParam[];
}
/**
* Template to map fields of ApplicationDataTransfer resource.
*/
export interface Schema$ApplicationDataTransfer {
/**
* The application's ID.
*/
applicationId?: string | null;
/**
* The transfer parameters for the application. These parameters are used to select the data which will get transferred in context of this application. For more information about the specific values available for each application, see the [Transfer parameters](https://developers.google.com/workspace/admin/data-transfer/v1/parameters) reference.
*/
applicationTransferParams?: Schema$ApplicationTransferParam[];
/**
* Read-only. Current status of transfer for this application.
*/
applicationTransferStatus?: string | null;
}
/**
* Template for a collection of Applications.
*/
export interface Schema$ApplicationsListResponse {
/**
* The list of applications that support data transfer and are also installed for the customer.
*/
applications?: Schema$Application[];
/**
* ETag of the resource.
*/
etag?: string | null;
/**
* Identifies the resource as a collection of Applications.
*/
kind?: string | null;
/**
* Token to specify the next page in the list.
*/
nextPageToken?: string | null;
}
/**
* Template for application transfer parameters.
*/
export interface Schema$ApplicationTransferParam {
/**
* The type of the transfer parameter, such as `PRIVACY_LEVEL`.
*/
key?: string | null;
/**
* The value of the transfer parameter, such as `PRIVATE` or `SHARED`.
*/
value?: string[] | null;
}
/**
* A Transfer resource represents the transfer of the ownership of user data between users.
*/
export interface Schema$DataTransfer {
/**
* The list of per-application data transfer resources. It contains details of the applications associated with this transfer resource, and also specifies the applications for which data transfer has to be done at the time of the transfer resource creation.
*/
applicationDataTransfers?: Schema$ApplicationDataTransfer[];
/**
* ETag of the resource.
*/
etag?: string | null;
/**
* Read-only. The transfer's ID.
*/
id?: string | null;
/**
* Identifies the resource as a DataTransfer request.
*/
kind?: string | null;
/**
* ID of the user to whom the data is being transferred.
*/
newOwnerUserId?: string | null;
/**
* ID of the user whose data is being transferred.
*/
oldOwnerUserId?: string | null;
/**
* Read-only. Overall transfer status.
*/
overallTransferStatusCode?: string | null;
/**
* Read-only. The time at which the data transfer was requested.
*/
requestTime?: string | null;
}
/**
* Template for a collection of DataTransfer resources.
*/
export interface Schema$DataTransfersListResponse {
/**
* List of data transfer requests.
*/
dataTransfers?: Schema$DataTransfer[];
/**
* ETag of the resource.
*/
etag?: string | null;
/**
* Identifies the resource as a collection of data transfer requests.
*/
kind?: string | null;
/**
* Token to specify the next page in the list.
*/
nextPageToken?: string | null;
}
export class Resource$Applications {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Retrieves information about an application for the given application ID.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/admin.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_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/admin.datatransfer',
* 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
* ],
* });
*
* // 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 datatransfer.applications.get({
* // ID of the application resource to be retrieved.
* applicationId: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "etag": "my_etag",
* // "id": "my_id",
* // "kind": "my_kind",
* // "name": "my_name",
* // "transferParams": []
* // }
* }
*
* 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$Applications$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Applications$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Application>>;
get(params: Params$Resource$Applications$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Applications$Get, options: MethodOptions | BodyResponseCallback<Schema$Application>, callback: BodyResponseCallback<Schema$Application>): void;
get(params: Params$Resource$Applications$Get, callback: BodyResponseCallback<Schema$Application>): void;
get(callback: BodyResponseCallback<Schema$Application>): void;
/**
* Lists the applications available for data transfer for a customer.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/admin.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_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/admin.datatransfer',
* 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
* ],
* });
*
* // 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 datatransfer.applications.list({
* // Immutable ID of the Google Workspace account.
* customerId: 'placeholder-value',
* // Maximum number of results to return. Default is 100.
* maxResults: 'placeholder-value',
* // Token to specify next page in the list.
* pageToken: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "applications": [],
* // "etag": "my_etag",
* // "kind": "my_kind",
* // "nextPageToken": "my_nextPageToken"
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Applications$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Applications$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ApplicationsListResponse>>;
list(params: Params$Resource$Applications$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Applications$List, options: MethodOptions | BodyResponseCallback<Schema$ApplicationsListResponse>, callback: BodyResponseCallback<Schema$ApplicationsListResponse>): void;
list(params: Params$Resource$Applications$List, callback: BodyResponseCallback<Schema$ApplicationsListResponse>): void;
list(callback: BodyResponseCallback<Schema$ApplicationsListResponse>): void;
}
export interface Params$Resource$Applications$Get extends StandardParameters {
/**
* ID of the application resource to be retrieved.
*/
applicationId?: string;
}
export interface Params$Resource$Applications$List extends StandardParameters {
/**
* Immutable ID of the Google Workspace account.
*/
customerId?: string;
/**
* Maximum number of results to return. Default is 100.
*/
maxResults?: number;
/**
* Token to specify next page in the list.
*/
pageToken?: string;
}
export class Resource$Transfers {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Retrieves a data transfer request by its resource ID.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/admin.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_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/admin.datatransfer',
* 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
* ],
* });
*
* // 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 datatransfer.transfers.get({
* // ID of the resource to be retrieved. This is returned in the response from the insert method.
* dataTransferId: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "applicationDataTransfers": [],
* // "etag": "my_etag",
* // "id": "my_id",
* // "kind": "my_kind",
* // "newOwnerUserId": "my_newOwnerUserId",
* // "oldOwnerUserId": "my_oldOwnerUserId",
* // "overallTransferStatusCode": "my_overallTransferStatusCode",
* // "requestTime": "my_requestTime"
* // }
* }
*
* 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$Transfers$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Transfers$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$DataTransfer>>;
get(params: Params$Resource$Transfers$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Transfers$Get, options: MethodOptions | BodyResponseCallback<Schema$DataTransfer>, callback: BodyResponseCallback<Schema$DataTransfer>): void;
get(params: Params$Resource$Transfers$Get, callback: BodyResponseCallback<Schema$DataTransfer>): void;
get(callback: BodyResponseCallback<Schema$DataTransfer>): void;
/**
* Inserts a data transfer request. See the [Transfer parameters](https://developers.google.com/workspace/admin/data-transfer/v1/parameters) reference for specific application requirements.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/admin.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_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/admin.datatransfer'],
* });
*
* // 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 datatransfer.transfers.insert({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "applicationDataTransfers": [],
* // "etag": "my_etag",
* // "id": "my_id",
* // "kind": "my_kind",
* // "newOwnerUserId": "my_newOwnerUserId",
* // "oldOwnerUserId": "my_oldOwnerUserId",
* // "overallTransferStatusCode": "my_overallTransferStatusCode",
* // "requestTime": "my_requestTime"
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "applicationDataTransfers": [],
* // "etag": "my_etag",
* // "id": "my_id",
* // "kind": "my_kind",
* // "newOwnerUserId": "my_newOwnerUserId",
* // "oldOwnerUserId": "my_oldOwnerUserId",
* // "overallTransferStatusCode": "my_overallTransferStatusCode",
* // "requestTime": "my_requestTime"
* // }
* }
*
* 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.
*/
insert(params: Params$Resource$Transfers$Insert, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
insert(params?: Params$Resource$Transfers$Insert, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$DataTransfer>>;
insert(params: Params$Resource$Transfers$Insert, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
insert(params: Params$Resource$Transfers$Insert, options: MethodOptions | BodyResponseCallback<Schema$DataTransfer>, callback: BodyResponseCallback<Schema$DataTransfer>): void;
insert(params: Params$Resource$Transfers$Insert, callback: BodyResponseCallback<Schema$DataTransfer>): void;
insert(callback: BodyResponseCallback<Schema$DataTransfer>): void;
/**
* Lists the transfers for a customer by source user, destination user, or status.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/admin.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_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/admin.datatransfer',
* 'https://www.googleapis.com/auth/admin.datatransfer.readonly',
* ],
* });
*
* // 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 datatransfer.transfers.list({
* // Immutable ID of the Google Workspace account.
* customerId: 'placeholder-value',
* // Maximum number of results to return. Default is 100.
* maxResults: 'placeholder-value',
* // Destination user's profile ID.
* newOwnerUserId: 'placeholder-value',
* // Source user's profile ID.
* oldOwnerUserId: 'placeholder-value',
* // Token to specify the next page in the list.
* pageToken: 'placeholder-value',
* // Status of the transfer.
* status: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "dataTransfers": [],
* // "etag": "my_etag",
* // "kind": "my_kind",
* // "nextPageToken": "my_nextPageToken"
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Transfers$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Transfers$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$DataTransfersListResponse>>;
list(params: Params$Resource$Transfers$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Transfers$List, options: MethodOptions | BodyResponseCallback<Schema$DataTransfersListResponse>, callback: BodyResponseCallback<Schema$DataTransfersListResponse>): void;
list(params: Params$Resource$Transfers$List, callback: BodyResponseCallback<Schema$DataTransfersListResponse>): void;
list(callback: BodyResponseCallback<Schema$DataTransfersListResponse>): void;
}
export interface Params$Resource$Transfers$Get extends StandardParameters {
/**
* ID of the resource to be retrieved. This is returned in the response from the insert method.
*/
dataTransferId?: string;
}
export interface Params$Resource$Transfers$Insert extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$DataTransfer;
}
export interface Params$Resource$Transfers$List extends StandardParameters {
/**
* Immutable ID of the Google Workspace account.
*/
customerId?: string;
/**
* Maximum number of results to return. Default is 100.
*/
maxResults?: number;
/**
* Destination user's profile ID.
*/
newOwnerUserId?: string;
/**
* Source user's profile ID.
*/
oldOwnerUserId?: string;
/**
* Token to specify the next page in the list.
*/
pageToken?: string;
/**
* Status of the transfer.
*/
status?: string;
}
export {};
}

View File

@@ -0,0 +1,219 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.admin_datatransfer_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var admin_datatransfer_v1;
(function (admin_datatransfer_v1) {
/**
* Admin SDK API
*
* Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.
*
* @example
* ```js
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_v1');
* ```
*/
class Admin {
context;
applications;
transfers;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.applications = new Resource$Applications(this.context);
this.transfers = new Resource$Transfers(this.context);
}
}
admin_datatransfer_v1.Admin = Admin;
class Resource$Applications {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/applications/{applicationId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['applicationId'],
pathParams: ['applicationId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/applications').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admin_datatransfer_v1.Resource$Applications = Resource$Applications;
class Resource$Transfers {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers/{dataTransferId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['dataTransferId'],
pathParams: ['dataTransferId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admin_datatransfer_v1.Resource$Transfers = Resource$Transfers;
})(admin_datatransfer_v1 || (exports.admin_datatransfer_v1 = admin_datatransfer_v1 = {}));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { admin_datatransfer_v1 } from './datatransfer_v1';
import { admin_directory_v1 } from './directory_v1';
import { admin_reports_v1 } from './reports_v1';
export declare const VERSIONS: {
datatransfer_v1: typeof admin_datatransfer_v1.Admin;
directory_v1: typeof admin_directory_v1.Admin;
reports_v1: typeof admin_reports_v1.Admin;
};
export declare function admin(version: 'datatransfer_v1'): admin_datatransfer_v1.Admin;
export declare function admin(options: admin_datatransfer_v1.Options): admin_datatransfer_v1.Admin;
export declare function admin(version: 'directory_v1'): admin_directory_v1.Admin;
export declare function admin(options: admin_directory_v1.Options): admin_directory_v1.Admin;
export declare function admin(version: 'reports_v1'): admin_reports_v1.Admin;
export declare function admin(options: admin_reports_v1.Options): admin_reports_v1.Admin;
declare const auth: AuthPlus;
export { auth };
export { admin_datatransfer_v1 };
export { admin_directory_v1 };
export { admin_reports_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,36 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.admin_reports_v1 = exports.admin_directory_v1 = exports.admin_datatransfer_v1 = exports.auth = exports.VERSIONS = void 0;
exports.admin = admin;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const datatransfer_v1_1 = require("./datatransfer_v1");
Object.defineProperty(exports, "admin_datatransfer_v1", { enumerable: true, get: function () { return datatransfer_v1_1.admin_datatransfer_v1; } });
const directory_v1_1 = require("./directory_v1");
Object.defineProperty(exports, "admin_directory_v1", { enumerable: true, get: function () { return directory_v1_1.admin_directory_v1; } });
const reports_v1_1 = require("./reports_v1");
Object.defineProperty(exports, "admin_reports_v1", { enumerable: true, get: function () { return reports_v1_1.admin_reports_v1; } });
exports.VERSIONS = {
datatransfer_v1: datatransfer_v1_1.admin_datatransfer_v1.Admin,
directory_v1: directory_v1_1.admin_directory_v1.Admin,
reports_v1: reports_v1_1.admin_reports_v1.Admin,
};
function admin(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('admin', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,282 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.admin_reports_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var admin_reports_v1;
(function (admin_reports_v1) {
/**
* Admin SDK API
*
* Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.
*
* @example
* ```js
* const {google} = require('googleapis');
* const admin = google.admin('reports_v1');
* ```
*/
class Admin {
context;
activities;
channels;
customerUsageReports;
entityUsageReports;
userUsageReport;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.activities = new Resource$Activities(this.context);
this.channels = new Resource$Channels(this.context);
this.customerUsageReports = new Resource$Customerusagereports(this.context);
this.entityUsageReports = new Resource$Entityusagereports(this.context);
this.userUsageReport = new Resource$Userusagereport(this.context);
}
}
admin_reports_v1.Admin = Admin;
class Resource$Activities {
context;
constructor(context) {
this.context = context;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
watch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admin_reports_v1.Resource$Activities = Resource$Activities;
class Resource$Channels {
context;
constructor(context) {
this.context = context;
}
stop(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports_v1/channels/stop').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admin_reports_v1.Resource$Channels = Resource$Channels;
class Resource$Customerusagereports {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/usage/dates/{date}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['date'],
pathParams: ['date'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admin_reports_v1.Resource$Customerusagereports = Resource$Customerusagereports;
class Resource$Entityusagereports {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/reports/v1/usage/{entityType}/{entityKey}/dates/{date}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['entityType', 'entityKey', 'date'],
pathParams: ['date', 'entityKey', 'entityType'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admin_reports_v1.Resource$Entityusagereports = Resource$Entityusagereports;
class Resource$Userusagereport {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admin.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/usage/users/{userKey}/dates/{date}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['userKey', 'date'],
pathParams: ['date', 'userKey'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admin_reports_v1.Resource$Userusagereport = Resource$Userusagereport;
})(admin_reports_v1 || (exports.admin_reports_v1 = admin_reports_v1 = {}));

View File

@@ -0,0 +1,17 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { admob_v1 } from './v1';
import { admob_v1beta } from './v1beta';
export declare const VERSIONS: {
v1: typeof admob_v1.Admob;
v1beta: typeof admob_v1beta.Admob;
};
export declare function admob(version: 'v1'): admob_v1.Admob;
export declare function admob(options: admob_v1.Options): admob_v1.Admob;
export declare function admob(version: 'v1beta'): admob_v1beta.Admob;
export declare function admob(options: admob_v1beta.Options): admob_v1beta.Admob;
declare const auth: AuthPlus;
export { auth };
export { admob_v1 };
export { admob_v1beta };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,33 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.admob_v1beta = exports.admob_v1 = exports.auth = exports.VERSIONS = void 0;
exports.admob = admob;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "admob_v1", { enumerable: true, get: function () { return v1_1.admob_v1; } });
const v1beta_1 = require("./v1beta");
Object.defineProperty(exports, "admob_v1beta", { enumerable: true, get: function () { return v1beta_1.admob_v1beta; } });
exports.VERSIONS = {
v1: v1_1.admob_v1.Admob,
v1beta: v1beta_1.admob_v1beta.Admob,
};
function admob(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('admob', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,280 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.admob_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var admob_v1;
(function (admob_v1) {
/**
* AdMob API
*
* The AdMob API allows publishers to programmatically get information about their AdMob account.
*
* @example
* ```js
* const {google} = require('googleapis');
* const admob = google.admob('v1');
* ```
*/
class Admob {
context;
accounts;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
}
}
admob_v1.Admob = Admob;
class Resource$Accounts {
context;
adUnits;
apps;
mediationReport;
networkReport;
constructor(context) {
this.context = context;
this.adUnits = new Resource$Accounts$Adunits(this.context);
this.apps = new Resource$Accounts$Apps(this.context);
this.mediationReport = new Resource$Accounts$Mediationreport(this.context);
this.networkReport = new Resource$Accounts$Networkreport(this.context);
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1.Resource$Accounts = Resource$Accounts;
class Resource$Accounts$Adunits {
context;
constructor(context) {
this.context = context;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/adUnits').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1.Resource$Accounts$Adunits = Resource$Accounts$Adunits;
class Resource$Accounts$Apps {
context;
constructor(context) {
this.context = context;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/apps').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1.Resource$Accounts$Apps = Resource$Accounts$Apps;
class Resource$Accounts$Mediationreport {
context;
constructor(context) {
this.context = context;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/mediationReport:generate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1.Resource$Accounts$Mediationreport = Resource$Accounts$Mediationreport;
class Resource$Accounts$Networkreport {
context;
constructor(context) {
this.context = context;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/networkReport:generate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1.Resource$Accounts$Networkreport = Resource$Accounts$Networkreport;
})(admob_v1 || (exports.admob_v1 = admob_v1 = {}));

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,762 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.admob_v1beta = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var admob_v1beta;
(function (admob_v1beta) {
/**
* AdMob API
*
* The AdMob API allows publishers to programmatically get information about their AdMob account.
*
* @example
* ```js
* const {google} = require('googleapis');
* const admob = google.admob('v1beta');
* ```
*/
class Admob {
context;
accounts;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
}
}
admob_v1beta.Admob = Admob;
class Resource$Accounts {
context;
adSources;
adUnitMappings;
adUnits;
apps;
campaignReport;
mediationGroups;
mediationReport;
networkReport;
constructor(context) {
this.context = context;
this.adSources = new Resource$Accounts$Adsources(this.context);
this.adUnitMappings = new Resource$Accounts$Adunitmappings(this.context);
this.adUnits = new Resource$Accounts$Adunits(this.context);
this.apps = new Resource$Accounts$Apps(this.context);
this.campaignReport = new Resource$Accounts$Campaignreport(this.context);
this.mediationGroups = new Resource$Accounts$Mediationgroups(this.context);
this.mediationReport = new Resource$Accounts$Mediationreport(this.context);
this.networkReport = new Resource$Accounts$Networkreport(this.context);
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts = Resource$Accounts;
class Resource$Accounts$Adsources {
context;
adapters;
constructor(context) {
this.context = context;
this.adapters = new Resource$Accounts$Adsources$Adapters(this.context);
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/adSources').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Adsources = Resource$Accounts$Adsources;
class Resource$Accounts$Adsources$Adapters {
context;
constructor(context) {
this.context = context;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/adapters').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Adsources$Adapters = Resource$Accounts$Adsources$Adapters;
class Resource$Accounts$Adunitmappings {
context;
constructor(context) {
this.context = context;
}
batchCreate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/adUnitMappings:batchCreate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Adunitmappings = Resource$Accounts$Adunitmappings;
class Resource$Accounts$Adunits {
context;
adUnitMappings;
constructor(context) {
this.context = context;
this.adUnitMappings = new Resource$Accounts$Adunits$Adunitmappings(this.context);
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/adUnits').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/adUnits').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Adunits = Resource$Accounts$Adunits;
class Resource$Accounts$Adunits$Adunitmappings {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/adUnitMappings').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/adUnitMappings').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Adunits$Adunitmappings = Resource$Accounts$Adunits$Adunitmappings;
class Resource$Accounts$Apps {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/apps').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/apps').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Apps = Resource$Accounts$Apps;
class Resource$Accounts$Campaignreport {
context;
constructor(context) {
this.context = context;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/campaignReport:generate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Campaignreport = Resource$Accounts$Campaignreport;
class Resource$Accounts$Mediationgroups {
context;
mediationAbExperiments;
constructor(context) {
this.context = context;
this.mediationAbExperiments =
new Resource$Accounts$Mediationgroups$Mediationabexperiments(this.context);
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/mediationGroups').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/mediationGroups').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Mediationgroups = Resource$Accounts$Mediationgroups;
class Resource$Accounts$Mediationgroups$Mediationabexperiments {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/mediationAbExperiments').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
stop(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+name}:stop').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Mediationgroups$Mediationabexperiments = Resource$Accounts$Mediationgroups$Mediationabexperiments;
class Resource$Accounts$Mediationreport {
context;
constructor(context) {
this.context = context;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/mediationReport:generate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Mediationreport = Resource$Accounts$Mediationreport;
class Resource$Accounts$Networkreport {
context;
constructor(context) {
this.context = context;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://admob.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta/{+parent}/networkReport:generate').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
admob_v1beta.Resource$Accounts$Networkreport = Resource$Accounts$Networkreport;
})(admob_v1beta || (exports.admob_v1beta = admob_v1beta = {}));

View File

@@ -0,0 +1,17 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { adsense_v1_4 } from './v1.4';
import { adsense_v2 } from './v2';
export declare const VERSIONS: {
'v1.4': typeof adsense_v1_4.Adsense;
v2: typeof adsense_v2.Adsense;
};
export declare function adsense(version: 'v1.4'): adsense_v1_4.Adsense;
export declare function adsense(options: adsense_v1_4.Options): adsense_v1_4.Adsense;
export declare function adsense(version: 'v2'): adsense_v2.Adsense;
export declare function adsense(options: adsense_v2.Options): adsense_v2.Adsense;
declare const auth: AuthPlus;
export { auth };
export { adsense_v1_4 };
export { adsense_v2 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,33 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.adsense_v2 = exports.adsense_v1_4 = exports.auth = exports.VERSIONS = void 0;
exports.adsense = adsense;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_4_1 = require("./v1.4");
Object.defineProperty(exports, "adsense_v1_4", { enumerable: true, get: function () { return v1_4_1.adsense_v1_4; } });
const v2_1 = require("./v2");
Object.defineProperty(exports, "adsense_v2", { enumerable: true, get: function () { return v2_1.adsense_v2; } });
exports.VERSIONS = {
'v1.4': v1_4_1.adsense_v1_4.Adsense,
v2: v2_1.adsense_v2.Adsense,
};
function adsense(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('adsense', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { adsensehost_v4_1 } from './v4.1';
export declare const VERSIONS: {
'v4.1': typeof adsensehost_v4_1.Adsensehost;
};
export declare function adsensehost(version: 'v4.1'): adsensehost_v4_1.Adsensehost;
export declare function adsensehost(options: adsensehost_v4_1.Options): adsensehost_v4_1.Adsensehost;
declare const auth: AuthPlus;
export { auth };
export { adsensehost_v4_1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.adsensehost_v4_1 = exports.auth = exports.VERSIONS = void 0;
exports.adsensehost = adsensehost;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v4_1_1 = require("./v4.1");
Object.defineProperty(exports, "adsensehost_v4_1", { enumerable: true, get: function () { return v4_1_1.adsensehost_v4_1; } });
exports.VERSIONS = {
'v4.1': v4_1_1.adsensehost_v4_1.Adsensehost,
};
function adsensehost(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('adsensehost', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,967 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.adsensehost_v4_1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var adsensehost_v4_1;
(function (adsensehost_v4_1) {
/**
* AdSense Host API
*
* Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.
*
* @example
* ```js
* const {google} = require('googleapis');
* const adsensehost = google.adsensehost('v4.1');
* ```
*/
class Adsensehost {
context;
accounts;
adclients;
associationsessions;
customchannels;
reports;
urlchannels;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
this.adclients = new Resource$Adclients(this.context);
this.associationsessions = new Resource$Associationsessions(this.context);
this.customchannels = new Resource$Customchannels(this.context);
this.reports = new Resource$Reports(this.context);
this.urlchannels = new Resource$Urlchannels(this.context);
}
}
adsensehost_v4_1.Adsensehost = Adsensehost;
class Resource$Accounts {
context;
adclients;
adunits;
reports;
constructor(context) {
this.context = context;
this.adclients = new Resource$Accounts$Adclients(this.context);
this.adunits = new Resource$Accounts$Adunits(this.context);
this.reports = new Resource$Accounts$Reports(this.context);
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts/{accountId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['filterAdClientId'],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts = Resource$Accounts;
class Resource$Accounts$Adclients {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts/{accountId}/adclients').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts$Adclients = Resource$Accounts$Adclients;
class Resource$Accounts$Adunits {
context;
constructor(context) {
this.context = context;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId', 'adUnitId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId', 'adUnitId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getAdCode(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId', 'adUnitId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts$Adunits = Resource$Accounts$Adunits;
class Resource$Accounts$Reports {
context;
constructor(context) {
this.context = context;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts/{accountId}/reports').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['accountId', 'startDate', 'endDate'],
pathParams: ['accountId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts$Reports = Resource$Accounts$Reports;
class Resource$Adclients {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/adclients/{adClientId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/adclients').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Adclients = Resource$Adclients;
class Resource$Associationsessions {
context;
constructor(context) {
this.context = context;
}
start(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/associationsessions/start').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['productCode', 'websiteUrl'],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
verify(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/associationsessions/verify').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['token'],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Associationsessions = Resource$Associationsessions;
class Resource$Customchannels {
context;
constructor(context) {
this.context = context;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels/{customChannelId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId', 'customChannelId'],
pathParams: ['adClientId', 'customChannelId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels/{customChannelId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId', 'customChannelId'],
pathParams: ['adClientId', 'customChannelId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId', 'customChannelId'],
pathParams: ['adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Customchannels = Resource$Customchannels;
class Resource$Reports {
context;
constructor(context) {
this.context = context;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/reports').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['startDate', 'endDate'],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Reports = Resource$Reports;
class Resource$Urlchannels {
context;
constructor(context) {
this.context = context;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/urlchannels/{urlChannelId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId', 'urlChannelId'],
pathParams: ['adClientId', 'urlChannelId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/adclients/{adClientId}/urlchannels').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/adclients/{adClientId}/urlchannels').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsensehost_v4_1.Resource$Urlchannels = Resource$Urlchannels;
})(adsensehost_v4_1 || (exports.adsensehost_v4_1 = adsensehost_v4_1 = {}));

View File

@@ -0,0 +1,17 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { adsenseplatform_v1 } from './v1';
import { adsenseplatform_v1alpha } from './v1alpha';
export declare const VERSIONS: {
v1: typeof adsenseplatform_v1.Adsenseplatform;
v1alpha: typeof adsenseplatform_v1alpha.Adsenseplatform;
};
export declare function adsenseplatform(version: 'v1'): adsenseplatform_v1.Adsenseplatform;
export declare function adsenseplatform(options: adsenseplatform_v1.Options): adsenseplatform_v1.Adsenseplatform;
export declare function adsenseplatform(version: 'v1alpha'): adsenseplatform_v1alpha.Adsenseplatform;
export declare function adsenseplatform(options: adsenseplatform_v1alpha.Options): adsenseplatform_v1alpha.Adsenseplatform;
declare const auth: AuthPlus;
export { auth };
export { adsenseplatform_v1 };
export { adsenseplatform_v1alpha };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,33 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.adsenseplatform_v1alpha = exports.adsenseplatform_v1 = exports.auth = exports.VERSIONS = void 0;
exports.adsenseplatform = adsenseplatform;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "adsenseplatform_v1", { enumerable: true, get: function () { return v1_1.adsenseplatform_v1; } });
const v1alpha_1 = require("./v1alpha");
Object.defineProperty(exports, "adsenseplatform_v1alpha", { enumerable: true, get: function () { return v1alpha_1.adsenseplatform_v1alpha; } });
exports.VERSIONS = {
v1: v1_1.adsenseplatform_v1.Adsenseplatform,
v1alpha: v1alpha_1.adsenseplatform_v1alpha.Adsenseplatform,
};
function adsenseplatform(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('adsenseplatform', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,433 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.adsenseplatform_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var adsenseplatform_v1;
(function (adsenseplatform_v1) {
/**
* AdSense Platform API
*
*
*
* @example
* ```js
* const {google} = require('googleapis');
* const adsenseplatform = google.adsenseplatform('v1');
* ```
*/
class Adsenseplatform {
context;
platforms;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.platforms = new Resource$Platforms(this.context);
}
}
adsenseplatform_v1.Adsenseplatform = Adsenseplatform;
class Resource$Platforms {
context;
accounts;
constructor(context) {
this.context = context;
this.accounts = new Resource$Platforms$Accounts(this.context);
}
}
adsenseplatform_v1.Resource$Platforms = Resource$Platforms;
class Resource$Platforms$Accounts {
context;
events;
sites;
constructor(context) {
this.context = context;
this.events = new Resource$Platforms$Accounts$Events(this.context);
this.sites = new Resource$Platforms$Accounts$Sites(this.context);
}
close(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:close').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
lookup(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/accounts:lookup').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1.Resource$Platforms$Accounts = Resource$Platforms$Accounts;
class Resource$Platforms$Accounts$Events {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/events').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1.Resource$Platforms$Accounts$Events = Resource$Platforms$Accounts$Events;
class Resource$Platforms$Accounts$Sites {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/sites').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/sites').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
requestReview(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}:requestReview').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1.Resource$Platforms$Accounts$Sites = Resource$Platforms$Accounts$Sites;
})(adsenseplatform_v1 || (exports.adsenseplatform_v1 = adsenseplatform_v1 = {}));

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,737 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.adsenseplatform_v1alpha = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var adsenseplatform_v1alpha;
(function (adsenseplatform_v1alpha) {
/**
* AdSense Platform API
*
*
*
* @example
* ```js
* const {google} = require('googleapis');
* const adsenseplatform = google.adsenseplatform('v1alpha');
* ```
*/
class Adsenseplatform {
context;
accounts;
platforms;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
this.platforms = new Resource$Platforms(this.context);
}
}
adsenseplatform_v1alpha.Adsenseplatform = Adsenseplatform;
class Resource$Accounts {
context;
platforms;
constructor(context) {
this.context = context;
this.platforms = new Resource$Accounts$Platforms(this.context);
}
}
adsenseplatform_v1alpha.Resource$Accounts = Resource$Accounts;
class Resource$Accounts$Platforms {
context;
childAccounts;
groups;
constructor(context) {
this.context = context;
this.childAccounts = new Resource$Accounts$Platforms$Childaccounts(this.context);
this.groups = new Resource$Accounts$Platforms$Groups(this.context);
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/platforms').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1alpha.Resource$Accounts$Platforms = Resource$Accounts$Platforms;
class Resource$Accounts$Platforms$Childaccounts {
context;
sites;
constructor(context) {
this.context = context;
this.sites = new Resource$Accounts$Platforms$Childaccounts$Sites(this.context);
}
}
adsenseplatform_v1alpha.Resource$Accounts$Platforms$Childaccounts = Resource$Accounts$Platforms$Childaccounts;
class Resource$Accounts$Platforms$Childaccounts$Sites {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/sites').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1alpha.Resource$Accounts$Platforms$Childaccounts$Sites = Resource$Accounts$Platforms$Childaccounts$Sites;
class Resource$Accounts$Platforms$Groups {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/groups').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1alpha.Resource$Accounts$Platforms$Groups = Resource$Accounts$Platforms$Groups;
class Resource$Platforms {
context;
accounts;
constructor(context) {
this.context = context;
this.accounts = new Resource$Platforms$Accounts(this.context);
}
}
adsenseplatform_v1alpha.Resource$Platforms = Resource$Platforms;
class Resource$Platforms$Accounts {
context;
events;
sites;
constructor(context) {
this.context = context;
this.events = new Resource$Platforms$Accounts$Events(this.context);
this.sites = new Resource$Platforms$Accounts$Sites(this.context);
}
close(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}:close').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/accounts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
lookup(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/accounts:lookup').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1alpha.Resource$Platforms$Accounts = Resource$Platforms$Accounts;
class Resource$Platforms$Accounts$Events {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/events').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1alpha.Resource$Platforms$Accounts$Events = Resource$Platforms$Accounts$Events;
class Resource$Platforms$Accounts$Sites {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/sites').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+parent}/sites').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
requestReview(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adsenseplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1alpha/{+name}:requestReview').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
adsenseplatform_v1alpha.Resource$Platforms$Accounts$Sites = Resource$Platforms$Accounts$Sites;
})(adsenseplatform_v1alpha || (exports.adsenseplatform_v1alpha = adsenseplatform_v1alpha = {}));

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { advisorynotifications_v1 } from './v1';
export declare const VERSIONS: {
v1: typeof advisorynotifications_v1.Advisorynotifications;
};
export declare function advisorynotifications(version: 'v1'): advisorynotifications_v1.Advisorynotifications;
export declare function advisorynotifications(options: advisorynotifications_v1.Options): advisorynotifications_v1.Advisorynotifications;
declare const auth: AuthPlus;
export { auth };
export { advisorynotifications_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.advisorynotifications_v1 = exports.auth = exports.VERSIONS = void 0;
exports.advisorynotifications = advisorynotifications;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "advisorynotifications_v1", { enumerable: true, get: function () { return v1_1.advisorynotifications_v1; } });
exports.VERSIONS = {
v1: v1_1.advisorynotifications_v1.Advisorynotifications,
};
function advisorynotifications(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('advisorynotifications', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,905 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace advisorynotifications_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Advisory Notifications API
*
* An API for accessing Advisory Notifications in Google Cloud
*
* @example
* ```js
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('v1');
* ```
*/
export class Advisorynotifications {
context: APIRequestContext;
organizations: Resource$Organizations;
projects: Resource$Projects;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Attachment with specific information about the issue.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1Attachment {
/**
* A CSV file attachment. Max size is 10 MB.
*/
csv?: Schema$GoogleCloudAdvisorynotificationsV1Csv;
/**
* The title of the attachment.
*/
displayName?: string | null;
}
/**
* A representation of a CSV file attachment, as a list of column headers and a list of data rows.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1Csv {
/**
* The list of data rows in a CSV file, as string arrays rather than as a single comma-separated string.
*/
dataRows?: Schema$GoogleCloudAdvisorynotificationsV1CsvCsvRow[];
/**
* The list of headers for data columns in a CSV file.
*/
headers?: string[] | null;
}
/**
* A representation of a single data row in a CSV file.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1CsvCsvRow {
/**
* The data entries in a CSV file row, as a string array rather than a single comma-separated string.
*/
entries?: string[] | null;
}
/**
* Response of ListNotifications endpoint.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse {
/**
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
*/
nextPageToken?: string | null;
/**
* List of notifications under a given parent.
*/
notifications?: Schema$GoogleCloudAdvisorynotificationsV1Notification[];
/**
* Estimation of a total number of notifications.
*/
totalSize?: number | null;
}
/**
* A message which contains notification details.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1Message {
/**
* The attachments to download.
*/
attachments?: Schema$GoogleCloudAdvisorynotificationsV1Attachment[];
/**
* The message content.
*/
body?: Schema$GoogleCloudAdvisorynotificationsV1MessageBody;
/**
* The Message creation timestamp.
*/
createTime?: string | null;
/**
* Time when Message was localized
*/
localizationTime?: string | null;
}
/**
* A message body containing text.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1MessageBody {
/**
* The text content of the message body.
*/
text?: Schema$GoogleCloudAdvisorynotificationsV1Text;
}
/**
* A notification object for notifying customers about security and privacy issues.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1Notification {
/**
* Output only. Time the notification was created.
*/
createTime?: string | null;
/**
* A list of messages in the notification.
*/
messages?: Schema$GoogleCloudAdvisorynotificationsV1Message[];
/**
* The resource name of the notification. Format: organizations/{organization\}/locations/{location\}/notifications/{notification\} or projects/{project\}/locations/{location\}/notifications/{notification\}.
*/
name?: string | null;
/**
* Type of notification
*/
notificationType?: string | null;
/**
* The subject line of the notification.
*/
subject?: Schema$GoogleCloudAdvisorynotificationsV1Subject;
}
/**
* Settings for each NotificationType.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1NotificationSettings {
/**
* Whether the associated NotificationType is enabled.
*/
enabled?: boolean | null;
}
/**
* Settings for Advisory Notifications.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1Settings {
/**
* Required. Fingerprint for optimistic concurrency returned in Get requests. Must be provided for Update requests. If the value provided does not match the value known to the server, ABORTED will be thrown, and the client should retry the read-modify-write cycle.
*/
etag?: string | null;
/**
* Identifier. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
*/
name?: string | null;
/**
* Required. Map of each notification type and its settings to get/set all settings at once. The server will validate the value for each notification type.
*/
notificationSettings?: {
[key: string]: Schema$GoogleCloudAdvisorynotificationsV1NotificationSettings;
} | null;
}
/**
* A subject line of a notification.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1Subject {
/**
* The text content.
*/
text?: Schema$GoogleCloudAdvisorynotificationsV1Text;
}
/**
* A text object containing the English text and its localized copies.
*/
export interface Schema$GoogleCloudAdvisorynotificationsV1Text {
/**
* The English copy.
*/
enText?: string | null;
/**
* Status of the localization.
*/
localizationState?: string | null;
/**
* The requested localized copy (if applicable).
*/
localizedText?: string | null;
}
export class Resource$Organizations {
context: APIRequestContext;
locations: Resource$Organizations$Locations;
constructor(context: APIRequestContext);
}
export class Resource$Organizations$Locations {
context: APIRequestContext;
notifications: Resource$Organizations$Locations$Notifications;
constructor(context: APIRequestContext);
/**
* Get notification settings.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.organizations.locations.getSettings({
* // Required. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
* name: 'organizations/my-organization/locations/my-location/settings',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "etag": "my_etag",
* // "name": "my_name",
* // "notificationSettings": {}
* // }
* }
*
* 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.
*/
getSettings(params: Params$Resource$Organizations$Locations$Getsettings, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
getSettings(params?: Params$Resource$Organizations$Locations$Getsettings, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1Settings>>;
getSettings(params: Params$Resource$Organizations$Locations$Getsettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
getSettings(params: Params$Resource$Organizations$Locations$Getsettings, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
getSettings(params: Params$Resource$Organizations$Locations$Getsettings, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
getSettings(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
/**
* Update notification settings.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.organizations.locations.updateSettings({
* // Identifier. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
* name: 'organizations/my-organization/locations/my-location/settings',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "etag": "my_etag",
* // "name": "my_name",
* // "notificationSettings": {}
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "etag": "my_etag",
* // "name": "my_name",
* // "notificationSettings": {}
* // }
* }
*
* 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.
*/
updateSettings(params: Params$Resource$Organizations$Locations$Updatesettings, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
updateSettings(params?: Params$Resource$Organizations$Locations$Updatesettings, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1Settings>>;
updateSettings(params: Params$Resource$Organizations$Locations$Updatesettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
updateSettings(params: Params$Resource$Organizations$Locations$Updatesettings, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
updateSettings(params: Params$Resource$Organizations$Locations$Updatesettings, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
updateSettings(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
}
export interface Params$Resource$Organizations$Locations$Getsettings extends StandardParameters {
/**
* Required. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
*/
name?: string;
}
export interface Params$Resource$Organizations$Locations$Updatesettings extends StandardParameters {
/**
* Identifier. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
*/
name?: string;
/**
* Request body metadata
*/
requestBody?: Schema$GoogleCloudAdvisorynotificationsV1Settings;
}
export class Resource$Organizations$Locations$Notifications {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Gets a notification.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.organizations.locations.notifications.get({
* // ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
* languageCode: 'placeholder-value',
* // Required. A name of the notification to retrieve. Format: organizations/{organization\}/locations/{location\}/notifications/{notification\} or projects/{projects\}/locations/{location\}/notifications/{notification\}.
* name: 'organizations/my-organization/locations/my-location/notifications/my-notification',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "createTime": "my_createTime",
* // "messages": [],
* // "name": "my_name",
* // "notificationType": "my_notificationType",
* // "subject": {}
* // }
* }
*
* 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$Organizations$Locations$Notifications$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Organizations$Locations$Notifications$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1Notification>>;
get(params: Params$Resource$Organizations$Locations$Notifications$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Organizations$Locations$Notifications$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>): void;
get(params: Params$Resource$Organizations$Locations$Notifications$Get, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>): void;
get(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>): void;
/**
* Lists notifications under a given parent.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.organizations.locations.notifications.list({
* // ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
* languageCode: 'placeholder-value',
* // The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.
* pageSize: 'placeholder-value',
* // A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.
* pageToken: 'placeholder-value',
* // Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization\}/locations/{location\}" or "projects/{project\}/locations/{location\}".
* parent: 'organizations/my-organization/locations/my-location',
* // Specifies which parts of the notification resource should be returned in the response.
* view: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "nextPageToken": "my_nextPageToken",
* // "notifications": [],
* // "totalSize": 0
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Organizations$Locations$Notifications$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Organizations$Locations$Notifications$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>>;
list(params: Params$Resource$Organizations$Locations$Notifications$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Organizations$Locations$Notifications$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>): void;
list(params: Params$Resource$Organizations$Locations$Notifications$List, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>): void;
list(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>): void;
}
export interface Params$Resource$Organizations$Locations$Notifications$Get extends StandardParameters {
/**
* ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
*/
languageCode?: string;
/**
* Required. A name of the notification to retrieve. Format: organizations/{organization\}/locations/{location\}/notifications/{notification\} or projects/{projects\}/locations/{location\}/notifications/{notification\}.
*/
name?: string;
}
export interface Params$Resource$Organizations$Locations$Notifications$List extends StandardParameters {
/**
* ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
*/
languageCode?: string;
/**
* The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.
*/
pageSize?: number;
/**
* A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.
*/
pageToken?: string;
/**
* Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization\}/locations/{location\}" or "projects/{project\}/locations/{location\}".
*/
parent?: string;
/**
* Specifies which parts of the notification resource should be returned in the response.
*/
view?: string;
}
export class Resource$Projects {
context: APIRequestContext;
locations: Resource$Projects$Locations;
constructor(context: APIRequestContext);
}
export class Resource$Projects$Locations {
context: APIRequestContext;
notifications: Resource$Projects$Locations$Notifications;
constructor(context: APIRequestContext);
/**
* Get notification settings.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.projects.locations.getSettings({
* // Required. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
* name: 'projects/my-project/locations/my-location/settings',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "etag": "my_etag",
* // "name": "my_name",
* // "notificationSettings": {}
* // }
* }
*
* 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.
*/
getSettings(params: Params$Resource$Projects$Locations$Getsettings, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
getSettings(params?: Params$Resource$Projects$Locations$Getsettings, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1Settings>>;
getSettings(params: Params$Resource$Projects$Locations$Getsettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
getSettings(params: Params$Resource$Projects$Locations$Getsettings, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
getSettings(params: Params$Resource$Projects$Locations$Getsettings, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
getSettings(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
/**
* Update notification settings.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.projects.locations.updateSettings({
* // Identifier. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
* name: 'projects/my-project/locations/my-location/settings',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "etag": "my_etag",
* // "name": "my_name",
* // "notificationSettings": {}
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "etag": "my_etag",
* // "name": "my_name",
* // "notificationSettings": {}
* // }
* }
*
* 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.
*/
updateSettings(params: Params$Resource$Projects$Locations$Updatesettings, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
updateSettings(params?: Params$Resource$Projects$Locations$Updatesettings, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1Settings>>;
updateSettings(params: Params$Resource$Projects$Locations$Updatesettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
updateSettings(params: Params$Resource$Projects$Locations$Updatesettings, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
updateSettings(params: Params$Resource$Projects$Locations$Updatesettings, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
updateSettings(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Settings>): void;
}
export interface Params$Resource$Projects$Locations$Getsettings extends StandardParameters {
/**
* Required. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
*/
name?: string;
}
export interface Params$Resource$Projects$Locations$Updatesettings extends StandardParameters {
/**
* Identifier. The resource name of the settings to retrieve. Format: organizations/{organization\}/locations/{location\}/settings or projects/{projects\}/locations/{location\}/settings.
*/
name?: string;
/**
* Request body metadata
*/
requestBody?: Schema$GoogleCloudAdvisorynotificationsV1Settings;
}
export class Resource$Projects$Locations$Notifications {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Gets a notification.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.projects.locations.notifications.get({
* // ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
* languageCode: 'placeholder-value',
* // Required. A name of the notification to retrieve. Format: organizations/{organization\}/locations/{location\}/notifications/{notification\} or projects/{projects\}/locations/{location\}/notifications/{notification\}.
* name: 'projects/my-project/locations/my-location/notifications/my-notification',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "createTime": "my_createTime",
* // "messages": [],
* // "name": "my_name",
* // "notificationType": "my_notificationType",
* // "subject": {}
* // }
* }
*
* 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$Notifications$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
get(params?: Params$Resource$Projects$Locations$Notifications$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1Notification>>;
get(params: Params$Resource$Projects$Locations$Notifications$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Projects$Locations$Notifications$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>): void;
get(params: Params$Resource$Projects$Locations$Notifications$Get, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>): void;
get(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1Notification>): void;
/**
* Lists notifications under a given parent.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/advisorynotifications.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('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 advisorynotifications.projects.locations.notifications.list(
* {
* // ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
* languageCode: 'placeholder-value',
* // The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.
* pageSize: 'placeholder-value',
* // A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.
* pageToken: 'placeholder-value',
* // Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization\}/locations/{location\}" or "projects/{project\}/locations/{location\}".
* parent: 'projects/my-project/locations/my-location',
* // Specifies which parts of the notification resource should be returned in the response.
* view: 'placeholder-value',
* },
* );
* console.log(res.data);
*
* // Example response
* // {
* // "nextPageToken": "my_nextPageToken",
* // "notifications": [],
* // "totalSize": 0
* // }
* }
*
* 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.
*/
list(params: Params$Resource$Projects$Locations$Notifications$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
list(params?: Params$Resource$Projects$Locations$Notifications$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>>;
list(params: Params$Resource$Projects$Locations$Notifications$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Projects$Locations$Notifications$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>): void;
list(params: Params$Resource$Projects$Locations$Notifications$List, callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>): void;
list(callback: BodyResponseCallback<Schema$GoogleCloudAdvisorynotificationsV1ListNotificationsResponse>): void;
}
export interface Params$Resource$Projects$Locations$Notifications$Get extends StandardParameters {
/**
* ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
*/
languageCode?: string;
/**
* Required. A name of the notification to retrieve. Format: organizations/{organization\}/locations/{location\}/notifications/{notification\} or projects/{projects\}/locations/{location\}/notifications/{notification\}.
*/
name?: string;
}
export interface Params$Resource$Projects$Locations$Notifications$List extends StandardParameters {
/**
* ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
*/
languageCode?: string;
/**
* The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.
*/
pageSize?: number;
/**
* A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.
*/
pageToken?: string;
/**
* Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization\}/locations/{location\}" or "projects/{project\}/locations/{location\}".
*/
parent?: string;
/**
* Specifies which parts of the notification resource should be returned in the response.
*/
view?: string;
}
export {};
}

View File

@@ -0,0 +1,357 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.advisorynotifications_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var advisorynotifications_v1;
(function (advisorynotifications_v1) {
/**
* Advisory Notifications API
*
* An API for accessing Advisory Notifications in Google Cloud
*
* @example
* ```js
* const {google} = require('googleapis');
* const advisorynotifications = google.advisorynotifications('v1');
* ```
*/
class Advisorynotifications {
context;
organizations;
projects;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.organizations = new Resource$Organizations(this.context);
this.projects = new Resource$Projects(this.context);
}
}
advisorynotifications_v1.Advisorynotifications = Advisorynotifications;
class Resource$Organizations {
context;
locations;
constructor(context) {
this.context = context;
this.locations = new Resource$Organizations$Locations(this.context);
}
}
advisorynotifications_v1.Resource$Organizations = Resource$Organizations;
class Resource$Organizations$Locations {
context;
notifications;
constructor(context) {
this.context = context;
this.notifications = new Resource$Organizations$Locations$Notifications(this.context);
}
getSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
advisorynotifications_v1.Resource$Organizations$Locations = Resource$Organizations$Locations;
class Resource$Organizations$Locations$Notifications {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/notifications').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
advisorynotifications_v1.Resource$Organizations$Locations$Notifications = Resource$Organizations$Locations$Notifications;
class Resource$Projects {
context;
locations;
constructor(context) {
this.context = context;
this.locations = new Resource$Projects$Locations(this.context);
}
}
advisorynotifications_v1.Resource$Projects = Resource$Projects;
class Resource$Projects$Locations {
context;
notifications;
constructor(context) {
this.context = context;
this.notifications = new Resource$Projects$Locations$Notifications(this.context);
}
getSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
advisorynotifications_v1.Resource$Projects$Locations = Resource$Projects$Locations;
class Resource$Projects$Locations$Notifications {
context;
constructor(context) {
this.context = context;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://advisorynotifications.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+parent}/notifications').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
advisorynotifications_v1.Resource$Projects$Locations$Notifications = Resource$Projects$Locations$Notifications;
})(advisorynotifications_v1 || (exports.advisorynotifications_v1 = advisorynotifications_v1 = {}));

View File

@@ -0,0 +1,17 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { aiplatform_v1 } from './v1';
import { aiplatform_v1beta1 } from './v1beta1';
export declare const VERSIONS: {
v1: typeof aiplatform_v1.Aiplatform;
v1beta1: typeof aiplatform_v1beta1.Aiplatform;
};
export declare function aiplatform(version: 'v1'): aiplatform_v1.Aiplatform;
export declare function aiplatform(options: aiplatform_v1.Options): aiplatform_v1.Aiplatform;
export declare function aiplatform(version: 'v1beta1'): aiplatform_v1beta1.Aiplatform;
export declare function aiplatform(options: aiplatform_v1beta1.Options): aiplatform_v1beta1.Aiplatform;
declare const auth: AuthPlus;
export { auth };
export { aiplatform_v1 };
export { aiplatform_v1beta1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,33 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.aiplatform_v1beta1 = exports.aiplatform_v1 = exports.auth = exports.VERSIONS = void 0;
exports.aiplatform = aiplatform;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "aiplatform_v1", { enumerable: true, get: function () { return v1_1.aiplatform_v1; } });
const v1beta1_1 = require("./v1beta1");
Object.defineProperty(exports, "aiplatform_v1beta1", { enumerable: true, get: function () { return v1beta1_1.aiplatform_v1beta1; } });
exports.VERSIONS = {
v1: v1_1.aiplatform_v1.Aiplatform,
v1beta1: v1beta1_1.aiplatform_v1beta1.Aiplatform,
};
function aiplatform(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('aiplatform', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { airquality_v1 } from './v1';
export declare const VERSIONS: {
v1: typeof airquality_v1.Airquality;
};
export declare function airquality(version: 'v1'): airquality_v1.Airquality;
export declare function airquality(options: airquality_v1.Options): airquality_v1.Airquality;
declare const auth: AuthPlus;
export { auth };
export { airquality_v1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.airquality_v1 = exports.auth = exports.VERSIONS = void 0;
exports.airquality = airquality;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "airquality_v1", { enumerable: true, get: function () { return v1_1.airquality_v1; } });
exports.VERSIONS = {
v1: v1_1.airquality_v1.Airquality,
};
function airquality(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('airquality', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

View File

@@ -0,0 +1,843 @@
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace airquality_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Air Quality API
*
* The Air Quality API.
*
* @example
* ```js
* const {google} = require('googleapis');
* const airquality = google.airquality('v1');
* ```
*/
export class Airquality {
context: APIRequestContext;
currentConditions: Resource$Currentconditions;
forecast: Resource$Forecast;
history: Resource$History;
mapTypes: Resource$Maptypes;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* The emission sources and health effects of a given pollutant.
*/
export interface Schema$AdditionalInfo {
/**
* Text representing the pollutant's main health effects.
*/
effects?: string | null;
/**
* Text representing the pollutant's main emission sources.
*/
sources?: string | null;
}
/**
* The basic object for representing different air quality metrics. When brought together, these metrics provide a snapshot about the current air quality conditions. There are multiple indexes in the world serving different purposes and groups interested in measuring different aspects of air quality.
*/
export interface Schema$AirQualityIndex {
/**
* The index's numeric score. Examples: 10, 100. The value is not normalized and should only be interpreted in the context of its related air-quality index. For non-numeric indexes, this field will not be returned. Note: This field should be used for calculations, graph display, etc. For displaying the index score, you should use the AQI display field.
*/
aqi?: number | null;
/**
* Textual representation of the index numeric score, that may include prefix or suffix symbols, which usually represents the worst index score. Example: \>100 or 10+. Note: This field should be used when you want to display the index score. For non-numeric indexes, this field is empty.
*/
aqiDisplay?: string | null;
/**
* Textual classification of the index numeric score interpretation. For example: "Excellent air quality".
*/
category?: string | null;
/**
* The index's code. This field represents the index for programming purposes by using snake case instead of spaces. Examples: "uaqi", "fra_atmo".
*/
code?: string | null;
/**
* The color used to represent the AQI numeric score.
*/
color?: Schema$Color;
/**
* A human readable representation of the index name. Example: "AQI (US)"
*/
displayName?: string | null;
/**
* The chemical symbol of the dominant pollutant. For example: "CO".
*/
dominantPollutant?: string | null;
}
/**
* Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ...
*/
export interface Schema$Color {
/**
* The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
*/
alpha?: number | null;
/**
* The amount of blue in the color as a value in the interval [0, 1].
*/
blue?: number | null;
/**
* The amount of green in the color as a value in the interval [0, 1].
*/
green?: number | null;
/**
* The amount of red in the color as a value in the interval [0, 1].
*/
red?: number | null;
}
/**
* The concentration of a given pollutant in the air.
*/
export interface Schema$Concentration {
/**
* Units for measuring this pollutant concentration.
*/
units?: string | null;
/**
* Value of the pollutant concentration.
*/
value?: number | null;
}
/**
* Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI.
*/
export interface Schema$CustomLocalAqi {
/**
* The AQI to associate the country/region with. Value should be a [valid index](/maps/documentation/air-quality/laqis) code.
*/
aqi?: string | null;
/**
* The country/region requiring the custom AQI. Value should be provided using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
*/
regionCode?: string | null;
}
/**
* Health recommendations for different population groups in a free text format. The recommendations are derived from their associated air quality conditions.
*/
export interface Schema$HealthRecommendations {
/**
* Sports and other strenuous outdoor activities.
*/
athletes?: string | null;
/**
* Younger populations including children, toddlers, and babies.
*/
children?: string | null;
/**
* Retirees and people older than the general population.
*/
elderly?: string | null;
/**
* No specific sensitivities.
*/
generalPopulation?: string | null;
/**
* Heart and circulatory system diseases.
*/
heartDiseasePopulation?: string | null;
/**
* Respiratory related problems and asthma suffers.
*/
lungDiseasePopulation?: string | null;
/**
* Women at all stages of pregnancy.
*/
pregnantWomen?: string | null;
}
/**
* Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of history there will be 48 elements of hourly info.
*/
export interface Schema$HourInfo {
/**
* A rounded down timestamp indicating the time the data refers to in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. For example: "2014-10-02T15:00:00Z".
*/
dateTime?: string | null;
/**
* Health advice and recommended actions related to the reported air quality conditions. Recommendations are tailored differently for populations at risk, groups with greater sensitivities to pollutants, and the general population.
*/
healthRecommendations?: Schema$HealthRecommendations;
/**
* Based on the request parameters, this list will include (up to) two air quality indexes: - Universal AQI. Will be returned if the universalAqi boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra computation is specified.
*/
indexes?: Schema$AirQualityIndex[];
/**
* A list of pollutants affecting the location specified in the request. Note: This field will be returned only for requests that specified one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.
*/
pollutants?: Schema$Pollutant[];
}
/**
* Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of forecast there will be 48 elements of hourly forecasts.
*/
export interface Schema$HourlyForecast {
/**
* A rounded down timestamp indicating the time (hour) the data refers to in RFC3339 UTC "Zulu" format. For example: "2014-10-02T15:00:00Z".
*/
dateTime?: string | null;
/**
* Health advice and recommended actions related to the reported air quality conditions. Recommendations are tailored differently for populations at risk, groups with greater sensitivities to pollutants, and the general population.
*/
healthRecommendations?: Schema$HealthRecommendations;
/**
* Based on the request parameters, this list will include (up to) two air quality indexes: - Universal AQI. Will be returned if the `universal_aqi` boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra computation is specified.
*/
indexes?: Schema$AirQualityIndex[];
/**
* A list of pollutants affecting the location specified in the request. Note: This field will be returned only for requests that specified one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.
*/
pollutants?: Schema$Pollutant[];
}
/**
* Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
*/
export interface Schema$HttpBody {
/**
* The HTTP Content-Type header value specifying the content type of the body.
*/
contentType?: string | null;
/**
* The HTTP request/response body as raw binary.
*/
data?: string | null;
/**
* Application specific response metadata. Must be set in the first response for streaming APIs.
*/
extensions?: Array<{
[key: string]: any;
}> | null;
}
/**
* Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
*/
export interface Schema$Interval {
/**
* Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
*/
endTime?: string | null;
/**
* Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
*/
startTime?: string | null;
}
/**
* An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
*/
export interface Schema$LatLng {
/**
* The latitude in degrees. It must be in the range [-90.0, +90.0].
*/
latitude?: number | null;
/**
* The longitude in degrees. It must be in the range [-180.0, +180.0].
*/
longitude?: number | null;
}
/**
* The request definition of the air quality current conditions.
*/
export interface Schema$LookupCurrentConditionsRequest {
/**
* Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada.
*/
customLocalAqis?: Schema$CustomLocalAqi[];
/**
* Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response.
*/
extraComputations?: string[] | null;
/**
* Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard. Default value is en.
*/
languageCode?: string | null;
/**
* Required. The longitude and latitude from which the API looks for air quality current conditions data.
*/
location?: Schema$LatLng;
/**
* Optional. Determines the color palette used for data provided by the 'Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled.
*/
uaqiColorPalette?: string | null;
/**
* Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response. Default value is true.
*/
universalAqi?: boolean | null;
}
export interface Schema$LookupCurrentConditionsResponse {
/**
* A rounded down timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. For example: "2014-10-02T15:00:00Z".
*/
dateTime?: string | null;
/**
* Health advice and recommended actions related to the reported air quality conditions. Recommendations are tailored differently for populations at risk, groups with greater sensitivities to pollutants, and the general population.
*/
healthRecommendations?: Schema$HealthRecommendations;
/**
* Based on the request parameters, this list will include (up to) two air quality indexes: - Universal AQI. Will be returned if the universalAqi boolean is set to true. - Local AQI. Will be returned if the LOCAL_AQI extra computation is specified.
*/
indexes?: Schema$AirQualityIndex[];
/**
* A list of pollutants affecting the location specified in the request. Note: This field will be returned only for requests that specified one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION.
*/
pollutants?: Schema$Pollutant[];
/**
* The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory.
*/
regionCode?: string | null;
}
/**
* The request object of the air quality forecast API.
*/
export interface Schema$LookupForecastRequest {
/**
* Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada.
*/
customLocalAqis?: Schema$CustomLocalAqi[];
/**
* A timestamp for which to return the data for a specific point in time. The timestamp is rounded to the previous exact hour. Note: this will return hourly data for the requested timestamp only (i.e. a single hourly info element). For example, a request sent where the date_time parameter is set to 2023-01-03T11:05:49Z will be rounded down to 2023-01-03T11:00:00Z.
*/
dateTime?: string | null;
/**
* Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response.
*/
extraComputations?: string[] | null;
/**
* Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard (default = 'en').
*/
languageCode?: string | null;
/**
* Required. The latitude and longitude for which the API looks for air quality data.
*/
location?: Schema$LatLng;
/**
* Optional. The maximum number of hourly info records to return per page (default = 24).
*/
pageSize?: number | null;
/**
* Optional. A page token received from a previous forecast call. It is used to retrieve the subsequent page.
*/
pageToken?: string | null;
/**
* Indicates the start and end period for which to get the forecast data. The timestamp is rounded to the previous exact hour.
*/
period?: Schema$Interval;
/**
* Optional. Determines the color palette used for data provided by the 'Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled.
*/
uaqiColorPalette?: string | null;
/**
* Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response (default = true).
*/
universalAqi?: boolean | null;
}
/**
* The response object of the air quality forecast API.
*/
export interface Schema$LookupForecastResponse {
/**
* Optional. Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of forecast there will be 48 elements of hourly forecasts.
*/
hourlyForecasts?: Schema$HourlyForecast[];
/**
* Optional. The token to retrieve the next page.
*/
nextPageToken?: string | null;
/**
* Optional. The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory.
*/
regionCode?: string | null;
}
/**
* The request object of the air quality history API.
*/
export interface Schema$LookupHistoryRequest {
/**
* Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada.
*/
customLocalAqis?: Schema$CustomLocalAqi[];
/**
* A timestamp for which to return historical data. The timestamp is rounded to the previous exact hour. Note: this will return hourly data for the requested timestamp only (i.e. a single hourly info element). For example, a request sent where the dateTime parameter is set to 2023-01-03T11:05:49Z will be rounded down to 2023-01-03T11:00:00Z. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
dateTime?: string | null;
/**
* Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response.
*/
extraComputations?: string[] | null;
/**
* Number from 1 to 720 that indicates the hours range for the request. For example: A value of 48 will yield data from the last 48 hours.
*/
hours?: number | null;
/**
* Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard. Default value is en.
*/
languageCode?: string | null;
/**
* Required. The latitude and longitude for which the API looks for air quality history data.
*/
location?: Schema$LatLng;
/**
* Optional. The maximum number of hourly info records to return per page. The default is 72 and the max value is 168 (7 days of data).
*/
pageSize?: number | null;
/**
* Optional. A page token received from a previous history call. It is used to retrieve the subsequent page. Note that when providing a value for this parameter all other parameters provided must match the call that provided the page token (the previous call).
*/
pageToken?: string | null;
/**
* Indicates the start and end period for which to get the historical data. The timestamp is rounded to the previous exact hour.
*/
period?: Schema$Interval;
/**
* Optional. Determines the color palette used for data provided by the 'Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled.
*/
uaqiColorPalette?: string | null;
/**
* Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response. Default value is true.
*/
universalAqi?: boolean | null;
}
export interface Schema$LookupHistoryResponse {
/**
* Optional. Contains the air quality information for each hour in the requested range. For example, if the request is for 48 hours of history there will be 48 elements of hourly info.
*/
hoursInfo?: Schema$HourInfo[];
/**
* Optional. The token to retrieve the next page.
*/
nextPageToken?: string | null;
/**
* Optional. The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory.
*/
regionCode?: string | null;
}
/**
* Data regarding an air quality pollutant.
*/
export interface Schema$Pollutant {
/**
* Additional information about the pollutant.
*/
additionalInfo?: Schema$AdditionalInfo;
/**
* The pollutant's code name (for example, "so2"). For a list of supported pollutant codes, see [Reported pollutants](/maps/documentation/air-quality/pollutants#reported_pollutants).
*/
code?: string | null;
/**
* The pollutant's concentration level measured by one of the standard air pollutation measure units.
*/
concentration?: Schema$Concentration;
/**
* The pollutant's display name. For example: "NOx".
*/
displayName?: string | null;
/**
* The pollutant's full name. For chemical compounds, this is the IUPAC name. Example: "Sulfur Dioxide". For more information about the IUPAC names table, see https://iupac.org/what-we-do/periodic-table-of-elements/.
*/
fullName?: string | null;
}
export class Resource$Currentconditions {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* The Current Conditions endpoint provides hourly air quality information in more than 100 countries, up to a 500 x 500 meters resolution. Includes over 70 local indexes and global air quality index and categories.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/airquality.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const airquality = google.airquality('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 airquality.currentConditions.lookup({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "customLocalAqis": [],
* // "extraComputations": [],
* // "languageCode": "my_languageCode",
* // "location": {},
* // "uaqiColorPalette": "my_uaqiColorPalette",
* // "universalAqi": false
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "dateTime": "my_dateTime",
* // "healthRecommendations": {},
* // "indexes": [],
* // "pollutants": [],
* // "regionCode": "my_regionCode"
* // }
* }
*
* 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.
*/
lookup(params: Params$Resource$Currentconditions$Lookup, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
lookup(params?: Params$Resource$Currentconditions$Lookup, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$LookupCurrentConditionsResponse>>;
lookup(params: Params$Resource$Currentconditions$Lookup, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
lookup(params: Params$Resource$Currentconditions$Lookup, options: MethodOptions | BodyResponseCallback<Schema$LookupCurrentConditionsResponse>, callback: BodyResponseCallback<Schema$LookupCurrentConditionsResponse>): void;
lookup(params: Params$Resource$Currentconditions$Lookup, callback: BodyResponseCallback<Schema$LookupCurrentConditionsResponse>): void;
lookup(callback: BodyResponseCallback<Schema$LookupCurrentConditionsResponse>): void;
}
export interface Params$Resource$Currentconditions$Lookup extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$LookupCurrentConditionsRequest;
}
export class Resource$Forecast {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Returns air quality forecast for a specific location for a given time range.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/airquality.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const airquality = google.airquality('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 airquality.forecast.lookup({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "customLocalAqis": [],
* // "dateTime": "my_dateTime",
* // "extraComputations": [],
* // "languageCode": "my_languageCode",
* // "location": {},
* // "pageSize": 0,
* // "pageToken": "my_pageToken",
* // "period": {},
* // "uaqiColorPalette": "my_uaqiColorPalette",
* // "universalAqi": false
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "hourlyForecasts": [],
* // "nextPageToken": "my_nextPageToken",
* // "regionCode": "my_regionCode"
* // }
* }
*
* 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.
*/
lookup(params: Params$Resource$Forecast$Lookup, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
lookup(params?: Params$Resource$Forecast$Lookup, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$LookupForecastResponse>>;
lookup(params: Params$Resource$Forecast$Lookup, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
lookup(params: Params$Resource$Forecast$Lookup, options: MethodOptions | BodyResponseCallback<Schema$LookupForecastResponse>, callback: BodyResponseCallback<Schema$LookupForecastResponse>): void;
lookup(params: Params$Resource$Forecast$Lookup, callback: BodyResponseCallback<Schema$LookupForecastResponse>): void;
lookup(callback: BodyResponseCallback<Schema$LookupForecastResponse>): void;
}
export interface Params$Resource$Forecast$Lookup extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$LookupForecastRequest;
}
export class Resource$History {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Returns air quality history for a specific location for a given time range.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/airquality.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const airquality = google.airquality('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 airquality.history.lookup({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "customLocalAqis": [],
* // "dateTime": "my_dateTime",
* // "extraComputations": [],
* // "hours": 0,
* // "languageCode": "my_languageCode",
* // "location": {},
* // "pageSize": 0,
* // "pageToken": "my_pageToken",
* // "period": {},
* // "uaqiColorPalette": "my_uaqiColorPalette",
* // "universalAqi": false
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "hoursInfo": [],
* // "nextPageToken": "my_nextPageToken",
* // "regionCode": "my_regionCode"
* // }
* }
*
* 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.
*/
lookup(params: Params$Resource$History$Lookup, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
lookup(params?: Params$Resource$History$Lookup, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$LookupHistoryResponse>>;
lookup(params: Params$Resource$History$Lookup, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
lookup(params: Params$Resource$History$Lookup, options: MethodOptions | BodyResponseCallback<Schema$LookupHistoryResponse>, callback: BodyResponseCallback<Schema$LookupHistoryResponse>): void;
lookup(params: Params$Resource$History$Lookup, callback: BodyResponseCallback<Schema$LookupHistoryResponse>): void;
lookup(callback: BodyResponseCallback<Schema$LookupHistoryResponse>): void;
}
export interface Params$Resource$History$Lookup extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$LookupHistoryRequest;
}
export class Resource$Maptypes {
context: APIRequestContext;
heatmapTiles: Resource$Maptypes$Heatmaptiles;
constructor(context: APIRequestContext);
}
export class Resource$Maptypes$Heatmaptiles {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Returns a bytes array containing the data of the tile PNG image.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/airquality.googleapis.com
* // - Login into gcloud by running:
* // ```sh
* // $ gcloud auth application-default login
* // ```
* // - Install the npm module by running:
* // ```sh
* // $ npm install googleapis
* // ```
*
* const {google} = require('googleapis');
* const airquality = google.airquality('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 airquality.mapTypes.heatmapTiles.lookupHeatmapTile({
* // Required. The type of the air quality heatmap. Defines the pollutant that the map will graphically represent. Allowed values: - UAQI_RED_GREEN (UAQI, red-green palette) - UAQI_INDIGO_PERSIAN (UAQI, indigo-persian palette) - PM25_INDIGO_PERSIAN - GBR_DEFRA - DEU_UBA - CAN_EC - FRA_ATMO - US_AQI
* mapType: 'placeholder-value',
* // Required. Defines the east-west point in the requested tile.
* x: 'placeholder-value',
* // Required. Defines the north-south point in the requested tile.
* y: 'placeholder-value',
* // Required. The map's zoom level. Defines how large or small the contents of a map appear in a map view. Zoom level 0 is the entire world in a single tile. Zoom level 1 is the entire world in 4 tiles. Zoom level 2 is the entire world in 16 tiles. Zoom level 16 is the entire world in 65,536 tiles. Allowed values: 0-16
* zoom: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "contentType": "my_contentType",
* // "data": "my_data",
* // "extensions": []
* // }
* }
*
* 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.
*/
lookupHeatmapTile(params: Params$Resource$Maptypes$Heatmaptiles$Lookupheatmaptile, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
lookupHeatmapTile(params?: Params$Resource$Maptypes$Heatmaptiles$Lookupheatmaptile, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$HttpBody>>;
lookupHeatmapTile(params: Params$Resource$Maptypes$Heatmaptiles$Lookupheatmaptile, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
lookupHeatmapTile(params: Params$Resource$Maptypes$Heatmaptiles$Lookupheatmaptile, options: MethodOptions | BodyResponseCallback<Schema$HttpBody>, callback: BodyResponseCallback<Schema$HttpBody>): void;
lookupHeatmapTile(params: Params$Resource$Maptypes$Heatmaptiles$Lookupheatmaptile, callback: BodyResponseCallback<Schema$HttpBody>): void;
lookupHeatmapTile(callback: BodyResponseCallback<Schema$HttpBody>): void;
}
export interface Params$Resource$Maptypes$Heatmaptiles$Lookupheatmaptile extends StandardParameters {
/**
* Required. The type of the air quality heatmap. Defines the pollutant that the map will graphically represent. Allowed values: - UAQI_RED_GREEN (UAQI, red-green palette) - UAQI_INDIGO_PERSIAN (UAQI, indigo-persian palette) - PM25_INDIGO_PERSIAN - GBR_DEFRA - DEU_UBA - CAN_EC - FRA_ATMO - US_AQI
*/
mapType?: string;
/**
* Required. Defines the east-west point in the requested tile.
*/
x?: number;
/**
* Required. Defines the north-south point in the requested tile.
*/
y?: number;
/**
* Required. The map's zoom level. Defines how large or small the contents of a map appear in a map view. Zoom level 0 is the entire world in a single tile. Zoom level 1 is the entire world in 4 tiles. Zoom level 2 is the entire world in 16 tiles. Zoom level 16 is the entire world in 65,536 tiles. Allowed values: 0-16
*/
zoom?: number;
}
export {};
}

View File

@@ -0,0 +1,216 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.airquality_v1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var airquality_v1;
(function (airquality_v1) {
/**
* Air Quality API
*
* The Air Quality API.
*
* @example
* ```js
* const {google} = require('googleapis');
* const airquality = google.airquality('v1');
* ```
*/
class Airquality {
context;
currentConditions;
forecast;
history;
mapTypes;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.currentConditions = new Resource$Currentconditions(this.context);
this.forecast = new Resource$Forecast(this.context);
this.history = new Resource$History(this.context);
this.mapTypes = new Resource$Maptypes(this.context);
}
}
airquality_v1.Airquality = Airquality;
class Resource$Currentconditions {
context;
constructor(context) {
this.context = context;
}
lookup(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://airquality.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/currentConditions:lookup').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
airquality_v1.Resource$Currentconditions = Resource$Currentconditions;
class Resource$Forecast {
context;
constructor(context) {
this.context = context;
}
lookup(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://airquality.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/forecast:lookup').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
airquality_v1.Resource$Forecast = Resource$Forecast;
class Resource$History {
context;
constructor(context) {
this.context = context;
}
lookup(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://airquality.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/history:lookup').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
airquality_v1.Resource$History = Resource$History;
class Resource$Maptypes {
context;
heatmapTiles;
constructor(context) {
this.context = context;
this.heatmapTiles = new Resource$Maptypes$Heatmaptiles(this.context);
}
}
airquality_v1.Resource$Maptypes = Resource$Maptypes;
class Resource$Maptypes$Heatmaptiles {
context;
constructor(context) {
this.context = context;
}
lookupHeatmapTile(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://airquality.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['mapType', 'zoom', 'x', 'y'],
pathParams: ['mapType', 'x', 'y', 'zoom'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
airquality_v1.Resource$Maptypes$Heatmaptiles = Resource$Maptypes$Heatmaptiles;
})(airquality_v1 || (exports.airquality_v1 = airquality_v1 = {}));

View File

@@ -0,0 +1,12 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { alertcenter_v1beta1 } from './v1beta1';
export declare const VERSIONS: {
v1beta1: typeof alertcenter_v1beta1.Alertcenter;
};
export declare function alertcenter(version: 'v1beta1'): alertcenter_v1beta1.Alertcenter;
export declare function alertcenter(options: alertcenter_v1beta1.Options): alertcenter_v1beta1.Alertcenter;
declare const auth: AuthPlus;
export { auth };
export { alertcenter_v1beta1 };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,30 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.alertcenter_v1beta1 = exports.auth = exports.VERSIONS = void 0;
exports.alertcenter = alertcenter;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1beta1_1 = require("./v1beta1");
Object.defineProperty(exports, "alertcenter_v1beta1", { enumerable: true, get: function () { return v1beta1_1.alertcenter_v1beta1; } });
exports.VERSIONS = {
v1beta1: v1beta1_1.alertcenter_v1beta1.Alertcenter,
};
function alertcenter(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('alertcenter', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,420 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.alertcenter_v1beta1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var alertcenter_v1beta1;
(function (alertcenter_v1beta1) {
/**
* Google Workspace Alert Center API
*
* Manages alerts on issues affecting your domain. Note: The current version of this API (v1beta1) is available to all Google Workspace customers.
*
* @example
* ```js
* const {google} = require('googleapis');
* const alertcenter = google.alertcenter('v1beta1');
* ```
*/
class Alertcenter {
context;
alerts;
v1beta1;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.alerts = new Resource$Alerts(this.context);
this.v1beta1 = new Resource$V1beta1(this.context);
}
}
alertcenter_v1beta1.Alertcenter = Alertcenter;
class Resource$Alerts {
context;
feedback;
constructor(context) {
this.context = context;
this.feedback = new Resource$Alerts$Feedback(this.context);
}
batchDelete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts:batchDelete').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
batchUndelete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts:batchUndelete').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts/{alertId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['alertId'],
pathParams: ['alertId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts/{alertId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['alertId'],
pathParams: ['alertId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getMetadata(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts/{alertId}/metadata').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['alertId'],
pathParams: ['alertId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
undelete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts/{alertId}:undelete').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['alertId'],
pathParams: ['alertId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
alertcenter_v1beta1.Resource$Alerts = Resource$Alerts;
class Resource$Alerts$Feedback {
context;
constructor(context) {
this.context = context;
}
create(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts/{alertId}/feedback').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['alertId'],
pathParams: ['alertId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/alerts/{alertId}/feedback').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['alertId'],
pathParams: ['alertId'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
alertcenter_v1beta1.Resource$Alerts$Feedback = Resource$Alerts$Feedback;
class Resource$V1beta1 {
context;
constructor(context) {
this.context = context;
}
getSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/settings').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateSettings(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/settings').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
alertcenter_v1beta1.Resource$V1beta1 = Resource$V1beta1;
})(alertcenter_v1beta1 || (exports.alertcenter_v1beta1 = alertcenter_v1beta1 = {}));

View File

@@ -0,0 +1,22 @@
/*! THIS FILE IS AUTO-GENERATED */
import { AuthPlus } from 'googleapis-common';
import { alloydb_v1 } from './v1';
import { alloydb_v1alpha } from './v1alpha';
import { alloydb_v1beta } from './v1beta';
export declare const VERSIONS: {
v1: typeof alloydb_v1.Alloydb;
v1alpha: typeof alloydb_v1alpha.Alloydb;
v1beta: typeof alloydb_v1beta.Alloydb;
};
export declare function alloydb(version: 'v1'): alloydb_v1.Alloydb;
export declare function alloydb(options: alloydb_v1.Options): alloydb_v1.Alloydb;
export declare function alloydb(version: 'v1alpha'): alloydb_v1alpha.Alloydb;
export declare function alloydb(options: alloydb_v1alpha.Options): alloydb_v1alpha.Alloydb;
export declare function alloydb(version: 'v1beta'): alloydb_v1beta.Alloydb;
export declare function alloydb(options: alloydb_v1beta.Options): alloydb_v1beta.Alloydb;
declare const auth: AuthPlus;
export { auth };
export { alloydb_v1 };
export { alloydb_v1alpha };
export { alloydb_v1beta };
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';

View File

@@ -0,0 +1,36 @@
"use strict";
// Copyright 2020 Google LLC
// 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.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthPlus = exports.alloydb_v1beta = exports.alloydb_v1alpha = exports.alloydb_v1 = exports.auth = exports.VERSIONS = void 0;
exports.alloydb = alloydb;
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
Object.defineProperty(exports, "alloydb_v1", { enumerable: true, get: function () { return v1_1.alloydb_v1; } });
const v1alpha_1 = require("./v1alpha");
Object.defineProperty(exports, "alloydb_v1alpha", { enumerable: true, get: function () { return v1alpha_1.alloydb_v1alpha; } });
const v1beta_1 = require("./v1beta");
Object.defineProperty(exports, "alloydb_v1beta", { enumerable: true, get: function () { return v1beta_1.alloydb_v1beta; } });
exports.VERSIONS = {
v1: v1_1.alloydb_v1.Alloydb,
v1alpha: v1alpha_1.alloydb_v1alpha.Alloydb,
v1beta: v1beta_1.alloydb_v1beta.Alloydb,
};
function alloydb(versionOrOptions) {
return (0, googleapis_common_1.getAPI)('alloydb', versionOrOptions, exports.VERSIONS, this);
}
const auth = new googleapis_common_1.AuthPlus();
exports.auth = auth;
var googleapis_common_2 = require("googleapis-common");
Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More