Struct BigtableByteString (2.1.0)

public struct BigtableByteString : IComparable, IComparable<BigtableByteString>, IEquatable<BigtableByteString>, IEnumerable<byte>, IEnumerable

A sequence of bytes which can be used for a row key, column qualifier, or cell value.

Namespace

Google.Cloud.Bigtable.Common.V2

Assembly

Google.Cloud.Bigtable.Common.V2.dll

Constructors

BigtableByteString(ByteString)

public BigtableByteString(ByteString value)

Creates a BigtableByteString value from a byte string.

Parameter
NameDescription
valueByteString

The byte string making up the value. May be null in which case the empty byte string is used.

BigtableByteString(Byte[])

public BigtableByteString(params byte[] value)

Creates a BigtableByteString value from an array of bytes.

Parameter
NameDescription
valueByte[]

The bytes making up the byte string. May be null in which case the empty byte string is used.

BigtableByteString(Int64)

public BigtableByteString(long value)

Creates a BigtableByteString value from the big-endian encoding of a signed 64-bit value.

Parameter
NameDescription
valueInt64

The 64-bit value which should be used to initialize the byte string.

BigtableByteString(String)

public BigtableByteString(string valueAsUtf8)

Creates a BigtableByteString value from the UTF-8 encoding of a string.

Parameter
NameDescription
valueAsUtf8String

The value whose UTF-8 representation should be used to initialize the byte string. May be null in which case the empty byte string is used.

Properties

IsEmpty

public bool IsEmpty { get; }

Returns true if the byte string is empty, false otherwise.

Property Value
TypeDescription
Boolean

Item[Int32]

public byte this[int index] { get; }

Returns the byte at index index.

Parameter
NameDescription
indexInt32

The index in the byte string to return. Must be greater than or equal to 0, and less than Length.

Property Value
TypeDescription
Byte

The byte at index index.

Length

public int Length { get; }

Gets the number of bytes in the byte string.

Property Value
TypeDescription
Int32

Value

public ByteString Value { get; }

Gets the underlying byte string.

Property Value
TypeDescription
ByteString

Methods

Compare(BigtableByteString, BigtableByteString)

public static int Compare(BigtableByteString x, BigtableByteString y)

Compares two BigtableByteString values lexicographically.

Parameters
NameDescription
xBigtableByteString

Left value to compare

yBigtableByteString

Right value to compare

Returns
TypeDescription
Int32

true if x is less than y; otherwise false.

CompareTo(BigtableByteString)

public int CompareTo(BigtableByteString other)
Parameter
NameDescription
otherBigtableByteString
Returns
TypeDescription
Int32

CompareTo(Object)

