Class FileMetadata.Builder (0.66.0)

public static final class FileMetadata.Builder extends GeneratedMessageV3.Builder<FileMetadata.Builder> implements FileMetadataOrBuilder

Represents a file attached to a session (context file)

Protobuf type google.cloud.discoveryengine.v1alpha.FileMetadata

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FileMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FileMetadata.Builder
Overrides

build()

public FileMetadata build()
Returns
Type Description
FileMetadata

buildPartial()

public FileMetadata buildPartial()
Returns
Type Description
FileMetadata

clear()

public FileMetadata.Builder clear()
Returns
Type Description
FileMetadata.Builder
Overrides

clearByteSize()

public FileMetadata.Builder clearByteSize()

Output only. The size of the context file in bytes.

int64 byte_size = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearDownloadUri()

public FileMetadata.Builder clearDownloadUri()

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.

string download_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FileMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FileMetadata.Builder
Overrides

clearFileId()

public FileMetadata.Builder clearFileId()

Output only. The ID of the file.

string file_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearFileOriginType()

public FileMetadata.Builder clearFileOriginType()

Optional. The origin of the file.

.google.cloud.discoveryengine.v1alpha.FileOriginType file_origin_type = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearLastAddTime()

public FileMetadata.Builder clearLastAddTime()

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FileMetadata.Builder

clearMetadata()

public FileMetadata.Builder clearMetadata()
Returns
Type Description
FileMetadata.Builder

clearMimeType()

public FileMetadata.Builder clearMimeType()

The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearName()

public FileMetadata.Builder clearName()

Output only. The name of the file uploaded.

string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FileMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
FileMetadata.Builder
Overrides

clearOriginalSourceType()

public FileMetadata.Builder clearOriginalSourceType()

Optional. The type of the original source of the file.

.google.cloud.discoveryengine.v1alpha.FileSource original_source_type = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearOriginalUri()

public FileMetadata.Builder clearOriginalUri()

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'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.

string original_uri = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

clearUploadTime()

public FileMetadata.Builder clearUploadTime()

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FileMetadata.Builder

clearViews()

public FileMetadata.Builder clearViews()
Returns
Type Description
FileMetadata.Builder

clone()

public FileMetadata.Builder clone()
Returns
Type Description
FileMetadata.Builder
Overrides

containsMetadata(String key)

public boolean containsMetadata(String key)

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

containsViews(String key)

public boolean containsViews(String key)

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
boolean

getByteSize()

public long getByteSize()

Output only. The size of the context file in bytes.

int64 byte_size = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The byteSize.

getDefaultInstanceForType()

public FileMetadata getDefaultInstanceForType()
Returns
Type Description
FileMetadata

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDownloadUri()

public String getDownloadUri()

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.

string download_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The downloadUri.

getDownloadUriBytes()

public ByteString getDownloadUriBytes()

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.

string download_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for downloadUri.

getFileId()

public String getFileId()

Output only. The ID of the file.

string file_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The fileId.

getFileIdBytes()

public ByteString getFileIdBytes()

Output only. The ID of the file.

string file_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for fileId.

getFileOriginType()

public FileOriginType getFileOriginType()

Optional. The origin of the file.

.google.cloud.discoveryengine.v1alpha.FileOriginType file_origin_type = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileOriginType

The fileOriginType.

getFileOriginTypeValue()

public int getFileOriginTypeValue()

Optional. The origin of the file.

.google.cloud.discoveryengine.v1alpha.FileOriginType file_origin_type = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for fileOriginType.

getLastAddTime()

public Timestamp getLastAddTime()

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The lastAddTime.

getLastAddTimeBuilder()

public Timestamp.Builder getLastAddTimeBuilder()

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getLastAddTimeOrBuilder()

public TimestampOrBuilder getLastAddTimeOrBuilder()

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getMetadata() (deprecated)

public Map<String,String> getMetadata()

Use #getMetadataMap() instead.

