Class Id.Builder (0.3.0)

public static final class Id.Builder extends GeneratedMessage.Builder<Id.Builder> implements IdOrBuilder

Identifier to identify a UDM object like a UDM event, Entity, Collection. The full identifier for persistence is created by setting the 32 most significant bits as the Id.Namespace enum This is a convenience wrapper to define the id space enum values and provide an easy interface for RPCs, most persistence use cases should use a denormalized form.

Protobuf type google.backstory.Id

Implements

IdOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Id build()
Returns
Type Description
Id

buildPartial()

public Id buildPartial()
Returns
Type Description
Id

clear()

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

clearId()

public Id.Builder clearId()

Full raw ID.

bytes id = 2;

Returns
Type Description
Id.Builder

This builder for chaining.

clearNamespace()

public Id.Builder clearNamespace()

Namespace the id belongs to.

.google.backstory.Id.Namespace namespace = 1;

Returns
Type Description
Id.Builder

This builder for chaining.

clearStringId()

public Id.Builder clearStringId()

Some ids are stored as strings that are not able to be translated to bytes, so store these separately. Ex. detection id of the form de_aaaaaaaa-aaaa...

string string_id = 3;

Returns
Type Description
Id.Builder

This builder for chaining.

getDefaultInstanceForType()

public Id getDefaultInstanceForType()
Returns
Type Description
Id

getDescriptorForType()

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

getId()

public ByteString getId()

Full raw ID.

bytes id = 2;

Returns
Type Description
ByteString

The id.

getNamespace()

public Id.Namespace getNamespace()

Namespace the id belongs to.

.google.backstory.Id.Namespace namespace = 1;

Returns
Type Description
Id.Namespace

The namespace.

getNamespaceValue()

public int getNamespaceValue()

Namespace the id belongs to.

.google.backstory.Id.Namespace namespace = 1;

Returns
Type Description
int

The enum numeric value on the wire for namespace.

getStringId()

public String getStringId()

Some ids are stored as strings that are not able to be translated to bytes, so store these separately. Ex. detection id of the form de_aaaaaaaa-aaaa...

string string_id = 3;

Returns
Type Description
String

The stringId.

getStringIdBytes()

public ByteString getStringIdBytes()

Some ids are stored as strings that are not able to be translated to bytes, so store these separately. Ex. detection id of the form de_aaaaaaaa-aaaa...

string string_id = 3;

Returns
Type Description
ByteString

The bytes for stringId.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Id other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setId(ByteString value)

public Id.Builder setId(ByteString value)

Full raw ID.

bytes id = 2;

Parameter
Name Description
value ByteString

The id to set.

Returns
Type Description
Id.Builder

This builder for chaining.

setNamespace(Id.Namespace value)

public Id.Builder setNamespace(Id.Namespace value)

Namespace the id belongs to.

.google.backstory.Id.Namespace namespace = 1;

Parameter
Name Description
value Id.Namespace

The namespace to set.

Returns
Type Description
Id.Builder

This builder for chaining.

setNamespaceValue(int value)

public Id.Builder setNamespaceValue(int value)

Namespace the id belongs to.

.google.backstory.Id.Namespace namespace = 1;

Parameter
Name Description
value int

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

Returns
Type Description
Id.Builder

This builder for chaining.

setStringId(String value)

public Id.Builder setStringId(String value)

Some ids are stored as strings that are not able to be translated to bytes, so store these separately. Ex. detection id of the form de_aaaaaaaa-aaaa...

string string_id = 3;

Parameter
Name Description
value String

The stringId to set.

Returns
Type Description
Id.Builder

This builder for chaining.

setStringIdBytes(ByteString value)

public Id.Builder setStringIdBytes(ByteString value)

Some ids are stored as strings that are not able to be translated to bytes, so store these separately. Ex. detection id of the form de_aaaaaaaa-aaaa...

string string_id = 3;

Parameter
Name Description
value ByteString

The bytes for stringId to set.

Returns
Type Description
Id.Builder

This builder for chaining.