Google Cloud Datastore v1 API - Class Key.Types.PathElement (4.5.0)

public sealed class Key.Types.PathElement : IMessage<Key.Types.PathElement>, IEquatable<Key.Types.PathElement>, IDeepCloneable<Key.Types.PathElement>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Datastore v1 API class Key.Types.PathElement.

A (kind, ID/name) pair used to construct a key path.

If either name or ID is set, the element is complete. If neither is set, the element is incomplete.

Inheritance

object > Key.Types.PathElement

Namespace

GoogleCloudGoogle.Cloud.DatastoreV1

Assembly

Google.Cloud.Datastore.V1.dll

Constructors

PathElement()

public PathElement()

PathElement(PathElement)

public PathElement(Key.Types.PathElement other)
Parameter
NameDescription
otherKeyTypesPathElement

PathElement(string, long)

public PathElement(string kind, long id)

Creates a key path element with the given kind and ID.

Parameters
NameDescription
kindstring

The kind of path element to create. Must not be null.

idlong

The ID of the path element to create.

PathElement(string, string)

public PathElement(string kind, string name)

Creates a key path element with the given kind and name.

Parameters
NameDescription
kindstring

The kind of path element to create. Must not be null.

namestring

The name of the path element to create. Must not be null.

Properties

Id

public long Id { get; set; }

The auto-allocated ID of the entity.

Never equal to zero. Values less than zero are discouraged and may not be supported in the future.

Property Value
TypeDescription
long

IdTypeCase

public Key.Types.PathElement.IdTypeOneofCase IdTypeCase { get; }
Property Value
TypeDescription
KeyTypesPathElementIdTypeOneofCase

Kind

public string Kind { get; set; }

The kind of the entity.

A kind matching regex __.*__ is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be &quot;&quot;.

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as __bytes<X>__ where <X> is the base-64 encoding of the bytes.

Property Value
TypeDescription
string

Name

public string Name { get; set; }

The name of the entity.

A name matching regex __.*__ is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be &quot;&quot;.

Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are encoded as __bytes<X>__ where <X> is the base-64 encoding of the bytes.

Property Value
TypeDescription
string