Returns
Type Description
Map<String,String>

getMetadataCount()

public int getMetadataCount()

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getMetadataMap()

public Map<String,String> getMetadataMap()

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getMetadataOrDefault(String key, String defaultValue)

public String getMetadataOrDefault(String key, String defaultValue)

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getMetadataOrThrow(String key)

public String getMetadataOrThrow(String key)

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMimeType()

public String getMimeType()

The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Returns
Type Description
ByteString

The bytes for mimeType.

getMutableMetadata() (deprecated)

public Map<String,String> getMutableMetadata()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableViews() (deprecated)

public Map<String,FileView> getMutableViews()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,FileView>

getName()

public String getName()

Output only. The name of the file uploaded.

string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The name of the file uploaded.

string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getOriginalSourceType()

public FileSource getOriginalSourceType()

Optional. The type of the original source of the file.

.google.cloud.discoveryengine.v1alpha.FileSource original_source_type = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileSource

The originalSourceType.

getOriginalSourceTypeValue()

public int getOriginalSourceTypeValue()

Optional. The type of the original source of the file.

.google.cloud.discoveryengine.v1alpha.FileSource original_source_type = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for originalSourceType.

getOriginalUri()

public String getOriginalUri()

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'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.

string original_uri = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The originalUri.

getOriginalUriBytes()

public ByteString getOriginalUriBytes()

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'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.

string original_uri = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for originalUri.

getUploadTime()

public Timestamp getUploadTime()

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The uploadTime.

getUploadTimeBuilder()

public Timestamp.Builder getUploadTimeBuilder()

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUploadTimeOrBuilder()

public TimestampOrBuilder getUploadTimeOrBuilder()

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getViews() (deprecated)

public Map<String,FileView> getViews()

Use #getViewsMap() instead.

Returns
Type Description
Map<String,FileView>

getViewsCount()

public int getViewsCount()

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getViewsMap()

public Map<String,FileView> getViewsMap()

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Map<String,FileView>

getViewsOrDefault(String key, FileView defaultValue)

public FileView getViewsOrDefault(String key, FileView defaultValue)

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
key String
defaultValue FileView
Returns
Type Description
FileView

getViewsOrThrow(String key)

public FileView getViewsOrThrow(String key)

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
FileView

hasLastAddTime()

public boolean hasLastAddTime()

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the lastAddTime field is set.

hasUploadTime()

public boolean hasUploadTime()

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the uploadTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FileMetadata other)

public FileMetadata.Builder mergeFrom(FileMetadata other)
Parameter
Name Description
other FileMetadata
Returns
Type Description
FileMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FileMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FileMetadata.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public FileMetadata.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
FileMetadata.Builder
Overrides

mergeLastAddTime(Timestamp value)

public FileMetadata.Builder mergeLastAddTime(Timestamp value)

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
FileMetadata.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FileMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FileMetadata.Builder
Overrides

mergeUploadTime(Timestamp value)

public FileMetadata.Builder mergeUploadTime(Timestamp value)

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
FileMetadata.Builder

putAllMetadata(Map<String,String> values)

public FileMetadata.Builder putAllMetadata(Map<String,String> values)

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
FileMetadata.Builder

putAllViews(Map<String,FileView> values)

public FileMetadata.Builder putAllViews(Map<String,FileView> values)

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Map<String,FileView>
Returns
Type Description
FileMetadata.Builder

putMetadata(String key, String value)

public FileMetadata.Builder putMetadata(String key, String value)

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
FileMetadata.Builder

putViews(String key, FileView value)

public FileMetadata.Builder putViews(String key, FileView value)

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
key String
value FileView
Returns
Type Description
FileMetadata.Builder

putViewsBuilderIfAbsent(String key)

public FileView.Builder putViewsBuilderIfAbsent(String key)

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
FileView.Builder

removeMetadata(String key)

public FileMetadata.Builder removeMetadata(String key)

