Class FileInputSource (2.40.0)

public final class FileInputSource extends GeneratedMessageV3 implements FileInputSourceOrBuilder

An inlined file.

Protobuf type google.cloud.translation.v3.FileInputSource

Static Fields

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

MIME_TYPE_FIELD_NUMBER

public static final int MIME_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static FileInputSource getDefaultInstance()
Returns
TypeDescription
FileInputSource

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static FileInputSource.Builder newBuilder()
Returns
TypeDescription
FileInputSource.Builder

newBuilder(FileInputSource prototype)

public static FileInputSource.Builder newBuilder(FileInputSource prototype)
Parameter
NameDescription
prototypeFileInputSource
Returns
TypeDescription
FileInputSource.Builder

parseDelimitedFrom(InputStream input)

public static FileInputSource parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FileInputSource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static FileInputSource parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FileInputSource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FileInputSource parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FileInputSource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FileInputSource parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FileInputSource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static FileInputSource parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FileInputSource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static FileInputSource parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FileInputSource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FileInputSource
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<FileInputSource> parser()
Returns
TypeDescription
Parser<FileInputSource>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getContent()

public ByteString getContent()

Required. The file's byte contents.

bytes content = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The content.

getDefaultInstanceForType()

public FileInputSource getDefaultInstanceForType()
Returns
TypeDescription
FileInputSource

getDisplayName()

public String getDisplayName()

Required. The file's display name.

string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The file's display name.

string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for displayName.

getMimeType()

public String getMimeType()

Required. The file's mime type.

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Required. The file's mime type.

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for mimeType.

getParserForType()

public Parser<FileInputSource> getParserForType()
Returns
TypeDescription
Parser<FileInputSource>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public FileInputSource.Builder newBuilderForType()
Returns
TypeDescription
FileInputSource.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FileInputSource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
FileInputSource.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public FileInputSource.Builder toBuilder()
Returns
TypeDescription
FileInputSource.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException