Class ImportContext.SqlCsvImportOptions.Builder (0.1.0)

public static final class ImportContext.SqlCsvImportOptions.Builder extends GeneratedMessage.Builder<ImportContext.SqlCsvImportOptions.Builder> implements ImportContext.SqlCsvImportOptionsOrBuilder

Protobuf type google.cloud.sql.v1beta4.ImportContext.SqlCsvImportOptions

Static Methods

getDescriptor()

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

Methods

addAllColumns(Iterable<String> values)

public ImportContext.SqlCsvImportOptions.Builder addAllColumns(Iterable<String> values)

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Parameter
Name Description
values Iterable<String>

The columns to add.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

addColumns(String value)

public ImportContext.SqlCsvImportOptions.Builder addColumns(String value)

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Parameter
Name Description
value String

The columns to add.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

addColumnsBytes(ByteString value)

public ImportContext.SqlCsvImportOptions.Builder addColumnsBytes(ByteString value)

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Parameter
Name Description
value ByteString

The bytes of the columns to add.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

build()

public ImportContext.SqlCsvImportOptions build()
Returns
Type Description
ImportContext.SqlCsvImportOptions

buildPartial()

public ImportContext.SqlCsvImportOptions buildPartial()
Returns
Type Description
ImportContext.SqlCsvImportOptions

clear()

public ImportContext.SqlCsvImportOptions.Builder clear()
Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder
Overrides

clearColumns()

public ImportContext.SqlCsvImportOptions.Builder clearColumns()

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

clearEscapeCharacter()

public ImportContext.SqlCsvImportOptions.Builder clearEscapeCharacter()

Specifies the character that should appear before a data character that needs to be escaped.

string escape_character = 4;

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

clearFieldsTerminatedBy()

public ImportContext.SqlCsvImportOptions.Builder clearFieldsTerminatedBy()

Specifies the character that separates columns within each row (line) of the file.

string fields_terminated_by = 6;

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

clearLinesTerminatedBy()

public ImportContext.SqlCsvImportOptions.Builder clearLinesTerminatedBy()

This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.

string lines_terminated_by = 8;

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

clearQuoteCharacter()

public ImportContext.SqlCsvImportOptions.Builder clearQuoteCharacter()

Specifies the quoting character to be used when a data value is quoted.

string quote_character = 5;

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

clearTable()

public ImportContext.SqlCsvImportOptions.Builder clearTable()

The table to which CSV data is imported.

string table = 1;

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

getColumns(int index)

public String getColumns(int index)

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The columns at the given index.

getColumnsBytes(int index)

public ByteString getColumnsBytes(int index)

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the columns at the given index.

getColumnsCount()

public int getColumnsCount()

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Returns
Type Description
int

The count of columns.

getColumnsList()

public ProtocolStringList getColumnsList()

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Returns
Type Description
ProtocolStringList

A list containing the columns.

getDefaultInstanceForType()

public ImportContext.SqlCsvImportOptions getDefaultInstanceForType()
Returns
Type Description
ImportContext.SqlCsvImportOptions

getDescriptorForType()

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

getEscapeCharacter()

public String getEscapeCharacter()

Specifies the character that should appear before a data character that needs to be escaped.

string escape_character = 4;

Returns
Type Description
String

The escapeCharacter.

getEscapeCharacterBytes()

public ByteString getEscapeCharacterBytes()

Specifies the character that should appear before a data character that needs to be escaped.

string escape_character = 4;

Returns
Type Description
ByteString

The bytes for escapeCharacter.

getFieldsTerminatedBy()

public String getFieldsTerminatedBy()

Specifies the character that separates columns within each row (line) of the file.

string fields_terminated_by = 6;

Returns
Type Description
String

The fieldsTerminatedBy.

getFieldsTerminatedByBytes()

public ByteString getFieldsTerminatedByBytes()

Specifies the character that separates columns within each row (line) of the file.

string fields_terminated_by = 6;

Returns
Type Description
ByteString

The bytes for fieldsTerminatedBy.

getLinesTerminatedBy()

public String getLinesTerminatedBy()

This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.

string lines_terminated_by = 8;

Returns
Type Description
String

The linesTerminatedBy.

getLinesTerminatedByBytes()

public ByteString getLinesTerminatedByBytes()

This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.

string lines_terminated_by = 8;

Returns
Type Description
ByteString

The bytes for linesTerminatedBy.

getQuoteCharacter()

public String getQuoteCharacter()

Specifies the quoting character to be used when a data value is quoted.

string quote_character = 5;

Returns
Type Description
String

The quoteCharacter.

getQuoteCharacterBytes()

public ByteString getQuoteCharacterBytes()

Specifies the quoting character to be used when a data value is quoted.

string quote_character = 5;

Returns
Type Description
ByteString

The bytes for quoteCharacter.

getTable()

public String getTable()

The table to which CSV data is imported.

string table = 1;

Returns
Type Description
String

The table.

getTableBytes()

public ByteString getTableBytes()

The table to which CSV data is imported.

string table = 1;

Returns
Type Description
ByteString

The bytes for table.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ImportContext.SqlCsvImportOptions other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setColumns(int index, String value)

public ImportContext.SqlCsvImportOptions.Builder setColumns(int index, String value)

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

repeated string columns = 2;

Parameters
Name Description
index int

The index to set the value at.

value String

The columns to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setEscapeCharacter(String value)

public ImportContext.SqlCsvImportOptions.Builder setEscapeCharacter(String value)

Specifies the character that should appear before a data character that needs to be escaped.

string escape_character = 4;

Parameter
Name Description
value String

The escapeCharacter to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setEscapeCharacterBytes(ByteString value)

public ImportContext.SqlCsvImportOptions.Builder setEscapeCharacterBytes(ByteString value)

Specifies the character that should appear before a data character that needs to be escaped.

string escape_character = 4;

Parameter
Name Description
value ByteString

The bytes for escapeCharacter to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setFieldsTerminatedBy(String value)

public ImportContext.SqlCsvImportOptions.Builder setFieldsTerminatedBy(String value)

Specifies the character that separates columns within each row (line) of the file.

string fields_terminated_by = 6;

Parameter
Name Description
value String

The fieldsTerminatedBy to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setFieldsTerminatedByBytes(ByteString value)

public ImportContext.SqlCsvImportOptions.Builder setFieldsTerminatedByBytes(ByteString value)

Specifies the character that separates columns within each row (line) of the file.

string fields_terminated_by = 6;

Parameter
Name Description
value ByteString

The bytes for fieldsTerminatedBy to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setLinesTerminatedBy(String value)

public ImportContext.SqlCsvImportOptions.Builder setLinesTerminatedBy(String value)

This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.

string lines_terminated_by = 8;

Parameter
Name Description
value String

The linesTerminatedBy to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setLinesTerminatedByBytes(ByteString value)

public ImportContext.SqlCsvImportOptions.Builder setLinesTerminatedByBytes(ByteString value)

This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.

string lines_terminated_by = 8;

Parameter
Name Description
value ByteString

The bytes for linesTerminatedBy to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setQuoteCharacter(String value)

public ImportContext.SqlCsvImportOptions.Builder setQuoteCharacter(String value)

Specifies the quoting character to be used when a data value is quoted.

string quote_character = 5;

Parameter
Name Description
value String

The quoteCharacter to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setQuoteCharacterBytes(ByteString value)

public ImportContext.SqlCsvImportOptions.Builder setQuoteCharacterBytes(ByteString value)

Specifies the quoting character to be used when a data value is quoted.

string quote_character = 5;

Parameter
Name Description
value ByteString

The bytes for quoteCharacter to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setTable(String value)

public ImportContext.SqlCsvImportOptions.Builder setTable(String value)

The table to which CSV data is imported.

string table = 1;

Parameter
Name Description
value String

The table to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.

setTableBytes(ByteString value)

public ImportContext.SqlCsvImportOptions.Builder setTableBytes(ByteString value)

The table to which CSV data is imported.

string table = 1;

Parameter
Name Description
value ByteString

The bytes for table to set.

Returns
Type Description
ImportContext.SqlCsvImportOptions.Builder

This builder for chaining.