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_v2 {
export interface Options extends GlobalOptions {
version: 'v2';
}
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;
apps: Resource$Apps;
changes: Resource$Changes;
channels: Resource$Channels;
children: Resource$Children;
comments: Resource$Comments;
drives: Resource$Drives;
files: Resource$Files;
parents: Resource$Parents;
permissions: Resource$Permissions;
properties: Resource$Properties;
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.apps = new Resource$Apps(this.context);
this.changes = new Resource$Changes(this.context);
this.channels = new Resource$Channels(this.context);
this.children = new Resource$Children(this.context);
this.comments = new Resource$Comments(this.context);
this.drives = new Resource$Drives(this.context);
this.files = new Resource$Files(this.context);
this.parents = new Resource$Parents(this.context);
this.permissions = new Resource$Permissions(this.context);
this.properties = new Resource$Properties(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 {
additionalRoleInfo?: Array<{
roleSets?: Array<{additionalRoles?: string[]; primaryRole?: string}>;
type?: string;
}> | null;
canCreateDrives?: boolean | null;
canCreateTeamDrives?: boolean | null;
domainSharingPolicy?: string | null;
driveThemes?: Array<{
backgroundImageLink?: string;
colorRgb?: string;
id?: string;
}> | null;
etag?: string | null;
exportFormats?: Array<{source?: string; targets?: string[]}> | null;
features?: Array<{featureName?: string; featureRate?: number}> | null;
folderColorPalette?: string[] | null;
importFormats?: Array<{source?: string; targets?: string[]}> | null;
isCurrentAppInstalled?: boolean | null;
kind?: string | null;
languageCode?: string | null;
largestChangeId?: string | null;
maxUploadSizes?: Array<{size?: string; type?: string}> | null;
name?: string | null;
permissionId?: string | null;
quotaBytesByService?: Array<{
bytesUsed?: string;
serviceName?: string;
}> | null;
quotaBytesTotal?: string | null;
quotaBytesUsed?: string | null;
quotaBytesUsedAggregate?: string | null;
quotaBytesUsedInTrash?: string | null;
quotaType?: string | null;
remainingChangeIds?: string | null;
rootFolderId?: string | null;
selfLink?: string | null;
teamDriveThemes?: Array<{
backgroundImageLink?: string;
colorRgb?: string;
id?: string;
}> | null;
user?: Schema$User;
}
export interface Schema$App {
authorized?: boolean | null;
createInFolderTemplate?: string | null;
createUrl?: string | null;
hasDriveWideScope?: boolean | null;
icons?: Array<{category?: string; iconUrl?: string; size?: number}> | null;
id?: string | null;
installed?: boolean | null;
kind?: string | null;
longDescription?: string | null;
name?: string | null;
objectType?: string | null;
openUrlTemplate?: string | null;
primaryFileExtensions?: string[] | null;
primaryMimeTypes?: string[] | null;
productId?: string | null;
productUrl?: string | null;
secondaryFileExtensions?: string[] | null;
secondaryMimeTypes?: string[] | null;
shortDescription?: string | null;
supportsCreate?: boolean | null;
supportsImport?: boolean | null;
supportsMultiOpen?: boolean | null;
supportsOfflineCreate?: boolean | null;
useByDefault?: boolean | null;
}
export interface Schema$AppList {
defaultAppIds?: string[] | null;
etag?: string | null;
items?: Schema$App[];
kind?: string | null;
selfLink?: string | null;
}
export interface Schema$Change {
changeType?: string | null;
deleted?: boolean | null;
drive?: Schema$Drive;
driveId?: string | null;
file?: Schema$File;
fileId?: string | null;
id?: string | null;
kind?: string | null;
modificationDate?: string | null;
selfLink?: string | null;
teamDrive?: Schema$TeamDrive;
teamDriveId?: string | null;
type?: string | null;
}
export interface Schema$ChangeList {
etag?: string | null;
items?: Schema$Change[];
kind?: string | null;
largestChangeId?: string | null;
newStartPageToken?: string | null;
nextLink?: string | null;
nextPageToken?: string | null;
selfLink?: 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$ChildList {
etag?: string | null;
items?: Schema$ChildReference[];
kind?: string | null;
nextLink?: string | null;
nextPageToken?: string | null;
selfLink?: string | null;
}
export interface Schema$ChildReference {
childLink?: string | null;
id?: string | null;
kind?: string | null;
selfLink?: string | null;
}
export interface Schema$Comment {
anchor?: string | null;
author?: Schema$User;
commentId?: string | null;
content?: string | null;
context?: {type?: string; value?: string} | null;
createdDate?: string | null;
deleted?: boolean | null;
fileId?: string | null;
fileTitle?: string | null;
htmlContent?: string | null;
kind?: string | null;
modifiedDate?: string | null;
replies?: Schema$CommentReply[];
selfLink?: string | null;
status?: string | null;
}
export interface Schema$CommentList {
items?: Schema$Comment[];
kind?: string | null;
nextLink?: string | null;
nextPageToken?: string | null;
selfLink?: string | null;
}
export interface Schema$CommentReply {
author?: Schema$User;
content?: string | null;
createdDate?: string | null;
deleted?: boolean | null;
htmlContent?: string | null;
kind?: string | null;
modifiedDate?: string | null;
replyId?: string | null;
verb?: string | null;
}
export interface Schema$CommentReplyList {
items?: Schema$CommentReply[];
kind?: string | null;
nextLink?: string | null;
nextPageToken?: string | null;
selfLink?: string | null;
}
export interface Schema$ContentRestriction {
readOnly?: boolean | null;
reason?: string | null;
restrictingUser?: Schema$User;
restrictionDate?: 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;
createdDate?: 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 {
items?: Schema$Drive[];
kind?: string | null;
nextPageToken?: string | null;
}
export interface Schema$File {
alternateLink?: string | null;
appDataContents?: boolean | null;
canComment?: boolean | null;
canReadRevisions?: boolean | null;
capabilities?: {
canAddChildren?: boolean;
canAddFolderFromAnotherDrive?: boolean;
canAddMyDriveParent?: boolean;
canChangeCopyRequiresWriterPermission?: boolean;
canChangeRestrictedDownload?: boolean;
canChangeSecurityUpdateEnabled?: 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;
contentRestrictions?: Schema$ContentRestriction[];
copyable?: boolean | null;
copyRequiresWriterPermission?: boolean | null;
createdDate?: string | null;
defaultOpenWithLink?: string | null;
description?: string | null;
downloadUrl?: string | null;
driveId?: string | null;
editable?: boolean | null;
embedLink?: string | null;
etag?: string | null;
explicitlyTrashed?: boolean | null;
exportLinks?: {[key: string]: string} | null;
fileExtension?: string | null;
fileSize?: 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;
date?: 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;
whiteBalance?: string;
width?: number;
} | null;
indexableText?: {text?: string} | null;
isAppAuthorized?: boolean | null;
kind?: string | null;
labels?: {
hidden?: boolean;
modified?: boolean;
restricted?: boolean;
starred?: boolean;
trashed?: boolean;
viewed?: boolean;
} | null;
lastModifyingUser?: Schema$User;
lastModifyingUserName?: string | null;
lastViewedByMeDate?: string | null;
linkShareMetadata?: {
securityUpdateEligible?: boolean;
securityUpdateEnabled?: boolean;
} | null;
markedViewedByMeDate?: string | null;
md5Checksum?: string | null;
mimeType?: string | null;
modifiedByMeDate?: string | null;
modifiedDate?: string | null;
openWithLinks?: {[key: string]: string} | null;
originalFilename?: string | null;
ownedByMe?: boolean | null;
ownerNames?: string[] | null;
owners?: Schema$User[];
parents?: Schema$ParentReference[];
permissionIds?: string[] | null;
permissions?: Schema$Permission[];
properties?: Schema$Property[];
quotaBytesUsed?: string | null;
resourceKey?: string | null;
selfLink?: string | null;
shareable?: boolean | null;
shared?: boolean | null;
sharedWithMeDate?: string | null;
sharingUser?: Schema$User;
shortcutDetails?: {
targetId?: string;
targetMimeType?: string;
targetResourceKey?: string;
} | null;
spaces?: string[] | null;
teamDriveId?: string | null;
thumbnail?: {image?: string; mimeType?: string} | null;
thumbnailLink?: string | null;
thumbnailVersion?: string | null;
title?: string | null;
trashedDate?: string | null;
trashingUser?: Schema$User;
userPermission?: Schema$Permission;
version?: string | null;
videoMediaMetadata?: {
durationMillis?: string;
height?: number;
width?: number;
} | null;
webContentLink?: string | null;
webViewLink?: string | null;
writersCanShare?: boolean | null;
}
export interface Schema$FileList {
etag?: string | null;
incompleteSearch?: boolean | null;
items?: Schema$File[];
kind?: string | null;
nextLink?: string | null;
nextPageToken?: string | null;
selfLink?: string | null;
}
export interface Schema$GeneratedIds {
ids?: string[] | null;
kind?: string | null;
space?: string | null;
}
export interface Schema$ParentList {
etag?: string | null;
items?: Schema$ParentReference[];
kind?: string | null;
selfLink?: string | null;
}
export interface Schema$ParentReference {
id?: string | null;
isRoot?: boolean | null;
kind?: string | null;
parentLink?: string | null;
selfLink?: string | null;
}
export interface Schema$Permission {
additionalRoles?: string[] | null;
authKey?: string | null;
deleted?: boolean | null;
domain?: string | null;
emailAddress?: string | null;
etag?: string | null;
expirationDate?: string | null;
id?: string | null;
kind?: string | null;
name?: string | null;
permissionDetails?: Array<{
additionalRoles?: string[];
inherited?: boolean;
inheritedFrom?: string;
permissionType?: string;
role?: string;
}> | null;
photoLink?: string | null;
role?: string | null;
selfLink?: string | null;
teamDrivePermissionDetails?: Array<{
additionalRoles?: string[];
inherited?: boolean;
inheritedFrom?: string;
role?: string;
teamDrivePermissionType?: string;
}> | null;
type?: string | null;
value?: string | null;
view?: string | null;
withLink?: boolean | null;
}
export interface Schema$PermissionId {
id?: string | null;
kind?: string | null;
}
export interface Schema$PermissionList {
etag?: string | null;
items?: Schema$Permission[];
kind?: string | null;
nextPageToken?: string | null;
selfLink?: string | null;
}
export interface Schema$Property {
etag?: string | null;
key?: string | null;
kind?: string | null;
selfLink?: string | null;
value?: string | null;
visibility?: string | null;
}
export interface Schema$PropertyList {
etag?: string | null;
items?: Schema$Property[];
kind?: string | null;
selfLink?: string | null;
}
export interface Schema$Revision {
downloadUrl?: string | null;
etag?: string | null;
exportLinks?: {[key: string]: string} | null;
fileSize?: string | null;
id?: string | null;
kind?: string | null;
lastModifyingUser?: Schema$User;
lastModifyingUserName?: string | null;
md5Checksum?: string | null;
mimeType?: string | null;
modifiedDate?: string | null;
originalFilename?: string | null;
pinned?: boolean | null;
publishAuto?: boolean | null;
published?: boolean | null;
publishedLink?: string | null;
publishedOutsideDomain?: boolean | null;
selfLink?: string | null;
}
export interface Schema$RevisionList {
etag?: string | null;
items?: Schema$Revision[];
kind?: string | null;
nextPageToken?: string | null;
selfLink?: string | null;
}
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;
createdDate?: 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 {
items?: Schema$TeamDrive[];
kind?: string | null;
nextPageToken?: string | null;
}
export interface Schema$User {
displayName?: string | null;
emailAddress?: string | null;
isAuthenticatedUser?: boolean | null;
kind?: string | null;
permissionId?: string | null;
picture?: {url?: 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/v2/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 {
includeSubscribed?: boolean;
maxChangeIdCount?: string;
startChangeId?: string;
}
export class Resource$Apps {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
get(
params: Params$Resource$Apps$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Apps$Get,
options?: MethodOptions
): GaxiosPromise<Schema$App>;
get(
params: Params$Resource$Apps$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Apps$Get,
options: MethodOptions | BodyResponseCallback<Schema$App>,
callback: BodyResponseCallback<Schema$App>
): void;
get(
params: Params$Resource$Apps$Get,
callback: BodyResponseCallback<Schema$App>
): void;
get(callback: BodyResponseCallback<Schema$App>): void;
get(
paramsOrCallback?:
| Params$Resource$Apps$Get
| BodyResponseCallback<Schema$App>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$App>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$App>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$App> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Apps$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Apps$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/v2/apps/{appId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['appId'],
pathParams: ['appId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$App>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$App>(parameters);
}
}
list(
params: Params$Resource$Apps$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Apps$List,
options?: MethodOptions
): GaxiosPromise<Schema$AppList>;
list(
params: Params$Resource$Apps$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Apps$List,
options: MethodOptions | BodyResponseCallback<Schema$AppList>,
callback: BodyResponseCallback<Schema$AppList>
): void;
list(
params: Params$Resource$Apps$List,
callback: BodyResponseCallback<Schema$AppList>
): void;
list(callback: BodyResponseCallback<Schema$AppList>): void;
list(
paramsOrCallback?:
| Params$Resource$Apps$List
| BodyResponseCallback<Schema$AppList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$AppList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$AppList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$AppList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Apps$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Apps$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/v2/apps').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$AppList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$AppList>(parameters);
}
}
}
export interface Params$Resource$Apps$Get extends StandardParameters {
appId?: string;
}
export interface Params$Resource$Apps$List extends StandardParameters {
appFilterExtensions?: string;
appFilterMimeTypes?: string;
languageCode?: string;
}
export class Resource$Changes {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
get(
params: Params$Resource$Changes$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Changes$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Change>;
get(
params: Params$Resource$Changes$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Changes$Get,
options: MethodOptions | BodyResponseCallback<Schema$Change>,
callback: BodyResponseCallback<Schema$Change>
): void;
get(
params: Params$Resource$Changes$Get,
callback: BodyResponseCallback<Schema$Change>
): void;
get(callback: BodyResponseCallback<Schema$Change>): void;
get(
paramsOrCallback?:
| Params$Resource$Changes$Get
| BodyResponseCallback<Schema$Change>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Change>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Change>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Change> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Changes$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Changes$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/v2/changes/{changeId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['changeId'],
pathParams: ['changeId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Change>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Change>(parameters);
}
}
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/v2/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/v2/changes').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: [],
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/v2/changes/watch').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: [],
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$Get extends StandardParameters {
changeId?: string;
driveId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
teamDriveId?: string;
}
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;
includeDeleted?: boolean;
includeItemsFromAllDrives?: boolean;
includePermissionsForView?: string;
includeSubscribed?: boolean;
includeTeamDriveItems?: boolean;
maxResults?: number;
pageToken?: string;
spaces?: string;
startChangeId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
teamDriveId?: string;
}
export interface Params$Resource$Changes$Watch extends StandardParameters {
driveId?: string;
includeCorpusRemovals?: boolean;
includeDeleted?: boolean;
includeItemsFromAllDrives?: boolean;
includePermissionsForView?: string;
includeSubscribed?: boolean;
includeTeamDriveItems?: boolean;
maxResults?: number;
pageToken?: string;
spaces?: string;
startChangeId?: 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/v2/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$Children {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
delete(
params: Params$Resource$Children$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Children$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Children$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Children$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Children$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Children$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$Children$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Children$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/v2/files/{folderId}/children/{childId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
},
options
),
params,
requiredParams: ['folderId', 'childId'],
pathParams: ['childId', 'folderId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Children$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Children$Get,
options?: MethodOptions
): GaxiosPromise<Schema$ChildReference>;
get(
params: Params$Resource$Children$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Children$Get,
options: MethodOptions | BodyResponseCallback<Schema$ChildReference>,
callback: BodyResponseCallback<Schema$ChildReference>
): void;
get(
params: Params$Resource$Children$Get,
callback: BodyResponseCallback<Schema$ChildReference>
): void;
get(callback: BodyResponseCallback<Schema$ChildReference>): void;
get(
paramsOrCallback?:
| Params$Resource$Children$Get
| BodyResponseCallback<Schema$ChildReference>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ChildReference>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ChildReference>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ChildReference> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Children$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Children$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/v2/files/{folderId}/children/{childId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['folderId', 'childId'],
pathParams: ['childId', 'folderId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ChildReference>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ChildReference>(parameters);
}
}
insert(
params: Params$Resource$Children$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Children$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$ChildReference>;
insert(
params: Params$Resource$Children$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Children$Insert,
options: MethodOptions | BodyResponseCallback<Schema$ChildReference>,
callback: BodyResponseCallback<Schema$ChildReference>
): void;
insert(
params: Params$Resource$Children$Insert,
callback: BodyResponseCallback<Schema$ChildReference>
): void;
insert(callback: BodyResponseCallback<Schema$ChildReference>): void;
insert(
paramsOrCallback?:
| Params$Resource$Children$Insert
| BodyResponseCallback<Schema$ChildReference>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ChildReference>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ChildReference>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ChildReference> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Children$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Children$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files/{folderId}/children').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['folderId'],
pathParams: ['folderId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ChildReference>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ChildReference>(parameters);
}
}
list(
params: Params$Resource$Children$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Children$List,
options?: MethodOptions
): GaxiosPromise<Schema$ChildList>;
list(
params: Params$Resource$Children$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Children$List,
options: MethodOptions | BodyResponseCallback<Schema$ChildList>,
callback: BodyResponseCallback<Schema$ChildList>
): void;
list(
params: Params$Resource$Children$List,
callback: BodyResponseCallback<Schema$ChildList>
): void;
list(callback: BodyResponseCallback<Schema$ChildList>): void;
list(
paramsOrCallback?:
| Params$Resource$Children$List
| BodyResponseCallback<Schema$ChildList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ChildList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ChildList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ChildList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Children$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Children$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/v2/files/{folderId}/children').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['folderId'],
pathParams: ['folderId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ChildList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ChildList>(parameters);
}
}
}
export interface Params$Resource$Children$Delete extends StandardParameters {
childId?: string;
enforceSingleParent?: boolean;
folderId?: string;
}
export interface Params$Resource$Children$Get extends StandardParameters {
childId?: string;
folderId?: string;
}
export interface Params$Resource$Children$Insert extends StandardParameters {
enforceSingleParent?: boolean;
folderId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
requestBody?: Schema$ChildReference;
}
export interface Params$Resource$Children$List extends StandardParameters {
folderId?: string;
maxResults?: number;
orderBy?: string;
pageToken?: string;
q?: string;
}
export class Resource$Comments {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
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/v2/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/v2/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);
}
}
insert(
params: Params$Resource$Comments$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Comments$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$Comment>;
insert(
params: Params$Resource$Comments$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Comments$Insert,
options: MethodOptions | BodyResponseCallback<Schema$Comment>,
callback: BodyResponseCallback<Schema$Comment>
): void;
insert(
params: Params$Resource$Comments$Insert,
callback: BodyResponseCallback<Schema$Comment>
): void;
insert(callback: BodyResponseCallback<Schema$Comment>): void;
insert(
paramsOrCallback?:
| Params$Resource$Comments$Insert
| 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$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Comments$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/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);
}
}
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/v2/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);
}
}
patch(
params: Params$Resource$Comments$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Comments$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$Comment>;
patch(
params: Params$Resource$Comments$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Comments$Patch,
options: MethodOptions | BodyResponseCallback<Schema$Comment>,
callback: BodyResponseCallback<Schema$Comment>
): void;
patch(
params: Params$Resource$Comments$Patch,
callback: BodyResponseCallback<Schema$Comment>
): void;
patch(callback: BodyResponseCallback<Schema$Comment>): void;
patch(
paramsOrCallback?:
| Params$Resource$Comments$Patch
| 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$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Comments$Patch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v2/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);
}
}
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/v2/files/{fileId}/comments/{commentId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
},
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$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$Insert extends StandardParameters {
fileId?: string;
requestBody?: Schema$Comment;
}
export interface Params$Resource$Comments$List extends StandardParameters {
fileId?: string;
includeDeleted?: boolean;
maxResults?: number;
pageToken?: string;
updatedMin?: string;
}
export interface Params$Resource$Comments$Patch extends StandardParameters {
commentId?: string;
fileId?: string;
requestBody?: Schema$Comment;
}
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;
}
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/v2/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/v2/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/v2/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);
}
}
insert(
params: Params$Resource$Drives$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Drives$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$Drive>;
insert(
params: Params$Resource$Drives$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Drives$Insert,
options: MethodOptions | BodyResponseCallback<Schema$Drive>,
callback: BodyResponseCallback<Schema$Drive>
): void;
insert(
params: Params$Resource$Drives$Insert,
callback: BodyResponseCallback<Schema$Drive>
): void;
insert(callback: BodyResponseCallback<Schema$Drive>): void;
insert(
paramsOrCallback?:
| Params$Resource$Drives$Insert
| 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$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Drives$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/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);
}
}
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/v2/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/v2/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/v2/drives/{driveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'PUT',
},
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$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$Insert extends StandardParameters {
requestId?: string;
requestBody?: Schema$Drive;
}
export interface Params$Resource$Drives$List extends StandardParameters {
maxResults?: 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/v2/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);
}
}
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/v2/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/v2/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/v2/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/v2/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/v2/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);
}
}
insert(
params: Params$Resource$Files$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Files$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
insert(
params: Params$Resource$Files$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Files$Insert,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
insert(
params: Params$Resource$Files$Insert,
callback: BodyResponseCallback<Schema$File>
): void;
insert(callback: BodyResponseCallback<Schema$File>): void;
insert(
paramsOrCallback?:
| Params$Resource$Files$Insert
| 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$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
},
options
),
params,
mediaUrl: (rootUrl + '/upload/drive/v2/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);
}
}
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/v2/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);
}
}
patch(
params: Params$Resource$Files$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Files$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
patch(
params: Params$Resource$Files$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Files$Patch,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
patch(
params: Params$Resource$Files$Patch,
callback: BodyResponseCallback<Schema$File>
): void;
patch(callback: BodyResponseCallback<Schema$File>): void;
patch(
paramsOrCallback?:
| Params$Resource$Files$Patch
| 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$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Patch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files/{fileId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'PATCH',
},
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);
}
}
touch(
params: Params$Resource$Files$Touch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
touch(
params?: Params$Resource$Files$Touch,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
touch(
params: Params$Resource$Files$Touch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
touch(
params: Params$Resource$Files$Touch,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
touch(
params: Params$Resource$Files$Touch,
callback: BodyResponseCallback<Schema$File>
): void;
touch(callback: BodyResponseCallback<Schema$File>): void;
touch(
paramsOrCallback?:
| Params$Resource$Files$Touch
| 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$Touch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Touch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files/{fileId}/touch').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);
}
}
trash(
params: Params$Resource$Files$Trash,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
trash(
params?: Params$Resource$Files$Trash,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
trash(
params: Params$Resource$Files$Trash,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
trash(
params: Params$Resource$Files$Trash,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
trash(
params: Params$Resource$Files$Trash,
callback: BodyResponseCallback<Schema$File>
): void;
trash(callback: BodyResponseCallback<Schema$File>): void;
trash(
paramsOrCallback?:
| Params$Resource$Files$Trash
| 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$Trash;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Trash;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files/{fileId}/trash').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);
}
}
untrash(
params: Params$Resource$Files$Untrash,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
untrash(
params?: Params$Resource$Files$Untrash,
options?: MethodOptions
): GaxiosPromise<Schema$File>;
untrash(
params: Params$Resource$Files$Untrash,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
untrash(
params: Params$Resource$Files$Untrash,
options: MethodOptions | BodyResponseCallback<Schema$File>,
callback: BodyResponseCallback<Schema$File>
): void;
untrash(
params: Params$Resource$Files$Untrash,
callback: BodyResponseCallback<Schema$File>
): void;
untrash(callback: BodyResponseCallback<Schema$File>): void;
untrash(
paramsOrCallback?:
| Params$Resource$Files$Untrash
| 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$Untrash;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Files$Untrash;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files/{fileId}/untrash').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);
}
}
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/v2/files/{fileId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'PUT',
},
options
),
params,
mediaUrl: (rootUrl + '/upload/drive/v2/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/v2/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 {
convert?: boolean;
enforceSingleParent?: boolean;
fileId?: string;
includePermissionsForView?: string;
ocr?: boolean;
ocrLanguage?: string;
pinned?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
timedTextLanguage?: string;
timedTextTrackName?: string;
visibility?: string;
requestBody?: Schema$File;
}
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 {
maxResults?: number;
space?: string;
type?: string;
}
export interface Params$Resource$Files$Get extends StandardParameters {
acknowledgeAbuse?: boolean;
fileId?: string;
includePermissionsForView?: string;
projection?: string;
revisionId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
updateViewedDate?: boolean;
}
export interface Params$Resource$Files$Insert extends StandardParameters {
convert?: boolean;
enforceSingleParent?: boolean;
includePermissionsForView?: string;
ocr?: boolean;
ocrLanguage?: string;
pinned?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
timedTextLanguage?: string;
timedTextTrackName?: string;
useContentAsIndexableText?: boolean;
visibility?: string;
requestBody?: Schema$File;
media?: {
mimeType?: string;
body?: any;
};
}
export interface Params$Resource$Files$List extends StandardParameters {
corpora?: string;
corpus?: string;
driveId?: string;
includeItemsFromAllDrives?: boolean;
includePermissionsForView?: string;
includeTeamDriveItems?: boolean;
maxResults?: number;
orderBy?: string;
pageToken?: string;
projection?: string;
q?: string;
spaces?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
teamDriveId?: string;
}
export interface Params$Resource$Files$Patch extends StandardParameters {
addParents?: string;
convert?: boolean;
enforceSingleParent?: boolean;
fileId?: string;
includePermissionsForView?: string;
modifiedDateBehavior?: string;
newRevision?: boolean;
ocr?: boolean;
ocrLanguage?: string;
pinned?: boolean;
removeParents?: string;
setModifiedDate?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
timedTextLanguage?: string;
timedTextTrackName?: string;
updateViewedDate?: boolean;
useContentAsIndexableText?: boolean;
requestBody?: Schema$File;
}
export interface Params$Resource$Files$Touch extends StandardParameters {
fileId?: string;
includePermissionsForView?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
}
export interface Params$Resource$Files$Trash extends StandardParameters {
fileId?: string;
includePermissionsForView?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
}
export interface Params$Resource$Files$Untrash extends StandardParameters {
fileId?: string;
includePermissionsForView?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
}
export interface Params$Resource$Files$Update extends StandardParameters {
addParents?: string;
convert?: boolean;
enforceSingleParent?: boolean;
fileId?: string;
includePermissionsForView?: string;
modifiedDateBehavior?: string;
newRevision?: boolean;
ocr?: boolean;
ocrLanguage?: string;
pinned?: boolean;
removeParents?: string;
setModifiedDate?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
timedTextLanguage?: string;
timedTextTrackName?: string;
updateViewedDate?: 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;
projection?: string;
revisionId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
updateViewedDate?: boolean;
requestBody?: Schema$Channel;
}
export class Resource$Parents {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
delete(
params: Params$Resource$Parents$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Parents$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Parents$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Parents$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Parents$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Parents$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$Parents$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Parents$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/v2/files/{fileId}/parents/{parentId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
},
options
),
params,
requiredParams: ['fileId', 'parentId'],
pathParams: ['fileId', 'parentId'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Parents$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Parents$Get,
options?: MethodOptions
): GaxiosPromise<Schema$ParentReference>;
get(
params: Params$Resource$Parents$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Parents$Get,
options: MethodOptions | BodyResponseCallback<Schema$ParentReference>,
callback: BodyResponseCallback<Schema$ParentReference>
): void;
get(
params: Params$Resource$Parents$Get,
callback: BodyResponseCallback<Schema$ParentReference>
): void;
get(callback: BodyResponseCallback<Schema$ParentReference>): void;
get(
paramsOrCallback?:
| Params$Resource$Parents$Get
| BodyResponseCallback<Schema$ParentReference>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ParentReference>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ParentReference>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ParentReference> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Parents$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Parents$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/v2/files/{fileId}/parents/{parentId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'parentId'],
pathParams: ['fileId', 'parentId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ParentReference>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ParentReference>(parameters);
}
}
insert(
params: Params$Resource$Parents$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Parents$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$ParentReference>;
insert(
params: Params$Resource$Parents$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Parents$Insert,
options: MethodOptions | BodyResponseCallback<Schema$ParentReference>,
callback: BodyResponseCallback<Schema$ParentReference>
): void;
insert(
params: Params$Resource$Parents$Insert,
callback: BodyResponseCallback<Schema$ParentReference>
): void;
insert(callback: BodyResponseCallback<Schema$ParentReference>): void;
insert(
paramsOrCallback?:
| Params$Resource$Parents$Insert
| BodyResponseCallback<Schema$ParentReference>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ParentReference>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ParentReference>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ParentReference> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Parents$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Parents$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files/{fileId}/parents').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ParentReference>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ParentReference>(parameters);
}
}
list(
params: Params$Resource$Parents$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Parents$List,
options?: MethodOptions
): GaxiosPromise<Schema$ParentList>;
list(
params: Params$Resource$Parents$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Parents$List,
options: MethodOptions | BodyResponseCallback<Schema$ParentList>,
callback: BodyResponseCallback<Schema$ParentList>
): void;
list(
params: Params$Resource$Parents$List,
callback: BodyResponseCallback<Schema$ParentList>
): void;
list(callback: BodyResponseCallback<Schema$ParentList>): void;
list(
paramsOrCallback?:
| Params$Resource$Parents$List
| BodyResponseCallback<Schema$ParentList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ParentList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ParentList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$ParentList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Parents$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Parents$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/v2/files/{fileId}/parents').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$ParentList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$ParentList>(parameters);
}
}
}
export interface Params$Resource$Parents$Delete extends StandardParameters {
enforceSingleParent?: boolean;
fileId?: string;
parentId?: string;
}
export interface Params$Resource$Parents$Get extends StandardParameters {
fileId?: string;
parentId?: string;
}
export interface Params$Resource$Parents$Insert extends StandardParameters {
enforceSingleParent?: boolean;
fileId?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
requestBody?: Schema$ParentReference;
}
export interface Params$Resource$Parents$List extends StandardParameters {
fileId?: string;
}
export class Resource$Permissions {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
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/v2/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/v2/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);
}
}
getIdForEmail(
params: Params$Resource$Permissions$Getidforemail,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
getIdForEmail(
params?: Params$Resource$Permissions$Getidforemail,
options?: MethodOptions
): GaxiosPromise<Schema$PermissionId>;
getIdForEmail(
params: Params$Resource$Permissions$Getidforemail,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
getIdForEmail(
params: Params$Resource$Permissions$Getidforemail,
options: MethodOptions | BodyResponseCallback<Schema$PermissionId>,
callback: BodyResponseCallback<Schema$PermissionId>
): void;
getIdForEmail(
params: Params$Resource$Permissions$Getidforemail,
callback: BodyResponseCallback<Schema$PermissionId>
): void;
getIdForEmail(callback: BodyResponseCallback<Schema$PermissionId>): void;
getIdForEmail(
paramsOrCallback?:
| Params$Resource$Permissions$Getidforemail
| BodyResponseCallback<Schema$PermissionId>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$PermissionId>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$PermissionId>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$PermissionId> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Permissions$Getidforemail;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$Getidforemail;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/permissionIds/{email}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['email'],
pathParams: ['email'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$PermissionId>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$PermissionId>(parameters);
}
}
insert(
params: Params$Resource$Permissions$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Permissions$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$Permission>;
insert(
params: Params$Resource$Permissions$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Permissions$Insert,
options: MethodOptions | BodyResponseCallback<Schema$Permission>,
callback: BodyResponseCallback<Schema$Permission>
): void;
insert(
params: Params$Resource$Permissions$Insert,
callback: BodyResponseCallback<Schema$Permission>
): void;
insert(callback: BodyResponseCallback<Schema$Permission>): void;
insert(
paramsOrCallback?:
| Params$Resource$Permissions$Insert
| 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$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/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);
}
}
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/v2/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);
}
}
patch(
params: Params$Resource$Permissions$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Permissions$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$Permission>;
patch(
params: Params$Resource$Permissions$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Permissions$Patch,
options: MethodOptions | BodyResponseCallback<Schema$Permission>,
callback: BodyResponseCallback<Schema$Permission>
): void;
patch(
params: Params$Resource$Permissions$Patch,
callback: BodyResponseCallback<Schema$Permission>
): void;
patch(callback: BodyResponseCallback<Schema$Permission>): void;
patch(
paramsOrCallback?:
| Params$Resource$Permissions$Patch
| 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$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Permissions$Patch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v2/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);
}
}
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/v2/files/{fileId}/permissions/{permissionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
},
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$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$Getidforemail
extends StandardParameters {
email?: string;
}
export interface Params$Resource$Permissions$Insert
extends StandardParameters {
emailMessage?: string;
enforceSingleParent?: boolean;
fileId?: string;
moveToNewOwnersRoot?: boolean;
sendNotificationEmails?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
useDomainAdminAccess?: boolean;
requestBody?: Schema$Permission;
}
export interface Params$Resource$Permissions$List extends StandardParameters {
fileId?: string;
includePermissionsForView?: string;
maxResults?: number;
pageToken?: string;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Permissions$Patch
extends StandardParameters {
fileId?: string;
permissionId?: string;
removeExpiration?: boolean;
supportsAllDrives?: boolean;
supportsTeamDrives?: boolean;
transferOwnership?: boolean;
useDomainAdminAccess?: boolean;
requestBody?: Schema$Permission;
}
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$Properties {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
delete(
params: Params$Resource$Properties$Delete,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
delete(
params?: Params$Resource$Properties$Delete,
options?: MethodOptions
): GaxiosPromise<void>;
delete(
params: Params$Resource$Properties$Delete,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
delete(
params: Params$Resource$Properties$Delete,
options: MethodOptions | BodyResponseCallback<void>,
callback: BodyResponseCallback<void>
): void;
delete(
params: Params$Resource$Properties$Delete,
callback: BodyResponseCallback<void>
): void;
delete(callback: BodyResponseCallback<void>): void;
delete(
paramsOrCallback?:
| Params$Resource$Properties$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$Properties$Delete;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Properties$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/v2/files/{fileId}/properties/{propertyKey}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
},
options
),
params,
requiredParams: ['fileId', 'propertyKey'],
pathParams: ['fileId', 'propertyKey'],
context: this.context,
};
if (callback) {
createAPIRequest<void>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<void>(parameters);
}
}
get(
params: Params$Resource$Properties$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Properties$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Property>;
get(
params: Params$Resource$Properties$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Properties$Get,
options: MethodOptions | BodyResponseCallback<Schema$Property>,
callback: BodyResponseCallback<Schema$Property>
): void;
get(
params: Params$Resource$Properties$Get,
callback: BodyResponseCallback<Schema$Property>
): void;
get(callback: BodyResponseCallback<Schema$Property>): void;
get(
paramsOrCallback?:
| Params$Resource$Properties$Get
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Property> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Properties$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Properties$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/v2/files/{fileId}/properties/{propertyKey}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId', 'propertyKey'],
pathParams: ['fileId', 'propertyKey'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Property>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Property>(parameters);
}
}
insert(
params: Params$Resource$Properties$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Properties$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$Property>;
insert(
params: Params$Resource$Properties$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Properties$Insert,
options: MethodOptions | BodyResponseCallback<Schema$Property>,
callback: BodyResponseCallback<Schema$Property>
): void;
insert(
params: Params$Resource$Properties$Insert,
callback: BodyResponseCallback<Schema$Property>
): void;
insert(callback: BodyResponseCallback<Schema$Property>): void;
insert(
paramsOrCallback?:
| Params$Resource$Properties$Insert
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Property> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Properties$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Properties$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/files/{fileId}/properties').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Property>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Property>(parameters);
}
}
list(
params: Params$Resource$Properties$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Properties$List,
options?: MethodOptions
): GaxiosPromise<Schema$PropertyList>;
list(
params: Params$Resource$Properties$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Properties$List,
options: MethodOptions | BodyResponseCallback<Schema$PropertyList>,
callback: BodyResponseCallback<Schema$PropertyList>
): void;
list(
params: Params$Resource$Properties$List,
callback: BodyResponseCallback<Schema$PropertyList>
): void;
list(callback: BodyResponseCallback<Schema$PropertyList>): void;
list(
paramsOrCallback?:
| Params$Resource$Properties$List
| BodyResponseCallback<Schema$PropertyList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$PropertyList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$PropertyList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$PropertyList> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Properties$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Properties$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/v2/files/{fileId}/properties').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'GET',
},
options
),
params,
requiredParams: ['fileId'],
pathParams: ['fileId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$PropertyList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$PropertyList>(parameters);
}
}
patch(
params: Params$Resource$Properties$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Properties$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$Property>;
patch(
params: Params$Resource$Properties$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Properties$Patch,
options: MethodOptions | BodyResponseCallback<Schema$Property>,
callback: BodyResponseCallback<Schema$Property>
): void;
patch(
params: Params$Resource$Properties$Patch,
callback: BodyResponseCallback<Schema$Property>
): void;
patch(callback: BodyResponseCallback<Schema$Property>): void;
patch(
paramsOrCallback?:
| Params$Resource$Properties$Patch
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Property> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Properties$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Properties$Patch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v2/files/{fileId}/properties/{propertyKey}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
},
options
),
params,
requiredParams: ['fileId', 'propertyKey'],
pathParams: ['fileId', 'propertyKey'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Property>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Property>(parameters);
}
}
update(
params: Params$Resource$Properties$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Properties$Update,
options?: MethodOptions
): GaxiosPromise<Schema$Property>;
update(
params: Params$Resource$Properties$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Properties$Update,
options: MethodOptions | BodyResponseCallback<Schema$Property>,
callback: BodyResponseCallback<Schema$Property>
): void;
update(
params: Params$Resource$Properties$Update,
callback: BodyResponseCallback<Schema$Property>
): void;
update(callback: BodyResponseCallback<Schema$Property>): void;
update(
paramsOrCallback?:
| Params$Resource$Properties$Update
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Property>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Property> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Properties$Update;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Properties$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/v2/files/{fileId}/properties/{propertyKey}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
},
options
),
params,
requiredParams: ['fileId', 'propertyKey'],
pathParams: ['fileId', 'propertyKey'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Property>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Property>(parameters);
}
}
}
export interface Params$Resource$Properties$Delete
extends StandardParameters {
fileId?: string;
propertyKey?: string;
visibility?: string;
}
export interface Params$Resource$Properties$Get extends StandardParameters {
fileId?: string;
propertyKey?: string;
visibility?: string;
}
export interface Params$Resource$Properties$Insert
extends StandardParameters {
fileId?: string;
requestBody?: Schema$Property;
}
export interface Params$Resource$Properties$List extends StandardParameters {
fileId?: string;
}
export interface Params$Resource$Properties$Patch extends StandardParameters {
fileId?: string;
propertyKey?: string;
visibility?: string;
requestBody?: Schema$Property;
}
export interface Params$Resource$Properties$Update
extends StandardParameters {
fileId?: string;
propertyKey?: string;
visibility?: string;
requestBody?: Schema$Property;
}
export class Resource$Replies {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}
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/v2/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$CommentReply>;
get(
params: Params$Resource$Replies$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Replies$Get,
options: MethodOptions | BodyResponseCallback<Schema$CommentReply>,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
get(
params: Params$Resource$Replies$Get,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
get(callback: BodyResponseCallback<Schema$CommentReply>): void;
get(
paramsOrCallback?:
| Params$Resource$Replies$Get
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$CommentReply> | 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/v2/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$CommentReply>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$CommentReply>(parameters);
}
}
insert(
params: Params$Resource$Replies$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Replies$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$CommentReply>;
insert(
params: Params$Resource$Replies$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Replies$Insert,
options: MethodOptions | BodyResponseCallback<Schema$CommentReply>,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
insert(
params: Params$Resource$Replies$Insert,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
insert(callback: BodyResponseCallback<Schema$CommentReply>): void;
insert(
paramsOrCallback?:
| Params$Resource$Replies$Insert
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$CommentReply> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Replies$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Replies$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v2/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$CommentReply>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$CommentReply>(parameters);
}
}
list(
params: Params$Resource$Replies$List,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
list(
params?: Params$Resource$Replies$List,
options?: MethodOptions
): GaxiosPromise<Schema$CommentReplyList>;
list(
params: Params$Resource$Replies$List,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
list(
params: Params$Resource$Replies$List,
options: MethodOptions | BodyResponseCallback<Schema$CommentReplyList>,
callback: BodyResponseCallback<Schema$CommentReplyList>
): void;
list(
params: Params$Resource$Replies$List,
callback: BodyResponseCallback<Schema$CommentReplyList>
): void;
list(callback: BodyResponseCallback<Schema$CommentReplyList>): void;
list(
paramsOrCallback?:
| Params$Resource$Replies$List
| BodyResponseCallback<Schema$CommentReplyList>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$CommentReplyList>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$CommentReplyList>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$CommentReplyList> | 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/v2/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$CommentReplyList>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$CommentReplyList>(parameters);
}
}
patch(
params: Params$Resource$Replies$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Replies$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$CommentReply>;
patch(
params: Params$Resource$Replies$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Replies$Patch,
options: MethodOptions | BodyResponseCallback<Schema$CommentReply>,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
patch(
params: Params$Resource$Replies$Patch,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
patch(callback: BodyResponseCallback<Schema$CommentReply>): void;
patch(
paramsOrCallback?:
| Params$Resource$Replies$Patch
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$CommentReply> | GaxiosPromise<Readable> {
let params = (paramsOrCallback || {}) as Params$Resource$Replies$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Replies$Patch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl +
'/drive/v2/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$CommentReply>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$CommentReply>(parameters);
}
}
update(
params: Params$Resource$Replies$Update,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
update(
params?: Params$Resource$Replies$Update,
options?: MethodOptions
): GaxiosPromise<Schema$CommentReply>;
update(
params: Params$Resource$Replies$Update,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
update(
params: Params$Resource$Replies$Update,
options: MethodOptions | BodyResponseCallback<Schema$CommentReply>,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
update(
params: Params$Resource$Replies$Update,
callback: BodyResponseCallback<Schema$CommentReply>
): void;
update(callback: BodyResponseCallback<Schema$CommentReply>): void;
update(
paramsOrCallback?:
| Params$Resource$Replies$Update
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$CommentReply>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$CommentReply> | 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/v2/files/{fileId}/comments/{commentId}/replies/{replyId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
},
options
),
params,
requiredParams: ['fileId', 'commentId', 'replyId'],
pathParams: ['commentId', 'fileId', 'replyId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$CommentReply>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$CommentReply>(parameters);
}
}
}
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$Insert extends StandardParameters {
commentId?: string;
fileId?: string;
requestBody?: Schema$CommentReply;
}
export interface Params$Resource$Replies$List extends StandardParameters {
commentId?: string;
fileId?: string;
includeDeleted?: boolean;
maxResults?: number;
pageToken?: string;
}
export interface Params$Resource$Replies$Patch extends StandardParameters {
commentId?: string;
fileId?: string;
replyId?: string;
requestBody?: Schema$CommentReply;
}
export interface Params$Resource$Replies$Update extends StandardParameters {
commentId?: string;
fileId?: string;
replyId?: string;
requestBody?: Schema$CommentReply;
}
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/v2/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/v2/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/v2/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);
}
}
patch(
params: Params$Resource$Revisions$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Revisions$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$Revision>;
patch(
params: Params$Resource$Revisions$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Revisions$Patch,
options: MethodOptions | BodyResponseCallback<Schema$Revision>,
callback: BodyResponseCallback<Schema$Revision>
): void;
patch(
params: Params$Resource$Revisions$Patch,
callback: BodyResponseCallback<Schema$Revision>
): void;
patch(callback: BodyResponseCallback<Schema$Revision>): void;
patch(
paramsOrCallback?:
| Params$Resource$Revisions$Patch
| 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$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Revisions$Patch;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/drive/v2/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);
}
}
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/v2/files/{fileId}/revisions/{revisionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
},
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 {
fileId?: string;
revisionId?: string;
}
export interface Params$Resource$Revisions$List extends StandardParameters {
fileId?: string;
maxResults?: number;
pageToken?: string;
}
export interface Params$Resource$Revisions$Patch extends StandardParameters {
fileId?: string;
revisionId?: string;
requestBody?: Schema$Revision;
}
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;
}
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/v2/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/v2/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);
}
}
insert(
params: Params$Resource$Teamdrives$Insert,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
insert(
params?: Params$Resource$Teamdrives$Insert,
options?: MethodOptions
): GaxiosPromise<Schema$TeamDrive>;
insert(
params: Params$Resource$Teamdrives$Insert,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
insert(
params: Params$Resource$Teamdrives$Insert,
options: MethodOptions | BodyResponseCallback<Schema$TeamDrive>,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
insert(
params: Params$Resource$Teamdrives$Insert,
callback: BodyResponseCallback<Schema$TeamDrive>
): void;
insert(callback: BodyResponseCallback<Schema$TeamDrive>): void;
insert(
paramsOrCallback?:
| Params$Resource$Teamdrives$Insert
| 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$Insert;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Teamdrives$Insert;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/drive/v2/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);
}
}
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/v2/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/v2/teamdrives/{teamDriveId}').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'PUT',
},
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$Delete
extends StandardParameters {
teamDriveId?: string;
}
export interface Params$Resource$Teamdrives$Get extends StandardParameters {
teamDriveId?: string;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Teamdrives$Insert
extends StandardParameters {
requestId?: string;
requestBody?: Schema$TeamDrive;
}
export interface Params$Resource$Teamdrives$List extends StandardParameters {
maxResults?: number;
pageToken?: string;
q?: string;
useDomainAdminAccess?: boolean;
}
export interface Params$Resource$Teamdrives$Update
extends StandardParameters {
teamDriveId?: string;
useDomainAdminAccess?: boolean;
requestBody?: Schema$TeamDrive;
}
}