Class StorageError.Builder (3.20.0)

public static final class StorageError.Builder extends GeneratedMessage.Builder<StorageError.Builder> implements StorageErrorOrBuilder

Structured custom BigQuery Storage error message. The error can be attached as error details in the returned rpc Status. In particular, the use of error codes allows more structured error handling, and reduces the need to evaluate unstructured error text strings.

Protobuf type google.cloud.bigquery.storage.v1.StorageError

Static Methods

getDescriptor()

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

Methods

build()

public StorageError build()
Returns
Type Description
StorageError

buildPartial()

public StorageError buildPartial()
Returns
Type Description
StorageError

clear()

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

clearCode()

public StorageError.Builder clearCode()

BigQuery Storage specific error code.

.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1;

Returns
Type Description
StorageError.Builder

This builder for chaining.

clearEntity()

public StorageError.Builder clearEntity()

Name of the failed entity.

string entity = 2;

Returns
Type Description
StorageError.Builder

This builder for chaining.

clearErrorMessage()

public StorageError.Builder clearErrorMessage()

Message that describes the error.

string error_message = 3;

Returns
Type Description
StorageError.Builder

This builder for chaining.

getCode()

public StorageError.StorageErrorCode getCode()

BigQuery Storage specific error code.

.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1;

Returns
Type Description
StorageError.StorageErrorCode

The code.

getCodeValue()

public int getCodeValue()

BigQuery Storage specific error code.

.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1;

Returns
Type Description
int

The enum numeric value on the wire for code.

getDefaultInstanceForType()

public StorageError getDefaultInstanceForType()
Returns
Type Description
StorageError

getDescriptorForType()

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

getEntity()

public String getEntity()

Name of the failed entity.

string entity = 2;

Returns
Type Description
String

The entity.

getEntityBytes()

public ByteString getEntityBytes()

Name of the failed entity.

string entity = 2;

Returns
Type Description
ByteString

The bytes for entity.

getErrorMessage()

public String getErrorMessage()

Message that describes the error.

string error_message = 3;

Returns
Type Description
String

The errorMessage.

getErrorMessageBytes()

public ByteString getErrorMessageBytes()

Message that describes the error.

string error_message = 3;

Returns
Type Description
ByteString

The bytes for errorMessage.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StorageError other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setCode(StorageError.StorageErrorCode value)

public StorageError.Builder setCode(StorageError.StorageErrorCode value)

BigQuery Storage specific error code.

.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1;

Parameter
Name Description
value StorageError.StorageErrorCode

The code to set.

Returns
Type Description
StorageError.Builder

This builder for chaining.

setCodeValue(int value)

public StorageError.Builder setCodeValue(int value)

BigQuery Storage specific error code.

.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1;

Parameter
Name Description
value int

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

Returns
Type Description
StorageError.Builder

This builder for chaining.

setEntity(String value)

public StorageError.Builder setEntity(String value)

Name of the failed entity.

string entity = 2;

Parameter
Name Description
value String

The entity to set.

Returns
Type Description
StorageError.Builder

This builder for chaining.

setEntityBytes(ByteString value)

public StorageError.Builder setEntityBytes(ByteString value)

Name of the failed entity.

string entity = 2;

Parameter
Name Description
value ByteString

The bytes for entity to set.

Returns
Type Description
StorageError.Builder

This builder for chaining.

setErrorMessage(String value)

public StorageError.Builder setErrorMessage(String value)

Message that describes the error.

string error_message = 3;

Parameter
Name Description
value String

The errorMessage to set.

Returns
Type Description
StorageError.Builder

This builder for chaining.

setErrorMessageBytes(ByteString value)

public StorageError.Builder setErrorMessageBytes(ByteString value)

Message that describes the error.

string error_message = 3;

Parameter
Name Description
value ByteString

The bytes for errorMessage to set.

Returns
Type Description
StorageError.Builder

This builder for chaining.