import {
OAuth2Client,
JWT,
Compute,
UserRefreshClient,
BaseExternalAccountClient,
GaxiosPromise,
GoogleConfigurable,
createAPIRequest,
MethodOptions,
StreamMethodOptions,
GlobalOptions,
GoogleAuth,
BodyResponseCallback,
APIRequestContext,
} from 'googleapis-common';
import {Readable} from 'stream';
export namespace drive_v3 {
export interface Options extends GlobalOptions {
version: 'v3';
}
interface StandardParameters {
auth?:
| string
| OAuth2Client
| JWT
| Compute
| UserRefreshClient
| BaseExternalAccountClient
| GoogleAuth;
alt?: string;
fields?: string;
key?: string;
oauth_token?: string;
prettyPrint?: boolean;
quotaUser?: string;
userIp?: string;
}
export class Drive {
context: APIRequestContext;
about: Resource$About;
changes: Resource$Changes;
channels: Resource$Channels;
comments: Resource$Comments;
drives: Resource$Drives;
files: Resource$Files;
permissions: Resource$Permissions;
replies: Resource$Replies;
revisions: Resource$Revisions;
teamdrives: Resource$Teamdrives;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
this.context = {
_options: options || {},
google,
};
this.about = new Resource$About(this.context);
this.changes = new Resource$Changes(this.context);
this.channels = new Resource$Channels(this.context);
this.comments = new Resource$Comments(this.context);
this.drives = new Resource$Drives(this.context);
this.files = new Resource$Files(this.context);
this.permissions = new Resource$Permissions(this.context);
this.replies = new Resource$Replies(this.context);
this.revisions = new Resource$Revisions(this.context);
this.teamdrives = new Resource$Teamdrives(this.context);
}
}
export interface Schema$About {
appInstalled?: boolean | null;
canCreateDrives?: boolean | null;
canCreateTeamDrives?: boolean | null;
driveThemes?: Array<{
backgroundImageLink?: string;
colorRgb?: string;
id?: string;
}> | null;
exportFormats?: {[key: string]: string[]} | null;
folderColorPalette?: string[] | null;
importFormats?: {[key: string]: string[]} | null;
kind?: string | null;
maxImportSizes?: {[key: string]: string} | null;
maxUploadSize?: string | null;
storageQuota?: {
limit?: string;
usage?: string;
usageInDrive?: string;
usageInDriveTrash?: string;
} | null;
teamDriveThemes?: Array<{
backgroundImageLink?: string;
colorRgb?: string;
id?: string;
}> | null;
user?: Schema$User;
}
export interface Schema$Change {
changeType?: string | null;
drive?: Schema$Drive;
driveId?: string | null;
file?: Schema$File;
fileId?: string | null;
kind?: string | null;
removed?: boolean | null;
teamDrive?: Schema$TeamDrive;
teamDriveId?: string | null;
time?: string | null;
type?: string | null;
}
export interface Schema$ChangeList {
changes?: Schema$Change[];
kind?: string | null;
newStartPageToken?: string | null;
nextPageToken?: string | null;
}
export interface Schema$Channel {
address?: string | null;
expiration?: string | null;
id?: string | null;
kind?: string | null;
params?: {[key: string]: string} | null;
payload?: boolean | null;
resourceId?: string | null;
resourceUri?: string | null;
token?: string | null;
type?: string | null;
}
export interface Schema$Comment {
anchor?: string | null;
author?: Schema$User;
content?: string | null;
createdTime?: string | null;
deleted?: boolean | null;
htmlContent?: string | null;
id?: string | null;
kind?: string | null;
modifiedTime?: string | null;
quotedFileContent?: {mimeType?: string; value?: string} | null;
replies?: Schema$Reply[];
resolved?: boolean | null;
}
export interface Schema$CommentList {
comments?: Schema$Comment[];
kind?: string | null;
nextPageToken?: string | null;
}
export interface Schema$ContentRestriction {
readOnly?: boolean | null;
reason?: string | null;
restrictingUser?: Schema$User;
restrictionTime?: string | null;
type?: string | null;
}
export interface Schema$Drive {
backgroundImageFile?: {
id?: string;
width?: number;
xCoordinate?: number;
yCoordinate?: number;
} | null;
backgroundImageLink?: string | null;
capabilities?: {
canAddChildren?: boolean;
canChangeCopyRequiresWriterPermissionRestriction?: boolean;
canChangeDomainUsersOnlyRestriction?: boolean;
canChangeDriveBackground?: boolean;
canChangeDriveMembersOnlyRestriction?: boolean;
canComment?: boolean;
canCopy?: boolean;
canDeleteChildren?: boolean;
canDeleteDrive?: boolean;
canDownload?: boolean;
canEdit?: boolean;
canListChildren?: boolean;
canManageMembers?: boolean;
canReadRevisions?: boolean;
canRename?: boolean;
canRenameDrive?: boolean;
canShare?: boolean;
canTrashChildren?: boolean;
} | null;
colorRgb?: string | null;
createdTime?: string | null;
hidden?: boolean | null;
id?: string | null;
kind?: string | null;
name?: string | null;
restrictions?: {
adminManagedRestrictions?: boolean;
copyRequiresWriterPermission?: boolean;
domainUsersOnly?: boolean;
driveMembersOnly?: boolean;
} | null;
themeId?: string | null;
}
export interface Schema$DriveList {
drives?: Schema$Drive[];
kind?: string | null;
nextPageToken?: string | null;
}
export interface Schema$File {
appProperties?: {[key: string]: string} | null;
capabilities?: {
canAddChildren?: boolean;
canAddFolderFromAnotherDrive?: boolean;
canAddMyDriveParent?: boolean;
canChangeCopyRequiresWriterPermission?: boolean;
canChangeSecurityUpdateEnabled?: boolean;
canChangeViewersCanCopyContent?: boolean;
canComment?: boolean;
canCopy?: boolean;
canDelete?: boolean;
canDeleteChildren?: boolean;
canDownload?: boolean;
canEdit?: boolean;
canListChildren?: boolean;
canModifyContent?: boolean;
canModifyContentRestriction?: boolean;
canMoveChildrenOutOfDrive?: boolean;
canMoveChildrenOutOfTeamDrive?: boolean;
canMoveChildrenWithinDrive?: boolean;
canMoveChildrenWithinTeamDrive?: boolean;
canMoveItemIntoTeamDrive?: boolean;
canMoveItemOutOfDrive?: boolean;
canMoveItemOutOfTeamDrive?: boolean;
canMoveItemWithinDrive?: boolean;
canMoveItemWithinTeamDrive?: boolean;
canMoveTeamDriveItem?: boolean;
canReadDrive?: boolean;
canReadRevisions?: boolean;
canReadTeamDrive?: boolean;
canRemoveChildren?: boolean;
canRemoveMyDriveParent?: boolean;
canRename?: boolean;
canShare?: boolean;
canTrash?: boolean;
canTrashChildren?: boolean;
canUntrash?: boolean;
} | null;
contentHints?: {
indexableText?: string;
thumbnail?: {image?: string; mimeType?: string};
} | null;
contentRestrictions?: Schema$ContentRestriction[];
copyRequiresWriterPermission?: boolean | null;
createdTime?: string | null;
description?: string | null;
driveId?: string | null;
explicitlyTrashed?: boolean | null;
exportLinks?: {[key: string]: string} | null;
fileExtension?: string | null;
folderColorRgb?: string | null;
fullFileExtension?: string | null;
hasAugmentedPermissions?: boolean | null;
hasThumbnail?: boolean | null;
headRevisionId?: string | null;
iconLink?: string | null;
id?: string | null;
imageMediaMetadata?: {
aperture?: number;
cameraMake?: string;
cameraModel?: string;
colorSpace?: string;
exposureBias?: number;
exposureMode?: string;
exposureTime?: number;
flashUsed?: boolean;
focalLength?: number;
height?: number;
isoSpeed?: number;
lens?: string;
location?: {altitude?: number; latitude?: number; longitude?: number};
maxApertureValue?: number;
meteringMode?: string;
rotation?: number;
sensor?: string;
subjectDistance?: number;
time?: string;
whiteBalance?: string;
width?: number;
} | null;
isAppAuthorized?: boolean | null;
kind?: string | null;
lastModifyingUser?: Schema$User;
linkShareMetadata?: {
securityUpdateEligible?: boolean;
securityUpdateEnabled?: boolean;
} | null;
md5Checksum?: string | null;
mimeType?: string | null;
modifiedByMe?: boolean | null;
modifiedByMeTime?: string | null;
modifiedTime?: string | null;
name?: string | null;
originalFilename?: string | null;
ownedByMe?: boolean | null;
owners?: Schema$User[];
parents?: string[] | null;
permissionIds?: string[] | null;
permissions?: Schema$Permission[];
properties?: {[key: string]: string} | null;
quotaBytesUsed?: string | null;
resourceKey?: string | null;
shared?: boolean | null;
sharedWithMeTime?: string | null;
sharingUser?: Schema$User;
shortcutDetails?: {
targetId?: string;
targetMimeType?: string;
targetResourceKey?: string;
} | null;
size?: string | null;
spaces?: string[] | null;
starred?: boolean | null;
teamDriveId?: string | null;
thumbnailLink?: string | null;
thumbnailVersion?: string | null;
trashed?: boolean | null;
trashedTime?: string | null;
trashingUser?: Schema$User;
version?: string | null;
videoMediaMetadata?: {
durationMillis?: string;
height?: number;
width?: number;
} | null;
viewedByMe?: boolean | null;
viewedByMeTime?: string | null;
viewersCanCopyContent?: boolean | null;
webContentLink?: string | null;
webViewLink?: string | null;
writersCanShare?: boolean | null;
}
export interface Schema$FileList {
files?: Schema$File[];
incompleteSearch?: boolean | null;
kind?: string | null;
nextPageToken?: string | null;
}
export interface Schema$GeneratedIds {
ids?: string[] | null;
kind?: string | null;
space?: string | null;
}
export interface Schema$Permission {
allowFileDiscovery?: boolean | null;
deleted?: boolean | null;
displayName?: string | null;
domain?: string | null;
emailAddress?: string | null;
expirationTime?: string | null;
id?: string | null;
kind?: string | null;
permissionDetails?: Array<{
inherited?: boolean;
inheritedFrom?: string;
permissionType?: string;
role?: string;
}> | null;
photoLink?: string | null;
role?: string | null;
teamDrivePermissionDetails?: Array<{
inherited?: boolean;
inheritedFrom?: string;
role?: string;
teamDrivePermissionType?: string;
}> | null;
type?: string | null;
view?: string | null;
}
export interface Schema$PermissionList {
kind?: string | null;
nextPageToken?: string | null;
permissions?: Schema$Permission[];
}
export interface Schema$Reply {
action?: string | null;
author?: Schema$User;
content?: string | null;
createdTime?: string | null;
deleted?: boolean | null;
htmlContent?: string | null;
id?: string | null;
kind?: string | null;
modifiedTime?: string | null;
}
export interface Schema$ReplyList {
kind?: string | null;
nextPageToken?: string | null;
replies?: Schema$Reply[];
}
export interface Schema$Revision {
exportLinks?: {[key: string]: string} | null;
id?: string | null;
keepForever?: boolean | null;
kind?: string | null;
lastModifyingUser?: Schema$User;
md5Checksum?: string | null;
mimeType?: string | null;
modifiedTime?: string | null;
originalFilename?: string | null;
publishAuto?: boolean | null;
published?: boolean | null;
publishedLink?: string | null;
publishedOutsideDomain?: boolean | null;
size?: string | null;
}
export interface Schema$RevisionList {
kind?: string | null;
nextPageToken?: string | null;
revisions?: Schema$Revision[];
}
export interface Schema$StartPageToken {
kind?: string | null;
startPageToken?: string | null;
}
export interface Schema$TeamDrive {
backgroundImageFile?: {
id?: string;
width?: number;
xCoordinate?: number;
yCoordinate?: number;
} | null;
backgroundImageLink?: string | null;
capabilities?: {
canAddChildren?: boolean;
canChangeCopyRequiresWriterPermissionRestriction?: boolean;
canChangeDomainUsersOnlyRestriction?: boolean;
canChangeTeamDriveBackground?: boolean;
canChangeTeamMembersOnlyRestriction?: boolean;
canComment?: boolean;
canCopy?: boolean;
canDeleteChildren?: boolean;
canDeleteTeamDrive?: boolean;
canDownload?: boolean;
canEdit?: boolean;
canListChildren?: boolean;
canManageMembers?: boolean;
canReadRevisions?: boolean;
canRemoveChildren?: boolean;
canRename?: boolean;
canRenameTeamDrive?: boolean;
canShare?: boolean;
canTrashChildren?: boolean;
} | null;
colorRgb?: string | null;
createdTime?: string | null;
id?: string | null;
kind?: string | null;
name?: string | null;
restrictions?: {
adminManagedRestrictions?: boolean;
copyRequiresWriterPermission?: boolean;
domainUsersOnly?: boolean;
teamMembersOnly?: boolean;
} | null;
themeId?: string | null;
}
export interface Schema$TeamDriveList {
kind?: string | null;
nextPageToken?: string | null;
teamDrives?: Schema$TeamDrive[];
}
export interface Schema$User {
displayName?: string | null;
emailAddress?: string | null;
kind?: string | null;
me?: boolean | null;
permissionId?: string | null;
photoLink?: string | null;
}
export class Resource$About {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
get(
params: Params$Resource$About$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$About$Get,
options?: MethodOptions
): GaxiosPromise<Schema$About>;
get(
params: Params$Resource$About$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$About$Get,
options: MethodOptions | BodyResponseCallback<Schema$About>,
callback: BodyResponseCallback<Schema$About>
): void;
get(
params: Params$Resource$About$Get,
callback: BodyResponseCallback<Schema$About>
): void;
get(callback: BodyResponseCallback<Schema$About>): void;
get(
paramsOrCallback?:
| Params$Resource$About$Get
| BodyResponseCallback<Schema$About>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$About>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$About>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$About> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$About$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$About$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/about').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$About>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$About>(parameters);
}
}
}
export interface Params$Resource$About$Get extends StandardParameters {}
export class Resource$Changes {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
getStartPageToken(
params: Params$Resource$Changes$Getstartpagetoken,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
getStartPageToken(
params?: Params$Resource$Changes$Getstartpagetoken,
options?: MethodOptions
): GaxiosPromise<Schema$StartPageToken>;
getStartPageToken(
params: Params$Resource$Changes$Getstartpagetoken,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
getStartPageToken(
params: Params$Resource$Changes$Getstartpagetoken,
options: MethodOptions | BodyResponseCallback<Schema$StartPageToken>,
callback: BodyResponseCallback<Schema$StartPageToken>
): void;
getStartPageToken(
params: Params$Resource$Changes$Getstartpagetoken,
callback: BodyResponseCallback<Schema$StartPageToken>
): void;
getStartPageToken(
callback: BodyResponseCallback<Schema$StartPageToken>
): void;
getStartPageToken(
paramsOrCallback?:
| Params$Resource$Changes$Getstartpagetoken
| BodyResponseCallback<Schema$StartPageToken>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$StartPageToken>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$StartPageToken>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$StartPageToken> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Changes$Getstartpagetoken;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Changes$Getstartpagetoken;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/changes/startPageToken').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$StartPageToken>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$StartPageToken>(parameters);
}
}
list(
params: Params$Resource$Changes$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Changes$List,
options?: MethodOptions
): GaxiosPromise<Schema$ChangeList>;
list(
params: Params$Resource$Changes$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Changes$List,
options: MethodOptions | BodyResponseCallback<Schema$ChangeList>,
callback: BodyResponseCallback<Schema$ChangeList>
): void;
list(
params: Params$Resource$Changes$List,
callback: BodyResponseCallback<Schema$ChangeList>
): void;
list(callback: BodyResponseCallback<Schema$ChangeList>): void;
list(
paramsOrCallback?:
| Params$Resource$Changes$List
| BodyResponseCallback<Schema$ChangeList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ChangeList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ChangeList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ChangeList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Changes$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Changes$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/changes').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['pageToken'],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ChangeList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ChangeList>(parameters);
}
}
watch(
params: Params$Resource$Changes$Watch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
watch(
params?: Params$Resource$Changes$Watch,
options?: MethodOptions
): GaxiosPromise<Schema$Channel>;
watch(
params: Params$Resource$Changes$Watch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
watch(
params: Params$Resource$Changes$Watch,
options: MethodOptions | BodyResponseCallback<Schema$Channel>,
callback: BodyResponseCallback<Schema$Channel>
): void;
watch(
params: Params$Resource$Changes$Watch,
callback: BodyResponseCallback<Schema$Channel>
): void;
watch(callback: BodyResponseCallback<Schema$Channel>): void;
watch(
paramsOrCallback?:
| Params$Resource$Changes$Watch
| BodyResponseCallback<Schema$Channel>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Channel>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Channel>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Channel> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Changes$Watch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Changes$Watch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/changes/watch').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['pageToken'],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Channel>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Channel>(parameters);
}
}
}
export interface Params$Resource$Changes$Getstartpagetoken
extends StandardParameters {
driveId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
teamDriveId?: string;
}
export interface Params$Resource$Changes$List extends StandardParameters {
driveId?: string;
includeCorpusRemovals?: boolean;
includeItemsFromAllDrives?: boolean;
includePermissionsForView?: string;
includeRemoved?: boolean;
includeTeamDriveItems?: boolean;
pageSize?: number;
pageToken?: string;
restrictToMyDrive?: boolean;
spaces?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
teamDriveId?: string;
}
export interface Params$Resource$Changes$Watch extends StandardParameters {
driveId?: string;
includeCorpusRemovals?: boolean;
includeItemsFromAllDrives?: boolean;
includePermissionsForView?: string;
includeRemoved?: boolean;
includeTeamDriveItems?: boolean;
pageSize?: number;
pageToken?: string;
restrictToMyDrive?: boolean;
spaces?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
teamDriveId?: string;
requestBody?: Schema$Channel;
}
export class Resource$Channels {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
stop(
params: Params$Resource$Channels$Stop,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
stop(
params?: Params$Resource$Channels$Stop,
options?: MethodOptions
): GaxiosPromise<void>;
stop(
params: Params$Resource$Channels$Stop,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
stop(
params: Params$Resource$Channels$Stop,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
stop(
params: Params$Resource$Channels$Stop,
callback: BodyResponseCallback<void>
): void;
stop(callback: BodyResponseCallback<void>): void;
stop(
paramsOrCallback?:
| Params$Resource$Channels$Stop
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Channels$Stop;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Channels$Stop;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/channels/stop').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
}
export interface Params$Resource$Channels$Stop extends StandardParameters {
requestBody?: Schema$Channel;
}
export class Resource$Comments {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
create(
params: Params$Resource$Comments$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Comments$Create,
options?: MethodOptions
): GaxiosPromise<Schema$Comment>;
create(
params: Params$Resource$Comments$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Comments$Create,
options: MethodOptions | BodyResponseCallback<Schema$Comment>,
callback: BodyResponseCallback<Schema$Comment>
): void;
create(
params: Params$Resource$Comments$Create,
callback: BodyResponseCallback<Schema$Comment>
): void;
create(callback: BodyResponseCallback<Schema$Comment>): void;
create(
paramsOrCallback?:
| Params$Resource$Comments$Create
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Comment> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Comments$Create;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Comments$Create;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/comments').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Comment>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Comment>(parameters);
}
}
delete(
params: Params$Resource$Comments$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Comments$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Comments$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Comments$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Comments$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Comments$Delete
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Comments$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Comments$Delete;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/comments/{commentId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
},
options
),
params,
requiredParams: ['fileId', 'commentId'],
pathParams: ['commentId', 'fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Comments$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Comments$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Comment>;
get(
params: Params$Resource$Comments$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Comments$Get,
options: MethodOptions | BodyResponseCallback<Schema$Comment>,
callback: BodyResponseCallback<Schema$Comment>
): void;
get(
params: Params$Resource$Comments$Get,
callback: BodyResponseCallback<Schema$Comment>
): void;
get(callback: BodyResponseCallback<Schema$Comment>): void;
get(
paramsOrCallback?:
| Params$Resource$Comments$Get
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Comment> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Comments$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Comments$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/comments/{commentId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'commentId'],
pathParams: ['commentId', 'fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Comment>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Comment>(parameters);
}
}
list(
params: Params$Resource$Comments$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Comments$List,
options?: MethodOptions
): GaxiosPromise<Schema$CommentList>;
list(
params: Params$Resource$Comments$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Comments$List,
options: MethodOptions | BodyResponseCallback<Schema$CommentList>,
callback: BodyResponseCallback<Schema$CommentList>
): void;
list(
params: Params$Resource$Comments$List,
callback: BodyResponseCallback<Schema$CommentList>
): void;
list(callback: BodyResponseCallback<Schema$CommentList>): void;
list(
paramsOrCallback?:
| Params$Resource$Comments$List
| BodyResponseCallback<Schema$CommentList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$CommentList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$CommentList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$CommentList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Comments$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Comments$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/comments').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$CommentList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$CommentList>(parameters);
}
}
update(
params: Params$Resource$Comments$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Comments$Update,
options?: MethodOptions
): GaxiosPromise<Schema$Comment>;
update(
params: Params$Resource$Comments$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Comments$Update,
options: MethodOptions | BodyResponseCallback<Schema$Comment>,
callback: BodyResponseCallback<Schema$Comment>
): void;
update(
params: Params$Resource$Comments$Update,
callback: BodyResponseCallback<Schema$Comment>
): void;
update(callback: BodyResponseCallback<Schema$Comment>): void;
update(
paramsOrCallback?:
| Params$Resource$Comments$Update
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Comment>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Comment> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Comments$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Comments$Update;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/comments/{commentId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
},
options
),
params,
requiredParams: ['fileId', 'commentId'],
pathParams: ['commentId', 'fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Comment>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Comment>(parameters);
}
}
}
export interface Params$Resource$Comments$Create extends StandardParameters {
fileId?: string;
requestBody?: Schema$Comment;
}
export interface Params$Resource$Comments$Delete extends StandardParameters {
commentId?: string;
fileId?: string;
}
export interface Params$Resource$Comments$Get extends StandardParameters {
commentId?: string;
fileId?: string;
includeDeleted?: boolean;
}
export interface Params$Resource$Comments$List extends StandardParameters {
fileId?: string;
includeDeleted?: boolean;
pageSize?: number;
pageToken?: string;
startModifiedTime?: string;
}
export interface Params$Resource$Comments$Update extends StandardParameters {
commentId?: string;
fileId?: string;
requestBody?: Schema$Comment;
}
export class Resource$Drives {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
create(
params: Params$Resource$Drives$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Drives$Create,
options?: MethodOptions
): GaxiosPromise<Schema$Drive>;
create(
params: Params$Resource$Drives$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Drives$Create,
options: MethodOptions | BodyResponseCallback<Schema$Drive>,
callback: BodyResponseCallback<Schema$Drive>
): void;
create(
params: Params$Resource$Drives$Create,
callback: BodyResponseCallback<Schema$Drive>
): void;
create(callback: BodyResponseCallback<Schema$Drive>): void;
create(
paramsOrCallback?:
| Params$Resource$Drives$Create
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Drive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Drives$Create;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$Create;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/drives').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
},
options
),
params,
requiredParams: ['requestId'],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Drive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Drive>(parameters);
}
}
delete(
params: Params$Resource$Drives$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Drives$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Drives$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Drives$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Drives$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Drives$Delete
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Drives$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$Delete;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/drives/{driveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'DELETE',
},
options
),
params,
requiredParams: ['driveId'],
pathParams: ['driveId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Drives$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Drives$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Drive>;
get(
params: Params$Resource$Drives$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Drives$Get,
options: MethodOptions | BodyResponseCallback<Schema$Drive>,
callback: BodyResponseCallback<Schema$Drive>
): void;
get(
params: Params$Resource$Drives$Get,
callback: BodyResponseCallback<Schema$Drive>
): void;
get(callback: BodyResponseCallback<Schema$Drive>): void;
get(
paramsOrCallback?:
| Params$Resource$Drives$Get
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Drive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Drives$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/drives/{driveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['driveId'],
pathParams: ['driveId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Drive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Drive>(parameters);
}
}
hide(
params: Params$Resource$Drives$Hide,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
hide(
params?: Params$Resource$Drives$Hide,
options?: MethodOptions
): GaxiosPromise<Schema$Drive>;
hide(
params: Params$Resource$Drives$Hide,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
hide(
params: Params$Resource$Drives$Hide,
options: MethodOptions | BodyResponseCallback<Schema$Drive>,
callback: BodyResponseCallback<Schema$Drive>
): void;
hide(
params: Params$Resource$Drives$Hide,
callback: BodyResponseCallback<Schema$Drive>
): void;
hide(callback: BodyResponseCallback<Schema$Drive>): void;
hide(
paramsOrCallback?:
| Params$Resource$Drives$Hide
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Drive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Drives$Hide;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$Hide;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/drives/{driveId}/hide').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['driveId'],
pathParams: ['driveId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Drive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Drive>(parameters);
}
}
list(
params: Params$Resource$Drives$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Drives$List,
options?: MethodOptions
): GaxiosPromise<Schema$DriveList>;
list(
params: Params$Resource$Drives$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Drives$List,
options: MethodOptions | BodyResponseCallback<Schema$DriveList>,
callback: BodyResponseCallback<Schema$DriveList>
): void;
list(
params: Params$Resource$Drives$List,
callback: BodyResponseCallback<Schema$DriveList>
): void;
list(callback: BodyResponseCallback<Schema$DriveList>): void;
list(
paramsOrCallback?:
| Params$Resource$Drives$List
| BodyResponseCallback<Schema$DriveList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$DriveList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$DriveList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$DriveList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Drives$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/drives').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$DriveList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$DriveList>(parameters);
}
}
unhide(
params: Params$Resource$Drives$Unhide,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
unhide(
params?: Params$Resource$Drives$Unhide,
options?: MethodOptions
): GaxiosPromise<Schema$Drive>;
unhide(
params: Params$Resource$Drives$Unhide,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
unhide(
params: Params$Resource$Drives$Unhide,
options: MethodOptions | BodyResponseCallback<Schema$Drive>,
callback: BodyResponseCallback<Schema$Drive>
): void;
unhide(
params: Params$Resource$Drives$Unhide,
callback: BodyResponseCallback<Schema$Drive>
): void;
unhide(callback: BodyResponseCallback<Schema$Drive>): void;
unhide(
paramsOrCallback?:
| Params$Resource$Drives$Unhide
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Drive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Drives$Unhide;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$Unhide;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/drives/{driveId}/unhide').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['driveId'],
pathParams: ['driveId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Drive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Drive>(parameters);
}
}
update(
params: Params$Resource$Drives$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Drives$Update,
options?: MethodOptions
): GaxiosPromise<Schema$Drive>;
update(
params: Params$Resource$Drives$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Drives$Update,
options: MethodOptions | BodyResponseCallback<Schema$Drive>,
callback: BodyResponseCallback<Schema$Drive>
): void;
update(
params: Params$Resource$Drives$Update,
callback: BodyResponseCallback<Schema$Drive>
): void;
update(callback: BodyResponseCallback<Schema$Drive>): void;
update(
paramsOrCallback?:
| Params$Resource$Drives$Update
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Drive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Drive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Drives$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$Update;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/drives/{driveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'PATCH',
},
options
),
params,
requiredParams: ['driveId'],
pathParams: ['driveId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Drive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Drive>(parameters);
}
}
}
export interface Params$Resource$Drives$Create extends StandardParameters {
requestId?: string;
requestBody?: Schema$Drive;
}
export interface Params$Resource$Drives$Delete extends StandardParameters {
driveId?: string;
}
export interface Params$Resource$Drives$Get extends StandardParameters {
driveId?: string;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Drives$Hide extends StandardParameters {
driveId?: string;
}
export interface Params$Resource$Drives$List extends StandardParameters {
pageSize?: number;
pageToken?: string;
q?: string;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Drives$Unhide extends StandardParameters {
driveId?: string;
}
export interface Params$Resource$Drives$Update extends StandardParameters {
driveId?: string;
useDomainAdminAccess?: boolean;
requestBody?: Schema$Drive;
}
export class Resource$Files {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
copy(
params: Params$Resource$Files$Copy,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
copy(
params?: Params$Resource$Files$Copy,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
copy(
params: Params$Resource$Files$Copy,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
copy(
params: Params$Resource$Files$Copy,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
copy(
params: Params$Resource$Files$Copy,
callback: BodyResponseCallback<Schema$File>
): void;
copy(callback: BodyResponseCallback<Schema$File>): void;
copy(
paramsOrCallback?:
| Params$Resource$Files$Copy
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$File> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Copy;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Copy;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/copy').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$File>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$File>(parameters);
}
}
create(
params: Params$Resource$Files$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Files$Create,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
create(
params: Params$Resource$Files$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Files$Create,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
create(
params: Params$Resource$Files$Create,
callback: BodyResponseCallback<Schema$File>
): void;
create(callback: BodyResponseCallback<Schema$File>): void;
create(
paramsOrCallback?:
| Params$Resource$Files$Create
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$File> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Create;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Create;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
},
options
),
params,
mediaUrl: (rootUrl + '/upload/drive/v3/files').replace(
/([^:]\/)\/+/g,
'$1'
),
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$File>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$File>(parameters);
}
}
delete(
params: Params$Resource$Files$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Files$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Files$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Files$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Files$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Files$Delete
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Delete;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'DELETE',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
emptyTrash(
params: Params$Resource$Files$Emptytrash,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
emptyTrash(
params?: Params$Resource$Files$Emptytrash,
options?: MethodOptions
): GaxiosPromise<void>;
emptyTrash(
params: Params$Resource$Files$Emptytrash,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
emptyTrash(
params: Params$Resource$Files$Emptytrash,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
emptyTrash(
params: Params$Resource$Files$Emptytrash,
callback: BodyResponseCallback<void>
): void;
emptyTrash(callback: BodyResponseCallback<void>): void;
emptyTrash(
paramsOrCallback?:
| Params$Resource$Files$Emptytrash
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Emptytrash;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Emptytrash;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/trash').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'DELETE',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
export(
params: Params$Resource$Files$Export,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
export(
params?: Params$Resource$Files$Export,
options?: MethodOptions
): GaxiosPromise<unknown>;
export(
params: Params$Resource$Files$Export,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
export(
params: Params$Resource$Files$Export,
options: MethodOptions | BodyResponseCallback<unknown>,
callback: BodyResponseCallback<unknown>
): void;
export(
params: Params$Resource$Files$Export,
callback: BodyResponseCallback<unknown>
): void;
export(callback: BodyResponseCallback<unknown>): void;
export(
paramsOrCallback?:
| Params$Resource$Files$Export
| BodyResponseCallback<unknown>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<unknown>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<unknown> | BodyResponseCallback<Readable>
): void | GaxiosPromise<unknown> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Export;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Export;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/export').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'mimeType'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<unknown>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<unknown>(parameters);
}
}
generateIds(
params: Params$Resource$Files$Generateids,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
generateIds(
params?: Params$Resource$Files$Generateids,
options?: MethodOptions
): GaxiosPromise<Schema$GeneratedIds>;
generateIds(
params: Params$Resource$Files$Generateids,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
generateIds(
params: Params$Resource$Files$Generateids,
options: MethodOptions | BodyResponseCallback<Schema$GeneratedIds>,
callback: BodyResponseCallback<Schema$GeneratedIds>
): void;
generateIds(
params: Params$Resource$Files$Generateids,
callback: BodyResponseCallback<Schema$GeneratedIds>
): void;
generateIds(callback: BodyResponseCallback<Schema$GeneratedIds>): void;
generateIds(
paramsOrCallback?:
| Params$Resource$Files$Generateids
| BodyResponseCallback<Schema$GeneratedIds>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$GeneratedIds>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$GeneratedIds>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$GeneratedIds> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Files$Generateids;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Generateids;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/generateIds').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$GeneratedIds>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$GeneratedIds>(parameters);
}
}
get(
params: Params$Resource$Files$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Files$Get,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
get(
params: Params$Resource$Files$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Files$Get,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
get(
params: Params$Resource$Files$Get,
callback: BodyResponseCallback<Schema$File>
): void;
get(callback: BodyResponseCallback<Schema$File>): void;
get(
paramsOrCallback?:
| Params$Resource$Files$Get
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$File> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$File>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$File>(parameters);
}
}
list(
params: Params$Resource$Files$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Files$List,
options?: MethodOptions
): GaxiosPromise<Schema$FileList>;
list(
params: Params$Resource$Files$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Files$List,
options: MethodOptions | BodyResponseCallback<Schema$FileList>,
callback: BodyResponseCallback<Schema$FileList>
): void;
list(
params: Params$Resource$Files$List,
callback: BodyResponseCallback<Schema$FileList>
): void;
list(callback: BodyResponseCallback<Schema$FileList>): void;
list(
paramsOrCallback?:
| Params$Resource$Files$List
| BodyResponseCallback<Schema$FileList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$FileList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$FileList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$FileList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$FileList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$FileList>(parameters);
}
}
update(
params: Params$Resource$Files$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Files$Update,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
update(
params: Params$Resource$Files$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Files$Update,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
update(
params: Params$Resource$Files$Update,
callback: BodyResponseCallback<Schema$File>
): void;
update(callback: BodyResponseCallback<Schema$File>): void;
update(
paramsOrCallback?:
| Params$Resource$Files$Update
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$File>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$File> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Update;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'PATCH',
},
options
),
params,
mediaUrl: (rootUrl + '/upload/drive/v3/files/{fileId}').replace(
/([^:]\/)\/+/g,
'$1'
),
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$File>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$File>(parameters);
}
}
watch(
params: Params$Resource$Files$Watch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
watch(
params?: Params$Resource$Files$Watch,
options?: MethodOptions
): GaxiosPromise<Schema$Channel>;
watch(
params: Params$Resource$Files$Watch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
watch(
params: Params$Resource$Files$Watch,
options: MethodOptions | BodyResponseCallback<Schema$Channel>,
callback: BodyResponseCallback<Schema$Channel>
): void;
watch(
params: Params$Resource$Files$Watch,
callback: BodyResponseCallback<Schema$Channel>
): void;
watch(callback: BodyResponseCallback<Schema$Channel>): void;
watch(
paramsOrCallback?:
| Params$Resource$Files$Watch
| BodyResponseCallback<Schema$Channel>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Channel>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Channel>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Channel> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Files$Watch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Watch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/watch').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Channel>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Channel>(parameters);
}
}
}
export interface Params$Resource$Files$Copy extends StandardParameters {
enforceSingleParent?: boolean;
fileId?: string;
ignoreDefaultVisibility?: boolean;
includePermissionsForView?: string;
keepRevisionForever?: boolean;
ocrLanguage?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
requestBody?: Schema$File;
}
export interface Params$Resource$Files$Create extends StandardParameters {
enforceSingleParent?: boolean;
ignoreDefaultVisibility?: boolean;
includePermissionsForView?: string;
keepRevisionForever?: boolean;
ocrLanguage?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
useContentAsIndexableText?: boolean;
requestBody?: Schema$File;
media?: {
mimeType?: string;
body?: any;
};
}
export interface Params$Resource$Files$Delete extends StandardParameters {
enforceSingleParent?: boolean;
fileId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
}
export interface Params$Resource$Files$Emptytrash extends StandardParameters {
enforceSingleParent?: boolean;
}
export interface Params$Resource$Files$Export extends StandardParameters {
fileId?: string;
mimeType?: string;
}
export interface Params$Resource$Files$Generateids
extends StandardParameters {
count?: number;
space?: string;
type?: string;
}
export interface Params$Resource$Files$Get extends StandardParameters {
acknowledgeAbuse?: boolean;
fileId?: string;
includePermissionsForView?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
}
export interface Params$Resource$Files$List extends StandardParameters {
corpora?: string;
corpus?: string;
driveId?: string;
includeItemsFromAllDrives?: boolean;
includePermissionsForView?: string;
includeTeamDriveItems?: boolean;
orderBy?: string;
pageSize?: number;
pageToken?: string;
q?: string;
spaces?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
teamDriveId?: string;
}
export interface Params$Resource$Files$Update extends StandardParameters {
addParents?: string;
enforceSingleParent?: boolean;
fileId?: string;
includePermissionsForView?: string;
keepRevisionForever?: boolean;
ocrLanguage?: string;
removeParents?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
useContentAsIndexableText?: boolean;
requestBody?: Schema$File;
media?: {
mimeType?: string;
body?: any;
};
}
export interface Params$Resource$Files$Watch extends StandardParameters {
acknowledgeAbuse?: boolean;
fileId?: string;
includePermissionsForView?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
requestBody?: Schema$Channel;
}
export class Resource$Permissions {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
create(
params: Params$Resource$Permissions$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Permissions$Create,
options?: MethodOptions
): GaxiosPromise<Schema$Permission>;
create(
params: Params$Resource$Permissions$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Permissions$Create,
options: MethodOptions | BodyResponseCallback<Schema$Permission>,
callback: BodyResponseCallback<Schema$Permission>
): void;
create(
params: Params$Resource$Permissions$Create,
callback: BodyResponseCallback<Schema$Permission>
): void;
create(callback: BodyResponseCallback<Schema$Permission>): void;
create(
paramsOrCallback?:
| Params$Resource$Permissions$Create
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Permission> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Permissions$Create;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$Create;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/permissions').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Permission>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Permission>(parameters);
}
}
delete(
params: Params$Resource$Permissions$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Permissions$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Permissions$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Permissions$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Permissions$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Permissions$Delete
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Permissions$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$Delete;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/permissions/{permissionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
},
options
),
params,
requiredParams: ['fileId', 'permissionId'],
pathParams: ['fileId', 'permissionId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Permissions$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Permissions$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Permission>;
get(
params: Params$Resource$Permissions$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Permissions$Get,
options: MethodOptions | BodyResponseCallback<Schema$Permission>,
callback: BodyResponseCallback<Schema$Permission>
): void;
get(
params: Params$Resource$Permissions$Get,
callback: BodyResponseCallback<Schema$Permission>
): void;
get(callback: BodyResponseCallback<Schema$Permission>): void;
get(
paramsOrCallback?:
| Params$Resource$Permissions$Get
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Permission> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Permissions$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/permissions/{permissionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'permissionId'],
pathParams: ['fileId', 'permissionId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Permission>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Permission>(parameters);
}
}
list(
params: Params$Resource$Permissions$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Permissions$List,
options?: MethodOptions
): GaxiosPromise<Schema$PermissionList>;
list(
params: Params$Resource$Permissions$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Permissions$List,
options: MethodOptions | BodyResponseCallback<Schema$PermissionList>,
callback: BodyResponseCallback<Schema$PermissionList>
): void;
list(
params: Params$Resource$Permissions$List,
callback: BodyResponseCallback<Schema$PermissionList>
): void;
list(callback: BodyResponseCallback<Schema$PermissionList>): void;
list(
paramsOrCallback?:
| Params$Resource$Permissions$List
| BodyResponseCallback<Schema$PermissionList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$PermissionList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$PermissionList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$PermissionList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Permissions$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/permissions').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$PermissionList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$PermissionList>(parameters);
}
}
update(
params: Params$Resource$Permissions$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Permissions$Update,
options?: MethodOptions
): GaxiosPromise<Schema$Permission>;
update(
params: Params$Resource$Permissions$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Permissions$Update,
options: MethodOptions | BodyResponseCallback<Schema$Permission>,
callback: BodyResponseCallback<Schema$Permission>
): void;
update(
params: Params$Resource$Permissions$Update,
callback: BodyResponseCallback<Schema$Permission>
): void;
update(callback: BodyResponseCallback<Schema$Permission>): void;
update(
paramsOrCallback?:
| Params$Resource$Permissions$Update
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Permission>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Permission> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Permissions$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$Update;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/permissions/{permissionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
},
options
),
params,
requiredParams: ['fileId', 'permissionId'],
pathParams: ['fileId', 'permissionId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Permission>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Permission>(parameters);
}
}
}
export interface Params$Resource$Permissions$Create
extends StandardParameters {
emailMessage?: string;
enforceSingleParent?: boolean;
fileId?: string;
moveToNewOwnersRoot?: boolean;
sendNotificationEmail?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
transferOwnership?: boolean;
useDomainAdminAccess?: boolean;
requestBody?: Schema$Permission;
}
export interface Params$Resource$Permissions$Delete
extends StandardParameters {
fileId?: string;
permissionId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Permissions$Get extends StandardParameters {
fileId?: string;
permissionId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Permissions$List extends StandardParameters {
fileId?: string;
includePermissionsForView?: string;
pageSize?: number;
pageToken?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Permissions$Update
extends StandardParameters {
fileId?: string;
permissionId?: string;
removeExpiration?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
transferOwnership?: boolean;
useDomainAdminAccess?: boolean;
requestBody?: Schema$Permission;
}
export class Resource$Replies {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
create(
params: Params$Resource$Replies$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Replies$Create,
options?: MethodOptions
): GaxiosPromise<Schema$Reply>;
create(
params: Params$Resource$Replies$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Replies$Create,
options: MethodOptions | BodyResponseCallback<Schema$Reply>,
callback: BodyResponseCallback<Schema$Reply>
): void;
create(
params: Params$Resource$Replies$Create,
callback: BodyResponseCallback<Schema$Reply>
): void;
create(callback: BodyResponseCallback<Schema$Reply>): void;
create(
paramsOrCallback?:
| Params$Resource$Replies$Create
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Reply> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Replies$Create;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Replies$Create;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/comments/{commentId}/replies'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
},
options
),
params,
requiredParams: ['fileId', 'commentId'],
pathParams: ['commentId', 'fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Reply>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Reply>(parameters);
}
}
delete(
params: Params$Resource$Replies$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Replies$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Replies$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Replies$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Replies$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Replies$Delete
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Replies$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Replies$Delete;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl +
'/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
},
options
),
params,
requiredParams: ['fileId', 'commentId', 'replyId'],
pathParams: ['commentId', 'fileId', 'replyId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Replies$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Replies$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Reply>;
get(
params: Params$Resource$Replies$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Replies$Get,
options: MethodOptions | BodyResponseCallback<Schema$Reply>,
callback: BodyResponseCallback<Schema$Reply>
): void;
get(
params: Params$Resource$Replies$Get,
callback: BodyResponseCallback<Schema$Reply>
): void;
get(callback: BodyResponseCallback<Schema$Reply>): void;
get(
paramsOrCallback?:
| Params$Resource$Replies$Get
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Reply> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Replies$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Replies$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl +
'/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'commentId', 'replyId'],
pathParams: ['commentId', 'fileId', 'replyId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Reply>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Reply>(parameters);
}
}
list(
params: Params$Resource$Replies$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Replies$List,
options?: MethodOptions
): GaxiosPromise<Schema$ReplyList>;
list(
params: Params$Resource$Replies$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Replies$List,
options: MethodOptions | BodyResponseCallback<Schema$ReplyList>,
callback: BodyResponseCallback<Schema$ReplyList>
): void;
list(
params: Params$Resource$Replies$List,
callback: BodyResponseCallback<Schema$ReplyList>
): void;
list(callback: BodyResponseCallback<Schema$ReplyList>): void;
list(
paramsOrCallback?:
| Params$Resource$Replies$List
| BodyResponseCallback<Schema$ReplyList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ReplyList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ReplyList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ReplyList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Replies$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Replies$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/comments/{commentId}/replies'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'commentId'],
pathParams: ['commentId', 'fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ReplyList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ReplyList>(parameters);
}
}
update(
params: Params$Resource$Replies$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Replies$Update,
options?: MethodOptions
): GaxiosPromise<Schema$Reply>;
update(
params: Params$Resource$Replies$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Replies$Update,
options: MethodOptions | BodyResponseCallback<Schema$Reply>,
callback: BodyResponseCallback<Schema$Reply>
): void;
update(
params: Params$Resource$Replies$Update,
callback: BodyResponseCallback<Schema$Reply>
): void;
update(callback: BodyResponseCallback<Schema$Reply>): void;
update(
paramsOrCallback?:
| Params$Resource$Replies$Update
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Reply>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Reply> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Replies$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Replies$Update;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl +
'/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
},
options
),
params,
requiredParams: ['fileId', 'commentId', 'replyId'],
pathParams: ['commentId', 'fileId', 'replyId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Reply>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Reply>(parameters);
}
}
}
export interface Params$Resource$Replies$Create extends StandardParameters {
commentId?: string;
fileId?: string;
requestBody?: Schema$Reply;
}
export interface Params$Resource$Replies$Delete extends StandardParameters {
commentId?: string;
fileId?: string;
replyId?: string;
}
export interface Params$Resource$Replies$Get extends StandardParameters {
commentId?: string;
fileId?: string;
includeDeleted?: boolean;
replyId?: string;
}
export interface Params$Resource$Replies$List extends StandardParameters {
commentId?: string;
fileId?: string;
includeDeleted?: boolean;
pageSize?: number;
pageToken?: string;
}
export interface Params$Resource$Replies$Update extends StandardParameters {
commentId?: string;
fileId?: string;
replyId?: string;
requestBody?: Schema$Reply;
}
export class Resource$Revisions {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
delete(
params: Params$Resource$Revisions$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Revisions$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Revisions$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Revisions$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Revisions$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Revisions$Delete
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Revisions$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Revisions$Delete;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/revisions/{revisionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
},
options
),
params,
requiredParams: ['fileId', 'revisionId'],
pathParams: ['fileId', 'revisionId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Revisions$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Revisions$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Revision>;
get(
params: Params$Resource$Revisions$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Revisions$Get,
options: MethodOptions | BodyResponseCallback<Schema$Revision>,
callback: BodyResponseCallback<Schema$Revision>
): void;
get(
params: Params$Resource$Revisions$Get,
callback: BodyResponseCallback<Schema$Revision>
): void;
get(callback: BodyResponseCallback<Schema$Revision>): void;
get(
paramsOrCallback?:
| Params$Resource$Revisions$Get
| BodyResponseCallback<Schema$Revision>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Revision>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Revision>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Revision> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Revisions$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Revisions$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/revisions/{revisionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'revisionId'],
pathParams: ['fileId', 'revisionId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Revision>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Revision>(parameters);
}
}
list(
params: Params$Resource$Revisions$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Revisions$List,
options?: MethodOptions
): GaxiosPromise<Schema$RevisionList>;
list(
params: Params$Resource$Revisions$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Revisions$List,
options: MethodOptions | BodyResponseCallback<Schema$RevisionList>,
callback: BodyResponseCallback<Schema$RevisionList>
): void;
list(
params: Params$Resource$Revisions$List,
callback: BodyResponseCallback<Schema$RevisionList>
): void;
list(callback: BodyResponseCallback<Schema$RevisionList>): void;
list(
paramsOrCallback?:
| Params$Resource$Revisions$List
| BodyResponseCallback<Schema$RevisionList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$RevisionList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$RevisionList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$RevisionList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Revisions$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Revisions$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/files/{fileId}/revisions').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$RevisionList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$RevisionList>(parameters);
}
}
update(
params: Params$Resource$Revisions$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Revisions$Update,
options?: MethodOptions
): GaxiosPromise<Schema$Revision>;
update(
params: Params$Resource$Revisions$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Revisions$Update,
options: MethodOptions | BodyResponseCallback<Schema$Revision>,
callback: BodyResponseCallback<Schema$Revision>
): void;
update(
params: Params$Resource$Revisions$Update,
callback: BodyResponseCallback<Schema$Revision>
): void;
update(callback: BodyResponseCallback<Schema$Revision>): void;
update(
paramsOrCallback?:
| Params$Resource$Revisions$Update
| BodyResponseCallback<Schema$Revision>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Revision>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Revision>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Revision> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Revisions$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Revisions$Update;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v3/files/{fileId}/revisions/{revisionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
},
options
),
params,
requiredParams: ['fileId', 'revisionId'],
pathParams: ['fileId', 'revisionId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Revision>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Revision>(parameters);
}
}
}
export interface Params$Resource$Revisions$Delete extends StandardParameters {
fileId?: string;
revisionId?: string;
}
export interface Params$Resource$Revisions$Get extends StandardParameters {
acknowledgeAbuse?: boolean;
fileId?: string;
revisionId?: string;
}
export interface Params$Resource$Revisions$List extends StandardParameters {
fileId?: string;
pageSize?: number;
pageToken?: string;
}
export interface Params$Resource$Revisions$Update extends StandardParameters {
fileId?: string;
revisionId?: string;
requestBody?: Schema$Revision;
}
export class Resource$Teamdrives {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
create(
params: Params$Resource$Teamdrives$Create,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
create(
params?: Params$Resource$Teamdrives$Create,
options?: MethodOptions
): GaxiosPromise<Schema$TeamDrive>;
create(
params: Params$Resource$Teamdrives$Create,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
create(
params: Params$Resource$Teamdrives$Create,
options: MethodOptions | BodyResponseCallback<Schema$TeamDrive>,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
create(
params: Params$Resource$Teamdrives$Create,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
create(callback: BodyResponseCallback<Schema$TeamDrive>): void;
create(
paramsOrCallback?:
| Params$Resource$Teamdrives$Create
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$TeamDrive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Teamdrives$Create;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Teamdrives$Create;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/teamdrives').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['requestId'],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$TeamDrive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$TeamDrive>(parameters);
}
}
delete(
params: Params$Resource$Teamdrives$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Teamdrives$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Teamdrives$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Teamdrives$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Teamdrives$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Teamdrives$Delete
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<void>
| BodyResponseCallback<Readable>,
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Teamdrives$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Teamdrives$Delete;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/teamdrives/{teamDriveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'DELETE',
},
options
),
params,
requiredParams: ['teamDriveId'],
pathParams: ['teamDriveId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Teamdrives$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Teamdrives$Get,
options?: MethodOptions
): GaxiosPromise<Schema$TeamDrive>;
get(
params: Params$Resource$Teamdrives$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Teamdrives$Get,
options: MethodOptions | BodyResponseCallback<Schema$TeamDrive>,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
get(
params: Params$Resource$Teamdrives$Get,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
get(callback: BodyResponseCallback<Schema$TeamDrive>): void;
get(
paramsOrCallback?:
| Params$Resource$Teamdrives$Get
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$TeamDrive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Teamdrives$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Teamdrives$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/teamdrives/{teamDriveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['teamDriveId'],
pathParams: ['teamDriveId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$TeamDrive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$TeamDrive>(parameters);
}
}
list(
params: Params$Resource$Teamdrives$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Teamdrives$List,
options?: MethodOptions
): GaxiosPromise<Schema$TeamDriveList>;
list(
params: Params$Resource$Teamdrives$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Teamdrives$List,
options: MethodOptions | BodyResponseCallback<Schema$TeamDriveList>,
callback: BodyResponseCallback<Schema$TeamDriveList>
): void;
list(
params: Params$Resource$Teamdrives$List,
callback: BodyResponseCallback<Schema$TeamDriveList>
): void;
list(callback: BodyResponseCallback<Schema$TeamDriveList>): void;
list(
paramsOrCallback?:
| Params$Resource$Teamdrives$List
| BodyResponseCallback<Schema$TeamDriveList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$TeamDriveList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$TeamDriveList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$TeamDriveList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Teamdrives$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Teamdrives$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/teamdrives').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$TeamDriveList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$TeamDriveList>(parameters);
}
}
update(
params: Params$Resource$Teamdrives$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Teamdrives$Update,
options?: MethodOptions
): GaxiosPromise<Schema$TeamDrive>;
update(
params: Params$Resource$Teamdrives$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Teamdrives$Update,
options: MethodOptions | BodyResponseCallback<Schema$TeamDrive>,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
update(
params: Params$Resource$Teamdrives$Update,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
update(callback: BodyResponseCallback<Schema$TeamDrive>): void;
update(
paramsOrCallback?:
| Params$Resource$Teamdrives$Update
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$TeamDrive>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$TeamDrive> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Teamdrives$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Teamdrives$Update;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v3/teamdrives/{teamDriveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'PATCH',
},
options
),
params,
requiredParams: ['teamDriveId'],
pathParams: ['teamDriveId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$TeamDrive>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$TeamDrive>(parameters);
}
}
}
export interface Params$Resource$Teamdrives$Create
extends StandardParameters {
requestId?: string;
requestBody?: Schema$TeamDrive;
}
export interface Params$Resource$Teamdrives$Delete
extends StandardParameters {
teamDriveId?: string;
}
export interface Params$Resource$Teamdrives$Get extends StandardParameters {
teamDriveId?: string;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Teamdrives$List extends StandardParameters {
pageSize?: number;
pageToken?: string;
q?: string;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Teamdrives$Update
extends StandardParameters {
teamDriveId?: string;
useDomainAdminAccess?: boolean;
requestBody?: Schema$TeamDrive;
}
}