public int CompareTo(object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
Int32

GetEnumerator()

public IEnumerator<byte> GetEnumerator()
Returns
TypeDescription
IEnumerator<Byte>

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32
Overrides

ToString()

public override string ToString()
Returns
TypeDescription
String
Overrides

Operators

Equality(BigtableByteString, BigtableByteString)

public static bool operator ==(BigtableByteString x, BigtableByteString y)

Operator overload to compare two BigtableByteString values for equality.

Parameters
NameDescription
xBigtableByteString

Left value to compare

yBigtableByteString

Right value to compare

Returns
TypeDescription
Boolean

true if x is equal to y; otherwise false.

Explicit(BigtableByteString to ByteString)

public static explicit operator ByteString(BigtableByteString value)

Converts the BigtableByteString value to its underlying byte string.

Parameter
NameDescription
valueBigtableByteString

The BigtableByteString value to convert.

Returns
TypeDescription
ByteString

Explicit(BigtableByteString to Byte[])

public static explicit operator byte[](BigtableByteString value)

Converts the BigtableByteString value to its underlying byte array.

Parameter
NameDescription
valueBigtableByteString

The BigtableByteString value to convert.

Returns
TypeDescription
Byte[]

Explicit(BigtableByteString to Int64)

public static explicit operator long (BigtableByteString value)

Converts the BigtableByteString value to its a signed 64-bit value assuming it is big-endian encoded.

Parameter
NameDescription
valueBigtableByteString

The BigtableByteString value to convert.

Returns
TypeDescription
Int64

Explicit(BigtableByteString to String)

public static explicit operator string (BigtableByteString value)

Converts the BigtableByteString value to a string assuming it is UTF-8 encoded.

Parameter
NameDescription
valueBigtableByteString

The BigtableByteString value to convert.

Returns
TypeDescription
String

GreaterThan(BigtableByteString, BigtableByteString)

public static bool operator>(BigtableByteString x, BigtableByteString y)

Operator overload to compare two BigtableByteString values.

Parameters
NameDescription
xBigtableByteString

Left value to compare

yBigtableByteString

Right value to compare

Returns
TypeDescription
Boolean

true if x is greater than y; otherwise false.

GreaterThanOrEqual(BigtableByteString, BigtableByteString)

public static bool operator >=(BigtableByteString x, BigtableByteString y)

Operator overload to compare two BigtableByteString values.

Parameters
NameDescription
xBigtableByteString

Left value to compare

yBigtableByteString

Right value to compare

Returns
TypeDescription
Boolean

true if x is greater than or equal y; otherwise false.

Implicit(ByteString to BigtableByteString)

public static implicit operator BigtableByteString(ByteString value)

Converts a byte string to a BigtableByteString value.

Parameter
NameDescription
valueByteString

The byte string making up the value. May be null in which case the empty byte string is used.

Returns
TypeDescription
BigtableByteString

Implicit(Byte[] to BigtableByteString)

public static implicit operator BigtableByteString(byte[] value)

Converts a byte array to a BigtableByteString value.

Parameter
NameDescription
valueByte[]

The bytes making up the byte string. May be null in which case the empty byte string is used.

Returns
TypeDescription
BigtableByteString

Implicit(Int64 to BigtableByteString)

public static implicit operator BigtableByteString(long value)

Converts the big-endian encoding of a signed 64-bit value to a BigtableByteString value.

Parameter
NameDescription
valueInt64

The 64-bit value which should be used to initialize the byte string.

Returns
TypeDescription
BigtableByteString

Implicit(String to BigtableByteString)

public static implicit operator BigtableByteString(string valueAsUtf8)

Converts the UTF-8 encoding of a string to a BigtableByteString value.

Parameter
NameDescription
valueAsUtf8String

The value whose UTF-8 representation should be used to initialize the byte string. May be null in which case the empty byte string is used.

Returns
TypeDescription
BigtableByteString

Inequality(BigtableByteString, BigtableByteString)

public static bool operator !=(BigtableByteString x, BigtableByteString y)

Operator overload to compare two BigtableByteString values for inequality.

Parameters
NameDescription
xBigtableByteString

Left value to compare

yBigtableByteString

Right value to compare

Returns
TypeDescription
Boolean

true if x is not equal to y; otherwise false.

LessThan(BigtableByteString, BigtableByteString)

public static bool operator <(BigtableByteString x, BigtableByteString y)

Operator overload to compare two BigtableByteString values.

Parameters
NameDescription
xBigtableByteString

Left value to compare

yBigtableByteString

Right value to compare

Returns
TypeDescription
Boolean

true if x is less than y; otherwise false.

LessThanOrEqual(BigtableByteString, BigtableByteString)

public static bool operator <=(BigtableByteString x, BigtableByteString y)

Operator overload to compare two BigtableByteString values.

Parameters
NameDescription
xBigtableByteString

Left value to compare

yBigtableByteString

Right value to compare

Returns
TypeDescription
Boolean

true if x is less than or equal y; otherwise false.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

IEnumerator IEnumerable.GetEnumerator()
Returns
TypeDescription
IEnumerator