blob: 3046e0946e77780a99126bc5d74a82e3edcfd1bc [file] [log] [blame] [edit]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="discoveryengine_v1alpha.html">Discovery Engine API</a> . <a href="discoveryengine_v1alpha.projects.html">projects</a> . <a href="discoveryengine_v1alpha.projects.locations.html">locations</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.html">collections</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.engines.html">engines</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.engines.sessions.html">sessions</a> . <a href="discoveryengine_v1alpha.projects.locations.collections.engines.sessions.files.html">files</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists metadata for all files in the current session.</p>
<p class="toc_element">
<code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Lists metadata for all files in the current session.
Args:
parent: string, Required. The resource name of the Session. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` Name of the session resource to which the file belong. (required)
filter: string, Optional. The filter syntax consists of an expression language for constructing a predicate from one or more fields of the files being filtered. Filter expression is case-sensitive. Currently supported field names are: * upload_time * last_add_time * last_use_time * file_name * mime_type Some examples of filters would be: * &quot;file_name = &#x27;file_1&#x27;&quot; * &quot;file_name = &#x27;file_1&#x27; AND mime_type = &#x27;text/plain&#x27;&quot; * &quot;last_use_time &gt; &#x27;2025-06-14T12:00:00Z&#x27;&quot; For a full description of the filter format, please see https://google.aip.dev/160.
orderBy: string, Optional. Specifies the order in which files are returned. The value is a comma-separated string of fields to sort by. For ascending order - just the field name is used. For descending order - the field name is suffixed with ` desc`. Sorting is stable and applied sequentially according to the order of fields provided in the string. Supported fields for ordering: * `upload_time`: The time the file was uploaded. * `file_name`: The name of the file. * `mime_type`: The MIME type of the file. * `session_name`: The name of the session the file belongs to. Default Behavior: If the `order_by` field is not specified, files will be returned sorted by creation time in descending order. Examples: 1. Sort by file name in ascending order: `file_name` 2. Sort by upload time in descending order: `upload_time desc` 3. Sort by file name (ascending), then by content type (MIME type) (descending), and finally by upload time (ascending): `file_name, mime_type desc, upload_time`
pageSize: integer, Optional. The maximum number of files to return. The service may return fewer than this value. If unspecified, at most 100 files will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. If user specifies a value less than or equal to 0 - the request will be rejected with an INVALID_ARGUMENT error.
pageToken: string, Optional. A page token received from a previous `ListFiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListFiles` must match the call that provided the page token (except `page_size`, which may differ).
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for SessionService.ListFiles method.
&quot;files&quot;: [ # The FileMetadatas.
{ # Represents a file attached to a session (context file)
&quot;byteSize&quot;: &quot;A String&quot;, # Output only. The size of the context file in bytes.
&quot;downloadUri&quot;: &quot;A String&quot;, # Output only. The AssistantService.DownloadSessionFile URL to download the file. This URL will need the same credentials as AssistantService.ListSessionFileMetadata method and will provide the resource.
&quot;fileId&quot;: &quot;A String&quot;, # Output only. The ID of the file.
&quot;fileOriginType&quot;: &quot;A String&quot;, # Optional. The origin of the file.
&quot;lastAddTime&quot;: &quot;A String&quot;, # Output only. The time the file was added to the session. Note that if a file was added, then modified externally, then added again, the add time will be updated.
&quot;metadata&quot;: { # Optional. Represents metadata related to the file that can suit particular use cases. The prefix &quot;google.&quot; is reserved for the key for use by Google, but other prefixes can be freely used.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;mimeType&quot;: &quot;A String&quot;, # The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.
&quot;name&quot;: &quot;A String&quot;, # Output only. The name of the file uploaded.
&quot;originalSourceType&quot;: &quot;A String&quot;, # Optional. The type of the original source of the file.
&quot;originalUri&quot;: &quot;A String&quot;, # Optional. The original location of the file. It may be a local file path, or any other URI that allows accessing the file in an external system. There are two scenarios in which this url may be empty: 1. If the file was sent as inline data (e.g. pasted from the clipboard). 2. If the original location is not available. Note that there&#x27;s no guarantee that the URI will be pointing to a valid or actually existing file. For example, a file might have been uploaded to the session, and then deleted from the original source.
&quot;uploadTime&quot;: &quot;A String&quot;, # Output only. The time the file was uploaded (If this is a file generated by an internal process and then made available to the session, this indicates the moment it happened).
&quot;views&quot;: { # Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys: - &quot;thumbnail&quot; - &quot;mobile_thumbnail&quot; - &quot;clip&quot; - &quot;summary&quot; - &quot;translation&quot;
&quot;a_key&quot;: { # Represents a specific alternate version or &quot;view&quot; of a file object, such as a summary, a thumbnail, a translated version, etc.
&quot;byteSize&quot;: &quot;A String&quot;, # Output only. The size of the view in bytes.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the view was created.
&quot;fileCharacteristics&quot;: { # Caracteristics of other file types. # Output only. Characteristics of other file types.
&quot;characteristics&quot;: { # Output only. Generic map of characteristics.
&quot;a_key&quot;: &quot;A String&quot;,
},
},
&quot;imageCharacteristics&quot;: { # Standard characteristics of an image media view. # Output only. Characteristics of an image media view.
&quot;bitDepth&quot;: 42, # Output only. Bit depth of the image (e.g., 8-bit, 16-bit).
&quot;colorSpace&quot;: &quot;A String&quot;, # Output only. Color space of the image (e.g., &quot;RGB&quot;, &quot;CMYK&quot;, &quot;Grayscale&quot;).
&quot;height&quot;: 42, # Output only. Image height in pixels.
&quot;width&quot;: 42, # Output only. Image width in pixels.
},
&quot;mimeType&quot;: &quot;A String&quot;, # Output only. MIME type (e.g., &quot;image/jpeg&quot;, &quot;image/png&quot;, &quot;text/plain&quot;, &quot;video/mp4&quot;)
&quot;uri&quot;: &quot;A String&quot;, # Output only. The URI to access this media view.
&quot;videoCharacteristics&quot;: { # Standard characteristics of a video media view. # Output only. Characteristics of a video media view.
&quot;audioBitrateKbps&quot;: 42, # Output only. Bitrate of the audio in kbps.
&quot;audioCodecs&quot;: [ # Output only. Audio codecs used in the video.
&quot;A String&quot;,
],
&quot;duration&quot;: &quot;A String&quot;, # Output only. Video duration.
&quot;frameRate&quot;: 3.14, # Output only. Frame rate (frames per second).
&quot;height&quot;: 42, # Output only. Video height in pixels.
&quot;videoBitrateKbps&quot;: 42, # Output only. Bitrate of the video in kbps.
&quot;videoCodecs&quot;: [ # Output only. Video codecs used in the video.
&quot;A String&quot;,
],
&quot;width&quot;: 42, # Output only. Video width in pixels.
},
&quot;viewId&quot;: &quot;A String&quot;, # Output only. Globally Unique id for this specific view.
},
},
},
],
&quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this value in the ListFilesRequest.page_token field in the subsequent call to `ListFiles` method to retrieve the next page of results.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next()</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
</body></html>