Class MediaResource
The "media" collection of methods.
Inherited Members
Namespace: Google.Apis.DiscoveryEngine.v1alpha
Assembly: Google.Apis.DiscoveryEngine.v1alpha.dll
Syntax
public class MediaResource
Constructors
MediaResource(IClientService)
Constructs a new resource.
Declaration
public MediaResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Upload(GoogleCloudNotebooklmV1alphaUploadSourceFileRequest, string)
Uploads a file for Notebook LM to use. Creates a Source.
Declaration
public virtual MediaResource.UploadRequest Upload(GoogleCloudNotebooklmV1alphaUploadSourceFileRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
GoogleCloudNotebooklmV1alphaUploadSourceFileRequest | body | The body of the request. |
string | parent | Required. The parent resource where the sources will be created. Format: projects/{project}/locations/{location}/notebooks/{notebook} |
Returns
Type | Description |
---|---|
MediaResource.UploadRequest |
Upload(GoogleCloudNotebooklmV1alphaUploadSourceFileRequest, string, Stream, string)
Uploads a file for Notebook LM to use. Creates a Source.
Declaration
public virtual MediaResource.UploadMediaUpload Upload(GoogleCloudNotebooklmV1alphaUploadSourceFileRequest body, string parent, Stream stream, string contentType)
Parameters
Type | Name | Description |
---|---|---|
GoogleCloudNotebooklmV1alphaUploadSourceFileRequest | body | The body of the request. |
string | parent | Required. The parent resource where the sources will be created. Format: projects/{project}/locations/{location}/notebooks/{notebook} |
Stream | stream | The stream to upload. See remarks for further information. |
string | contentType | The content type of the stream to upload. |
Returns
Type | Description |
---|---|
MediaResource.UploadMediaUpload |
Remarks
Considerations regarding stream
:
-
If
stream
is seekable, then the stream position will be reset to0
before reading commences. Ifstream
is not seekable, then it will be read from its current position -
Caller is responsible for maintaining the
stream
open until the upload is completed - Caller is responsible for closing the
stream