Struct BigtableByteString (3.0.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
Name Description
value ByteString

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
Name Description
value Byte[]

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
Name Description
value Int64

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
Name Description
valueAsUtf8 String

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 readonly bool IsEmpty { get; }

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

Property Value
Type Description
Boolean

Item[Int32]

public readonly byte this[int index] { get; }

Returns the byte at index index.

Parameter
Name Description
index Int32

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

Property Value
Type Description
Byte

The byte at index index.

Length

public readonly int Length { get; }

Gets the number of bytes in the byte string.

Property Value
Type Description
Int32

Value

public readonly ByteString Value { get; }

Gets the underlying byte string.

Property Value
Type Description
ByteString

Methods

Compare(BigtableByteString, BigtableByteString)

public static int Compare(BigtableByteString x, BigtableByteString y)

Compares two BigtableByteString values lexicographically.

Parameters
Name Description
x BigtableByteString

Left value to compare

y BigtableByteString

Right value to compare

Returns
Type Description
Int32

true if x is less than y; otherwise false.

CompareTo(BigtableByteString)

public int CompareTo(BigtableByteString other)
Parameter
Name Description
other BigtableByteString
Returns
Type Description
Int32

CompareTo(Object)

public int CompareTo(object obj)
Parameter
Name Description
obj Object
Returns
Type Description
Int32

GetEnumerator()

public IEnumerator<byte> GetEnumerator()
Returns
Type Description
IEnumerator<Byte>

GetHashCode()

public override int GetHashCode()
Returns
Type Description
Int32
Overrides

ToString()

public override string ToString()
Returns
Type Description
String
Overrides

Operators

Equality(BigtableByteString, BigtableByteString)

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

Operator overload to compare two BigtableByteString values for equality.

Parameters
Name Description
x BigtableByteString

Left value to compare

y BigtableByteString

Right value to compare

Returns
Type Description
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
Name Description
value BigtableByteString

The BigtableByteString value to convert.

Returns
Type Description
ByteString

Explicit(BigtableByteString to Byte[])

public static explicit operator byte[](BigtableByteString value)

Converts the BigtableByteString value to its underlying byte array.

Parameter
Name Description
value BigtableByteString

The BigtableByteString value to convert.

Returns
Type Description
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
Name Description
value BigtableByteString

The BigtableByteString value to convert.

Returns
Type Description
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
Name Description
value BigtableByteString

The BigtableByteString value to convert.

Returns
Type Description
String

GreaterThan(BigtableByteString, BigtableByteString)

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

Operator overload to compare two BigtableByteString values.

Parameters
Name Description
x BigtableByteString

Left value to compare

y BigtableByteString

Right value to compare

Returns
Type Description
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
Name Description
x BigtableByteString

Left value to compare

y BigtableByteString

Right value to compare

Returns
Type Description
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
Name Description
value ByteString

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

Returns
Type Description
BigtableByteString

Implicit(Byte[] to BigtableByteString)

public static implicit operator BigtableByteString(byte[] value)

Converts a byte array to a BigtableByteString value.

Parameter
Name Description
value Byte[]

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

Returns
Type Description
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
Name Description
value Int64

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

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

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
Type Description
BigtableByteString

Inequality(BigtableByteString, BigtableByteString)

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

Operator overload to compare two BigtableByteString values for inequality.

Parameters
Name Description
x BigtableByteString

Left value to compare

y BigtableByteString

Right value to compare

Returns
Type Description
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
Name Description
x BigtableByteString

Left value to compare

y BigtableByteString

Right value to compare

Returns
Type Description
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
Name Description
x BigtableByteString

Left value to compare

y BigtableByteString

Right value to compare

Returns
Type Description
Boolean

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

Explicit Interface Implementations

IEnumerable.GetEnumerator()

IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
IEnumerator