Resource: Source
Represents a source resource in Gemini Notebook.
| JSON representation |
|---|
{ "name": string, "displayName": string, "mimeType": string, "state": enum ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the source. Format: |
displayName |
Optional. The display name of the source. |
mimeType |
Optional. The original MIME type of the source, as an IANA media type. For |
state |
Output only. The current state of the source. |
createTime |
Output only. Timestamp when the source was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
error |
Output only. The error status of the source if it is in FAILED state. |
originalUrl |
Output only. The original URL of the source, if applicable. |
Union field input_spec. Input content for creating a source. input_spec can be only one of the following: |
|
webContent |
A source from a web page. |
textContent |
A source from plain text. |
WebContent
Models a source from a web page.
| JSON representation |
|---|
{ "url": string } |
| Fields | |
|---|---|
url |
Required. The URL of the web page to process. |
TextContent
Models a source from text-based content.
| JSON representation |
|---|
{ "content": string } |
| Fields | |
|---|---|
content |
Required. The text content. The format of this content (e.g., |
State
The state of the source.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
State is unspecified. |
PROCESSING |
The source is being processed. |
ACTIVE |
The source is active and ready for use. |
FAILED |
The source failed to be processed. |
DELETING |
The source is being deleted. |
Status
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
Methods |
|
|---|---|
|
Creates a new source. |
|
Gets a specific source. |
|
Lists sources in a notebook. |