Class FileInputSource.Builder (2.52.0)

public static final class FileInputSource.Builder extends GeneratedMessageV3.Builder<FileInputSource.Builder> implements FileInputSourceOrBuilder

An inlined file.

Protobuf type google.cloud.translation.v3.FileInputSource

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public FileInputSource build()
Returns
Type Description
FileInputSource

buildPartial()

public FileInputSource buildPartial()
Returns
Type Description
FileInputSource

clear()

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

clearContent()

public FileInputSource.Builder clearContent()

Required. The file's byte contents.

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

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

clearDisplayName()

public FileInputSource.Builder clearDisplayName()

Required. The file's display name.

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

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMimeType()

public FileInputSource.Builder clearMimeType()

Required. The file's mime type.

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

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getContent()

public ByteString getContent()

Required. The file's byte contents.

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

Returns
Type Description
ByteString

The content.

getDefaultInstanceForType()

public FileInputSource getDefaultInstanceForType()
Returns
Type Description
FileInputSource

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The file's display name.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The file's display name.

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

Returns
Type Description
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
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Required. The file's mime type.

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

Returns
Type Description
ByteString

The bytes for mimeType.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FileInputSource other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContent(ByteString value)

public FileInputSource.Builder setContent(ByteString value)

Required. The file's byte contents.

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

Parameter
Name Description
value ByteString

The content to set.

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

setDisplayName(String value)

public FileInputSource.Builder setDisplayName(String value)

Required. The file's display name.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public FileInputSource.Builder setDisplayNameBytes(ByteString value)

Required. The file's display name.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMimeType(String value)

public FileInputSource.Builder setMimeType(String value)

Required. The file's mime type.

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

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public FileInputSource.Builder setMimeTypeBytes(ByteString value)

Required. The file's mime type.

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

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
FileInputSource.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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