Optional. Represents metadata related to the file that can suit particular use cases. The prefix "google." is reserved for the key for use by Google, but other prefixes can be freely used.

map<string, string> metadata = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
FileMetadata.Builder

removeViews(String key)

public FileMetadata.Builder removeViews(String key)

Output only. Alternate views of this file object. Each file view is attached to a specific role. Possible example keys:

  • "thumbnail"
  • "mobile_thumbnail"
  • "clip"
  • "summary"
  • "translation"

map<string, .google.cloud.discoveryengine.v1alpha.FileView> views = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
FileMetadata.Builder

setByteSize(long value)

public FileMetadata.Builder setByteSize(long value)

Output only. The size of the context file in bytes.

int64 byte_size = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The byteSize to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setDownloadUri(String value)

public FileMetadata.Builder setDownloadUri(String value)

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.

string download_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The downloadUri to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setDownloadUriBytes(ByteString value)

public FileMetadata.Builder setDownloadUriBytes(ByteString value)

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.

string download_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for downloadUri to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public FileMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FileMetadata.Builder
Overrides

setFileId(String value)

public FileMetadata.Builder setFileId(String value)

Output only. The ID of the file.

string file_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The fileId to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setFileIdBytes(ByteString value)

public FileMetadata.Builder setFileIdBytes(ByteString value)

Output only. The ID of the file.

string file_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for fileId to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setFileOriginType(FileOriginType value)

public FileMetadata.Builder setFileOriginType(FileOriginType value)

Optional. The origin of the file.

.google.cloud.discoveryengine.v1alpha.FileOriginType file_origin_type = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FileOriginType

The fileOriginType to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setFileOriginTypeValue(int value)

public FileMetadata.Builder setFileOriginTypeValue(int value)

Optional. The origin of the file.

.google.cloud.discoveryengine.v1alpha.FileOriginType file_origin_type = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for fileOriginType to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setLastAddTime(Timestamp value)

public FileMetadata.Builder setLastAddTime(Timestamp value)

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
FileMetadata.Builder

setLastAddTime(Timestamp.Builder builderForValue)

public FileMetadata.Builder setLastAddTime(Timestamp.Builder builderForValue)

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.

.google.protobuf.Timestamp last_add_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
FileMetadata.Builder

setMimeType(String value)

public FileMetadata.Builder setMimeType(String value)

The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public FileMetadata.Builder setMimeTypeBytes(ByteString value)

The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setName(String value)

public FileMetadata.Builder setName(String value)

Output only. The name of the file uploaded.

string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setNameBytes(ByteString value)

public FileMetadata.Builder setNameBytes(ByteString value)

Output only. The name of the file uploaded.

string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setOriginalSourceType(FileSource value)

public FileMetadata.Builder setOriginalSourceType(FileSource value)

Optional. The type of the original source of the file.

.google.cloud.discoveryengine.v1alpha.FileSource original_source_type = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FileSource

The originalSourceType to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setOriginalSourceTypeValue(int value)

public FileMetadata.Builder setOriginalSourceTypeValue(int value)

Optional. The type of the original source of the file.

.google.cloud.discoveryengine.v1alpha.FileSource original_source_type = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for originalSourceType to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setOriginalUri(String value)

public FileMetadata.Builder setOriginalUri(String value)

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'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.

string original_uri = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The originalUri to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setOriginalUriBytes(ByteString value)

public FileMetadata.Builder setOriginalUriBytes(ByteString value)

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'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.

string original_uri = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for originalUri to set.

Returns
Type Description
FileMetadata.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FileMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
FileMetadata.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final FileMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FileMetadata.Builder
Overrides

setUploadTime(Timestamp value)

public FileMetadata.Builder setUploadTime(Timestamp value)

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
FileMetadata.Builder

setUploadTime(Timestamp.Builder builderForValue)

public FileMetadata.Builder setUploadTime(Timestamp.Builder builderForValue)

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).

.google.protobuf.Timestamp upload_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
FileMetadata.Builder