Represents a FileService
Inheritance
$protobuf.rpc.Service > protos.google.ai.generativelanguage.v1beta.FileServicePackage
@google-ai/generativelanguageConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new FileService service.
Parameters | |
---|---|
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Methods
create(rpcImpl, requestDelimited, responseDelimited)
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): FileService;
Creates new FileService service using the specified rpc implementation.
Parameters | |
---|---|
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Returns | |
---|---|
Type | Description |
FileService |
RPC service. Useful where requests and/or responses are streamed. |
createFile(request, callback)
public createFile(request: google.ai.generativelanguage.v1beta.ICreateFileRequest, callback: google.ai.generativelanguage.v1beta.FileService.CreateFileCallback): void;
Calls CreateFile.
Parameters | |
---|---|
Name | Description |
request |
ICreateFileRequest
CreateFileRequest message or plain object |
callback |
CreateFileCallback
Node-style callback called with the error, if any, and CreateFileResponse |
Returns | |
---|---|
Type | Description |
void |
createFile(request)
public createFile(request: google.ai.generativelanguage.v1beta.ICreateFileRequest): Promise<google.ai.generativelanguage.v1beta.CreateFileResponse>;
Calls CreateFile.
Parameter | |
---|---|
Name | Description |
request |
ICreateFileRequest
CreateFileRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.ai.generativelanguage.v1beta.CreateFileResponse> |
Promise |
deleteFile(request, callback)
public deleteFile(request: google.ai.generativelanguage.v1beta.IDeleteFileRequest, callback: google.ai.generativelanguage.v1beta.FileService.DeleteFileCallback): void;
Calls DeleteFile.
Parameters | |
---|---|
Name | Description |
request |
IDeleteFileRequest
DeleteFileRequest message or plain object |
callback |
DeleteFileCallback
Node-style callback called with the error, if any, and Empty |
Returns | |
---|---|
Type | Description |
void |
deleteFile(request)
public deleteFile(request: google.ai.generativelanguage.v1beta.IDeleteFileRequest): Promise<google.protobuf.Empty>;
Calls DeleteFile.
Parameter | |
---|---|
Name | Description |
request |
IDeleteFileRequest
DeleteFileRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.protobuf.Empty> |
Promise |
getFile(request, callback)
public getFile(request: google.ai.generativelanguage.v1beta.IGetFileRequest, callback: google.ai.generativelanguage.v1beta.FileService.GetFileCallback): void;
Calls GetFile.
Parameters | |
---|---|
Name | Description |
request |
IGetFileRequest
GetFileRequest message or plain object |
callback |
GetFileCallback
Node-style callback called with the error, if any, and File |
Returns | |
---|---|
Type | Description |
void |
getFile(request)
public getFile(request: google.ai.generativelanguage.v1beta.IGetFileRequest): Promise<google.ai.generativelanguage.v1beta.File>;
Calls GetFile.
Parameter | |
---|---|
Name | Description |
request |
IGetFileRequest
GetFileRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.ai.generativelanguage.v1beta.File> |
Promise |
listFiles(request, callback)
public listFiles(request: google.ai.generativelanguage.v1beta.IListFilesRequest, callback: google.ai.generativelanguage.v1beta.FileService.ListFilesCallback): void;
Calls ListFiles.
Parameters | |
---|---|
Name | Description |
request |
IListFilesRequest
ListFilesRequest message or plain object |
callback |
ListFilesCallback
Node-style callback called with the error, if any, and ListFilesResponse |
Returns | |
---|---|
Type | Description |
void |
listFiles(request)
public listFiles(request: google.ai.generativelanguage.v1beta.IListFilesRequest): Promise<google.ai.generativelanguage.v1beta.ListFilesResponse>;
Calls ListFiles.
Parameter | |
---|---|
Name | Description |
request |
IListFilesRequest
ListFilesRequest message or plain object |
Returns | |
---|---|
Type | Description |
Promise<google.ai.generativelanguage.v1beta.ListFilesResponse> |
Promise |