Class FileMetadata

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1alpha.FileMetadata
All Implemented Interfaces:
FileMetadataOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class FileMetadata extends com.google.protobuf.GeneratedMessage implements FileMetadataOrBuilder
 Represents a file attached to a session (context file)
 
Protobuf type google.cloud.discoveryengine.v1alpha.FileMetadata
See Also:
  • Field Details

    • FILE_ID_FIELD_NUMBER

      public static final int FILE_ID_FIELD_NUMBER
      See Also:
    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • MIME_TYPE_FIELD_NUMBER

      public static final int MIME_TYPE_FIELD_NUMBER
      See Also:
    • BYTE_SIZE_FIELD_NUMBER

      public static final int BYTE_SIZE_FIELD_NUMBER
      See Also:
    • ORIGINAL_URI_FIELD_NUMBER

      public static final int ORIGINAL_URI_FIELD_NUMBER
      See Also:
    • ORIGINAL_SOURCE_TYPE_FIELD_NUMBER

      public static final int ORIGINAL_SOURCE_TYPE_FIELD_NUMBER
      See Also:
    • UPLOAD_TIME_FIELD_NUMBER

      public static final int UPLOAD_TIME_FIELD_NUMBER
      See Also:
    • LAST_ADD_TIME_FIELD_NUMBER

      public static final int LAST_ADD_TIME_FIELD_NUMBER
      See Also:
    • METADATA_FIELD_NUMBER

      public static final int METADATA_FIELD_NUMBER
      See Also:
    • DOWNLOAD_URI_FIELD_NUMBER

      public static final int DOWNLOAD_URI_FIELD_NUMBER
      See Also:
    • FILE_ORIGIN_TYPE_FIELD_NUMBER

      public static final int FILE_ORIGIN_TYPE_FIELD_NUMBER
      See Also:
    • VIEWS_FIELD_NUMBER

      public static final int VIEWS_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getFileId

      public String getFileId()
       Output only. The ID of the file.
       
      string file_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFileId in interface FileMetadataOrBuilder
      Returns:
      The fileId.
    • getFileIdBytes

      public com.google.protobuf.ByteString getFileIdBytes()
       Output only. The ID of the file.
       
      string file_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFileIdBytes in interface FileMetadataOrBuilder
      Returns:
      The bytes for fileId.
    • getName

      public String getName()
       Output only. The name of the file uploaded.
       
      string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface FileMetadataOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. The name of the file uploaded.
       
      string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface FileMetadataOrBuilder
      Returns:
      The bytes for name.
    • 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;
      Specified by:
      getMimeType in interface FileMetadataOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       The content type of the file, see
       https://www.iana.org/assignments/media-types/media-types.xhtml.
       
      string mime_type = 3;
      Specified by:
      getMimeTypeBytes in interface FileMetadataOrBuilder
      Returns:
      The bytes for mimeType.
    • getByteSize

      public long getByteSize()
       Output only. The size of the context file in bytes.
       
      int64 byte_size = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getByteSize in interface FileMetadataOrBuilder
      Returns:
      The byteSize.
    • 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];
      Specified by:
      getOriginalUri in interface FileMetadataOrBuilder
      Returns:
      The originalUri.
    • getOriginalUriBytes

      public com.google.protobuf.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];
      Specified by:
      getOriginalUriBytes in interface FileMetadataOrBuilder
      Returns:
      The bytes for originalUri.
    • 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];
      Specified by:
      getOriginalSourceTypeValue in interface FileMetadataOrBuilder
      Returns:
      The enum numeric value on the wire for originalSourceType.
    • 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];
      Specified by:
      getOriginalSourceType in interface FileMetadataOrBuilder
      Returns:
      The originalSourceType.
    • 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];
      Specified by:
      hasUploadTime in interface FileMetadataOrBuilder
      Returns:
      Whether the uploadTime field is set.
    • getUploadTime

      public com.google.protobuf.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];
      Specified by:
      getUploadTime in interface FileMetadataOrBuilder
      Returns:
      The uploadTime.
    • getUploadTimeOrBuilder

      public com.google.protobuf.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];
      Specified by:
      getUploadTimeOrBuilder in interface FileMetadataOrBuilder
    • 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];
      Specified by:
      hasLastAddTime in interface FileMetadataOrBuilder
      Returns:
      Whether the lastAddTime field is set.
    • getLastAddTime

      public com.google.protobuf.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];
      Specified by:
      getLastAddTime in interface FileMetadataOrBuilder
      Returns:
      The lastAddTime.
    • getLastAddTimeOrBuilder

      public com.google.protobuf.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];
      Specified by:
      getLastAddTimeOrBuilder in interface FileMetadataOrBuilder
    • getMetadataCount

      public int getMetadataCount()
      Description copied from interface: FileMetadataOrBuilder
       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];
      Specified by:
      getMetadataCount in interface FileMetadataOrBuilder
    • containsMetadata

      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];
      Specified by:
      containsMetadata in interface FileMetadataOrBuilder
    • getMetadata

      @Deprecated public Map<String,String> getMetadata()
      Deprecated.
      Use getMetadataMap() instead.
      Specified by:
      getMetadata in interface FileMetadataOrBuilder
    • 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];
      Specified by:
      getMetadataMap in interface FileMetadataOrBuilder
    • getMetadataOrDefault

      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];
      Specified by:
      getMetadataOrDefault in interface FileMetadataOrBuilder
    • getMetadataOrThrow

      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];
      Specified by:
      getMetadataOrThrow in interface FileMetadataOrBuilder
    • getDownloadUri

      public String getDownloadUri()
       Output only. The
       [AssistantService.DownloadSessionFile][google.cloud.discoveryengine.v1alpha.AssistantService.DownloadSessionFile]
       URL to download the file. This URL will need the same credentials as
       [AssistantService.ListSessionFileMetadata][google.cloud.discoveryengine.v1alpha.AssistantService.ListSessionFileMetadata]
       method and will provide the resource.
       
      string download_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDownloadUri in interface FileMetadataOrBuilder
      Returns:
      The downloadUri.
    • getDownloadUriBytes

      public com.google.protobuf.ByteString getDownloadUriBytes()
       Output only. The
       [AssistantService.DownloadSessionFile][google.cloud.discoveryengine.v1alpha.AssistantService.DownloadSessionFile]
       URL to download the file. This URL will need the same credentials as
       [AssistantService.ListSessionFileMetadata][google.cloud.discoveryengine.v1alpha.AssistantService.ListSessionFileMetadata]
       method and will provide the resource.
       
      string download_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDownloadUriBytes in interface FileMetadataOrBuilder
      Returns:
      The bytes for downloadUri.
    • getFileOriginTypeValue

      public int getFileOriginTypeValue()
       Optional. The origin of the file.
       
      .google.cloud.discoveryengine.v1alpha.FileOriginType file_origin_type = 21 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFileOriginTypeValue in interface FileMetadataOrBuilder
      Returns:
      The enum numeric value on the wire for fileOriginType.
    • getFileOriginType

      public FileOriginType getFileOriginType()
       Optional. The origin of the file.
       
      .google.cloud.discoveryengine.v1alpha.FileOriginType file_origin_type = 21 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFileOriginType in interface FileMetadataOrBuilder
      Returns:
      The fileOriginType.
    • getViewsCount

      public int getViewsCount()
      Description copied from interface: FileMetadataOrBuilder
       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];
      Specified by:
      getViewsCount in interface FileMetadataOrBuilder
    • containsViews

      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];
      Specified by:
      containsViews in interface FileMetadataOrBuilder
    • getViews

      @Deprecated public Map<String,FileView> getViews()
      Deprecated.
      Use getViewsMap() instead.
      Specified by:
      getViews in interface FileMetadataOrBuilder
    • 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];
      Specified by:
      getViewsMap in interface FileMetadataOrBuilder
    • getViewsOrDefault

      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];
      Specified by:
      getViewsOrDefault in interface FileMetadataOrBuilder
    • getViewsOrThrow

      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];
      Specified by:
      getViewsOrThrow in interface FileMetadataOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static FileMetadata parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FileMetadata parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FileMetadata parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FileMetadata parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FileMetadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FileMetadata parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FileMetadata parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FileMetadata parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static FileMetadata parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static FileMetadata parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FileMetadata parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FileMetadata parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public FileMetadata.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static FileMetadata.Builder newBuilder()
    • newBuilder

      public static FileMetadata.Builder newBuilder(FileMetadata prototype)
    • toBuilder

      public FileMetadata.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected FileMetadata.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static FileMetadata getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<FileMetadata> parser()
    • getParserForType

      public com.google.protobuf.Parser<FileMetadata> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public FileMetadata getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder