All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.datastore.v1.Key Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/datastore/v1/entity.proto

package com.google.datastore.v1;

/**
 * 
 * A unique identifier for an entity.
 * If a key's partition ID or any of its path kinds or names are
 * reserved/read-only, the key is reserved/read-only.
 * A reserved/read-only key is forbidden in certain documented contexts.
 * 
* * Protobuf type {@code google.datastore.v1.Key} */ public final class Key extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.datastore.v1.Key) KeyOrBuilder { // Use Key.newBuilder() to construct. private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Key() { path_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private Key( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { com.google.datastore.v1.PartitionId.Builder subBuilder = null; if (partitionId_ != null) { subBuilder = partitionId_.toBuilder(); } partitionId_ = input.readMessage(com.google.datastore.v1.PartitionId.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(partitionId_); partitionId_ = subBuilder.buildPartial(); } break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { path_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } path_.add( input.readMessage(com.google.datastore.v1.Key.PathElement.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { path_ = java.util.Collections.unmodifiableList(path_); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.datastore.v1.Key.class, com.google.datastore.v1.Key.Builder.class); } public interface PathElementOrBuilder extends // @@protoc_insertion_point(interface_extends:google.datastore.v1.Key.PathElement) com.google.protobuf.MessageOrBuilder { /** *
     * 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 `""`.
     * 
* * optional string kind = 1; */ java.lang.String getKind(); /** *
     * 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 `""`.
     * 
* * optional string kind = 1; */ com.google.protobuf.ByteString getKindBytes(); /** *
     * 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.
     * 
* * optional int64 id = 2; */ long getId(); /** *
     * 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 `""`.
     * 
* * optional string name = 3; */ java.lang.String getName(); /** *
     * 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 `""`.
     * 
* * optional string name = 3; */ com.google.protobuf.ByteString getNameBytes(); public com.google.datastore.v1.Key.PathElement.IdTypeCase getIdTypeCase(); } /** *
   * 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.
   * 
* * Protobuf type {@code google.datastore.v1.Key.PathElement} */ public static final class PathElement extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.datastore.v1.Key.PathElement) PathElementOrBuilder { // Use PathElement.newBuilder() to construct. private PathElement(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PathElement() { kind_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private PathElement( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); kind_ = s; break; } case 16: { idTypeCase_ = 2; idType_ = input.readInt64(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); idTypeCase_ = 3; idType_ = s; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_PathElement_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_PathElement_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.datastore.v1.Key.PathElement.class, com.google.datastore.v1.Key.PathElement.Builder.class); } private int idTypeCase_ = 0; private java.lang.Object idType_; public enum IdTypeCase implements com.google.protobuf.Internal.EnumLite { ID(2), NAME(3), IDTYPE_NOT_SET(0); private final int value; private IdTypeCase(int value) { this.value = value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static IdTypeCase valueOf(int value) { return forNumber(value); } public static IdTypeCase forNumber(int value) { switch (value) { case 2: return ID; case 3: return NAME; case 0: return IDTYPE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public IdTypeCase getIdTypeCase() { return IdTypeCase.forNumber( idTypeCase_); } public static final int KIND_FIELD_NUMBER = 1; private volatile java.lang.Object kind_; /** *
     * 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 `""`.
     * 
* * optional string kind = 1; */ public java.lang.String getKind() { java.lang.Object ref = kind_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); kind_ = s; return s; } } /** *
     * 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 `""`.
     * 
* * optional string kind = 1; */ public com.google.protobuf.ByteString getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); kind_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ID_FIELD_NUMBER = 2; /** *
     * 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.
     * 
* * optional int64 id = 2; */ public long getId() { if (idTypeCase_ == 2) { return (java.lang.Long) idType_; } return 0L; } public static final int NAME_FIELD_NUMBER = 3; /** *
     * 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 `""`.
     * 
* * optional string name = 3; */ public java.lang.String getName() { java.lang.Object ref = ""; if (idTypeCase_ == 3) { ref = idType_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (idTypeCase_ == 3) { idType_ = s; } return s; } } /** *
     * 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 `""`.
     * 
* * optional string name = 3; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = ""; if (idTypeCase_ == 3) { ref = idType_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (idTypeCase_ == 3) { idType_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getKindBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_); } if (idTypeCase_ == 2) { output.writeInt64( 2, (long)((java.lang.Long) idType_)); } if (idTypeCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idType_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKindBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_); } if (idTypeCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeInt64Size( 2, (long)((java.lang.Long) idType_)); } if (idTypeCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idType_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.Key.PathElement)) { return super.equals(obj); } com.google.datastore.v1.Key.PathElement other = (com.google.datastore.v1.Key.PathElement) obj; boolean result = true; result = result && getKind() .equals(other.getKind()); result = result && getIdTypeCase().equals( other.getIdTypeCase()); if (!result) return false; switch (idTypeCase_) { case 2: result = result && (getId() == other.getId()); break; case 3: result = result && getName() .equals(other.getName()); break; case 0: default: } return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); switch (idTypeCase_) { case 2: hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getId()); break; case 3: hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.datastore.v1.Key.PathElement parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.datastore.v1.Key.PathElement parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.datastore.v1.Key.PathElement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.datastore.v1.Key.PathElement parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.datastore.v1.Key.PathElement parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.datastore.v1.Key.PathElement parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.datastore.v1.Key.PathElement parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.datastore.v1.Key.PathElement parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.datastore.v1.Key.PathElement parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.datastore.v1.Key.PathElement parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.datastore.v1.Key.PathElement prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * 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.
     * 
* * Protobuf type {@code google.datastore.v1.Key.PathElement} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.datastore.v1.Key.PathElement) com.google.datastore.v1.Key.PathElementOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_PathElement_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_PathElement_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.datastore.v1.Key.PathElement.class, com.google.datastore.v1.Key.PathElement.Builder.class); } // Construct using com.google.datastore.v1.Key.PathElement.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); kind_ = ""; idTypeCase_ = 0; idType_ = null; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_PathElement_descriptor; } public com.google.datastore.v1.Key.PathElement getDefaultInstanceForType() { return com.google.datastore.v1.Key.PathElement.getDefaultInstance(); } public com.google.datastore.v1.Key.PathElement build() { com.google.datastore.v1.Key.PathElement result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.datastore.v1.Key.PathElement buildPartial() { com.google.datastore.v1.Key.PathElement result = new com.google.datastore.v1.Key.PathElement(this); result.kind_ = kind_; if (idTypeCase_ == 2) { result.idType_ = idType_; } if (idTypeCase_ == 3) { result.idType_ = idType_; } result.idTypeCase_ = idTypeCase_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.datastore.v1.Key.PathElement) { return mergeFrom((com.google.datastore.v1.Key.PathElement)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.datastore.v1.Key.PathElement other) { if (other == com.google.datastore.v1.Key.PathElement.getDefaultInstance()) return this; if (!other.getKind().isEmpty()) { kind_ = other.kind_; onChanged(); } switch (other.getIdTypeCase()) { case ID: { setId(other.getId()); break; } case NAME: { idTypeCase_ = 3; idType_ = other.idType_; onChanged(); break; } case IDTYPE_NOT_SET: { break; } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.datastore.v1.Key.PathElement parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.datastore.v1.Key.PathElement) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int idTypeCase_ = 0; private java.lang.Object idType_; public IdTypeCase getIdTypeCase() { return IdTypeCase.forNumber( idTypeCase_); } public Builder clearIdType() { idTypeCase_ = 0; idType_ = null; onChanged(); return this; } private java.lang.Object kind_ = ""; /** *
       * 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 `""`.
       * 
* * optional string kind = 1; */ public java.lang.String getKind() { java.lang.Object ref = kind_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); kind_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * 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 `""`.
       * 
* * optional string kind = 1; */ public com.google.protobuf.ByteString getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); kind_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * 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 `""`.
       * 
* * optional string kind = 1; */ public Builder setKind( java.lang.String value) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); return this; } /** *
       * 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 `""`.
       * 
* * optional string kind = 1; */ public Builder clearKind() { kind_ = getDefaultInstance().getKind(); onChanged(); return this; } /** *
       * 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 `""`.
       * 
* * optional string kind = 1; */ public Builder setKindBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); kind_ = value; onChanged(); return this; } /** *
       * 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.
       * 
* * optional int64 id = 2; */ public long getId() { if (idTypeCase_ == 2) { return (java.lang.Long) idType_; } return 0L; } /** *
       * 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.
       * 
* * optional int64 id = 2; */ public Builder setId(long value) { idTypeCase_ = 2; idType_ = value; onChanged(); return this; } /** *
       * 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.
       * 
* * optional int64 id = 2; */ public Builder clearId() { if (idTypeCase_ == 2) { idTypeCase_ = 0; idType_ = null; onChanged(); } return this; } /** *
       * 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 `""`.
       * 
* * optional string name = 3; */ public java.lang.String getName() { java.lang.Object ref = ""; if (idTypeCase_ == 3) { ref = idType_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (idTypeCase_ == 3) { idType_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
       * 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 `""`.
       * 
* * optional string name = 3; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = ""; if (idTypeCase_ == 3) { ref = idType_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (idTypeCase_ == 3) { idType_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * 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 `""`.
       * 
* * optional string name = 3; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } idTypeCase_ = 3; idType_ = value; onChanged(); return this; } /** *
       * 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 `""`.
       * 
* * optional string name = 3; */ public Builder clearName() { if (idTypeCase_ == 3) { idTypeCase_ = 0; idType_ = null; onChanged(); } return this; } /** *
       * 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 `""`.
       * 
* * optional string name = 3; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); idTypeCase_ = 3; idType_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:google.datastore.v1.Key.PathElement) } // @@protoc_insertion_point(class_scope:google.datastore.v1.Key.PathElement) private static final com.google.datastore.v1.Key.PathElement DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.datastore.v1.Key.PathElement(); } public static com.google.datastore.v1.Key.PathElement getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public PathElement parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PathElement(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.datastore.v1.Key.PathElement getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int PARTITION_ID_FIELD_NUMBER = 1; private com.google.datastore.v1.PartitionId partitionId_; /** *
   * Entities are partitioned into subsets, currently identified by a project
   * ID and namespace ID.
   * Queries are scoped to a single partition.
   * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public boolean hasPartitionId() { return partitionId_ != null; } /** *
   * Entities are partitioned into subsets, currently identified by a project
   * ID and namespace ID.
   * Queries are scoped to a single partition.
   * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public com.google.datastore.v1.PartitionId getPartitionId() { return partitionId_ == null ? com.google.datastore.v1.PartitionId.getDefaultInstance() : partitionId_; } /** *
   * Entities are partitioned into subsets, currently identified by a project
   * ID and namespace ID.
   * Queries are scoped to a single partition.
   * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public com.google.datastore.v1.PartitionIdOrBuilder getPartitionIdOrBuilder() { return getPartitionId(); } public static final int PATH_FIELD_NUMBER = 2; private java.util.List path_; /** *
   * The entity path.
   * An entity path consists of one or more elements composed of a kind and a
   * string or numerical identifier, which identify entities. The first
   * element identifies a _root entity_, the second element identifies
   * a _child_ of the root entity, the third element identifies a child of the
   * second entity, and so forth. The entities identified by all prefixes of
   * the path are called the element's _ancestors_.
   * An entity path is always fully complete: *all* of the entity's ancestors
   * are required to be in the path along with the entity identifier itself.
   * The only exception is that in some documented cases, the identifier in the
   * last path element (for the entity) itself may be omitted. For example,
   * the last path element of the key of `Mutation.insert` may have no
   * identifier.
   * A path can never be empty, and a path can have at most 100 elements.
   * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public java.util.List getPathList() { return path_; } /** *
   * The entity path.
   * An entity path consists of one or more elements composed of a kind and a
   * string or numerical identifier, which identify entities. The first
   * element identifies a _root entity_, the second element identifies
   * a _child_ of the root entity, the third element identifies a child of the
   * second entity, and so forth. The entities identified by all prefixes of
   * the path are called the element's _ancestors_.
   * An entity path is always fully complete: *all* of the entity's ancestors
   * are required to be in the path along with the entity identifier itself.
   * The only exception is that in some documented cases, the identifier in the
   * last path element (for the entity) itself may be omitted. For example,
   * the last path element of the key of `Mutation.insert` may have no
   * identifier.
   * A path can never be empty, and a path can have at most 100 elements.
   * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public java.util.List getPathOrBuilderList() { return path_; } /** *
   * The entity path.
   * An entity path consists of one or more elements composed of a kind and a
   * string or numerical identifier, which identify entities. The first
   * element identifies a _root entity_, the second element identifies
   * a _child_ of the root entity, the third element identifies a child of the
   * second entity, and so forth. The entities identified by all prefixes of
   * the path are called the element's _ancestors_.
   * An entity path is always fully complete: *all* of the entity's ancestors
   * are required to be in the path along with the entity identifier itself.
   * The only exception is that in some documented cases, the identifier in the
   * last path element (for the entity) itself may be omitted. For example,
   * the last path element of the key of `Mutation.insert` may have no
   * identifier.
   * A path can never be empty, and a path can have at most 100 elements.
   * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public int getPathCount() { return path_.size(); } /** *
   * The entity path.
   * An entity path consists of one or more elements composed of a kind and a
   * string or numerical identifier, which identify entities. The first
   * element identifies a _root entity_, the second element identifies
   * a _child_ of the root entity, the third element identifies a child of the
   * second entity, and so forth. The entities identified by all prefixes of
   * the path are called the element's _ancestors_.
   * An entity path is always fully complete: *all* of the entity's ancestors
   * are required to be in the path along with the entity identifier itself.
   * The only exception is that in some documented cases, the identifier in the
   * last path element (for the entity) itself may be omitted. For example,
   * the last path element of the key of `Mutation.insert` may have no
   * identifier.
   * A path can never be empty, and a path can have at most 100 elements.
   * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public com.google.datastore.v1.Key.PathElement getPath(int index) { return path_.get(index); } /** *
   * The entity path.
   * An entity path consists of one or more elements composed of a kind and a
   * string or numerical identifier, which identify entities. The first
   * element identifies a _root entity_, the second element identifies
   * a _child_ of the root entity, the third element identifies a child of the
   * second entity, and so forth. The entities identified by all prefixes of
   * the path are called the element's _ancestors_.
   * An entity path is always fully complete: *all* of the entity's ancestors
   * are required to be in the path along with the entity identifier itself.
   * The only exception is that in some documented cases, the identifier in the
   * last path element (for the entity) itself may be omitted. For example,
   * the last path element of the key of `Mutation.insert` may have no
   * identifier.
   * A path can never be empty, and a path can have at most 100 elements.
   * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public com.google.datastore.v1.Key.PathElementOrBuilder getPathOrBuilder( int index) { return path_.get(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (partitionId_ != null) { output.writeMessage(1, getPartitionId()); } for (int i = 0; i < path_.size(); i++) { output.writeMessage(2, path_.get(i)); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (partitionId_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getPartitionId()); } for (int i = 0; i < path_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, path_.get(i)); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.Key)) { return super.equals(obj); } com.google.datastore.v1.Key other = (com.google.datastore.v1.Key) obj; boolean result = true; result = result && (hasPartitionId() == other.hasPartitionId()); if (hasPartitionId()) { result = result && getPartitionId() .equals(other.getPartitionId()); } result = result && getPathList() .equals(other.getPathList()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasPartitionId()) { hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; hash = (53 * hash) + getPartitionId().hashCode(); } if (getPathCount() > 0) { hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPathList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.datastore.v1.Key parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.datastore.v1.Key parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.datastore.v1.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.datastore.v1.Key parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.datastore.v1.Key parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.datastore.v1.Key parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.datastore.v1.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.datastore.v1.Key parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.datastore.v1.Key parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.datastore.v1.Key parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.datastore.v1.Key prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A unique identifier for an entity.
   * If a key's partition ID or any of its path kinds or names are
   * reserved/read-only, the key is reserved/read-only.
   * A reserved/read-only key is forbidden in certain documented contexts.
   * 
* * Protobuf type {@code google.datastore.v1.Key} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.datastore.v1.Key) com.google.datastore.v1.KeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.datastore.v1.Key.class, com.google.datastore.v1.Key.Builder.class); } // Construct using com.google.datastore.v1.Key.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPathFieldBuilder(); } } public Builder clear() { super.clear(); if (partitionIdBuilder_ == null) { partitionId_ = null; } else { partitionId_ = null; partitionIdBuilder_ = null; } if (pathBuilder_ == null) { path_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { pathBuilder_.clear(); } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Key_descriptor; } public com.google.datastore.v1.Key getDefaultInstanceForType() { return com.google.datastore.v1.Key.getDefaultInstance(); } public com.google.datastore.v1.Key build() { com.google.datastore.v1.Key result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.datastore.v1.Key buildPartial() { com.google.datastore.v1.Key result = new com.google.datastore.v1.Key(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (partitionIdBuilder_ == null) { result.partitionId_ = partitionId_; } else { result.partitionId_ = partitionIdBuilder_.build(); } if (pathBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { path_ = java.util.Collections.unmodifiableList(path_); bitField0_ = (bitField0_ & ~0x00000002); } result.path_ = path_; } else { result.path_ = pathBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.datastore.v1.Key) { return mergeFrom((com.google.datastore.v1.Key)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.datastore.v1.Key other) { if (other == com.google.datastore.v1.Key.getDefaultInstance()) return this; if (other.hasPartitionId()) { mergePartitionId(other.getPartitionId()); } if (pathBuilder_ == null) { if (!other.path_.isEmpty()) { if (path_.isEmpty()) { path_ = other.path_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensurePathIsMutable(); path_.addAll(other.path_); } onChanged(); } } else { if (!other.path_.isEmpty()) { if (pathBuilder_.isEmpty()) { pathBuilder_.dispose(); pathBuilder_ = null; path_ = other.path_; bitField0_ = (bitField0_ & ~0x00000002); pathBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPathFieldBuilder() : null; } else { pathBuilder_.addAllMessages(other.path_); } } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.datastore.v1.Key parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.datastore.v1.Key) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.datastore.v1.PartitionId partitionId_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.datastore.v1.PartitionId, com.google.datastore.v1.PartitionId.Builder, com.google.datastore.v1.PartitionIdOrBuilder> partitionIdBuilder_; /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public boolean hasPartitionId() { return partitionIdBuilder_ != null || partitionId_ != null; } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public com.google.datastore.v1.PartitionId getPartitionId() { if (partitionIdBuilder_ == null) { return partitionId_ == null ? com.google.datastore.v1.PartitionId.getDefaultInstance() : partitionId_; } else { return partitionIdBuilder_.getMessage(); } } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public Builder setPartitionId(com.google.datastore.v1.PartitionId value) { if (partitionIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } partitionId_ = value; onChanged(); } else { partitionIdBuilder_.setMessage(value); } return this; } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public Builder setPartitionId( com.google.datastore.v1.PartitionId.Builder builderForValue) { if (partitionIdBuilder_ == null) { partitionId_ = builderForValue.build(); onChanged(); } else { partitionIdBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public Builder mergePartitionId(com.google.datastore.v1.PartitionId value) { if (partitionIdBuilder_ == null) { if (partitionId_ != null) { partitionId_ = com.google.datastore.v1.PartitionId.newBuilder(partitionId_).mergeFrom(value).buildPartial(); } else { partitionId_ = value; } onChanged(); } else { partitionIdBuilder_.mergeFrom(value); } return this; } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public Builder clearPartitionId() { if (partitionIdBuilder_ == null) { partitionId_ = null; onChanged(); } else { partitionId_ = null; partitionIdBuilder_ = null; } return this; } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public com.google.datastore.v1.PartitionId.Builder getPartitionIdBuilder() { onChanged(); return getPartitionIdFieldBuilder().getBuilder(); } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ public com.google.datastore.v1.PartitionIdOrBuilder getPartitionIdOrBuilder() { if (partitionIdBuilder_ != null) { return partitionIdBuilder_.getMessageOrBuilder(); } else { return partitionId_ == null ? com.google.datastore.v1.PartitionId.getDefaultInstance() : partitionId_; } } /** *
     * Entities are partitioned into subsets, currently identified by a project
     * ID and namespace ID.
     * Queries are scoped to a single partition.
     * 
* * optional .google.datastore.v1.PartitionId partition_id = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.datastore.v1.PartitionId, com.google.datastore.v1.PartitionId.Builder, com.google.datastore.v1.PartitionIdOrBuilder> getPartitionIdFieldBuilder() { if (partitionIdBuilder_ == null) { partitionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.datastore.v1.PartitionId, com.google.datastore.v1.PartitionId.Builder, com.google.datastore.v1.PartitionIdOrBuilder>( getPartitionId(), getParentForChildren(), isClean()); partitionId_ = null; } return partitionIdBuilder_; } private java.util.List path_ = java.util.Collections.emptyList(); private void ensurePathIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { path_ = new java.util.ArrayList(path_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.datastore.v1.Key.PathElement, com.google.datastore.v1.Key.PathElement.Builder, com.google.datastore.v1.Key.PathElementOrBuilder> pathBuilder_; /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public java.util.List getPathList() { if (pathBuilder_ == null) { return java.util.Collections.unmodifiableList(path_); } else { return pathBuilder_.getMessageList(); } } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public int getPathCount() { if (pathBuilder_ == null) { return path_.size(); } else { return pathBuilder_.getCount(); } } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public com.google.datastore.v1.Key.PathElement getPath(int index) { if (pathBuilder_ == null) { return path_.get(index); } else { return pathBuilder_.getMessage(index); } } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder setPath( int index, com.google.datastore.v1.Key.PathElement value) { if (pathBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePathIsMutable(); path_.set(index, value); onChanged(); } else { pathBuilder_.setMessage(index, value); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder setPath( int index, com.google.datastore.v1.Key.PathElement.Builder builderForValue) { if (pathBuilder_ == null) { ensurePathIsMutable(); path_.set(index, builderForValue.build()); onChanged(); } else { pathBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder addPath(com.google.datastore.v1.Key.PathElement value) { if (pathBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePathIsMutable(); path_.add(value); onChanged(); } else { pathBuilder_.addMessage(value); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder addPath( int index, com.google.datastore.v1.Key.PathElement value) { if (pathBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePathIsMutable(); path_.add(index, value); onChanged(); } else { pathBuilder_.addMessage(index, value); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder addPath( com.google.datastore.v1.Key.PathElement.Builder builderForValue) { if (pathBuilder_ == null) { ensurePathIsMutable(); path_.add(builderForValue.build()); onChanged(); } else { pathBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder addPath( int index, com.google.datastore.v1.Key.PathElement.Builder builderForValue) { if (pathBuilder_ == null) { ensurePathIsMutable(); path_.add(index, builderForValue.build()); onChanged(); } else { pathBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder addAllPath( java.lang.Iterable values) { if (pathBuilder_ == null) { ensurePathIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, path_); onChanged(); } else { pathBuilder_.addAllMessages(values); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder clearPath() { if (pathBuilder_ == null) { path_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { pathBuilder_.clear(); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public Builder removePath(int index) { if (pathBuilder_ == null) { ensurePathIsMutable(); path_.remove(index); onChanged(); } else { pathBuilder_.remove(index); } return this; } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public com.google.datastore.v1.Key.PathElement.Builder getPathBuilder( int index) { return getPathFieldBuilder().getBuilder(index); } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public com.google.datastore.v1.Key.PathElementOrBuilder getPathOrBuilder( int index) { if (pathBuilder_ == null) { return path_.get(index); } else { return pathBuilder_.getMessageOrBuilder(index); } } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public java.util.List getPathOrBuilderList() { if (pathBuilder_ != null) { return pathBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(path_); } } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public com.google.datastore.v1.Key.PathElement.Builder addPathBuilder() { return getPathFieldBuilder().addBuilder( com.google.datastore.v1.Key.PathElement.getDefaultInstance()); } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public com.google.datastore.v1.Key.PathElement.Builder addPathBuilder( int index) { return getPathFieldBuilder().addBuilder( index, com.google.datastore.v1.Key.PathElement.getDefaultInstance()); } /** *
     * The entity path.
     * An entity path consists of one or more elements composed of a kind and a
     * string or numerical identifier, which identify entities. The first
     * element identifies a _root entity_, the second element identifies
     * a _child_ of the root entity, the third element identifies a child of the
     * second entity, and so forth. The entities identified by all prefixes of
     * the path are called the element's _ancestors_.
     * An entity path is always fully complete: *all* of the entity's ancestors
     * are required to be in the path along with the entity identifier itself.
     * The only exception is that in some documented cases, the identifier in the
     * last path element (for the entity) itself may be omitted. For example,
     * the last path element of the key of `Mutation.insert` may have no
     * identifier.
     * A path can never be empty, and a path can have at most 100 elements.
     * 
* * repeated .google.datastore.v1.Key.PathElement path = 2; */ public java.util.List getPathBuilderList() { return getPathFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.datastore.v1.Key.PathElement, com.google.datastore.v1.Key.PathElement.Builder, com.google.datastore.v1.Key.PathElementOrBuilder> getPathFieldBuilder() { if (pathBuilder_ == null) { pathBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.datastore.v1.Key.PathElement, com.google.datastore.v1.Key.PathElement.Builder, com.google.datastore.v1.Key.PathElementOrBuilder>( path_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); path_ = null; } return pathBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:google.datastore.v1.Key) } // @@protoc_insertion_point(class_scope:google.datastore.v1.Key) private static final com.google.datastore.v1.Key DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.datastore.v1.Key(); } public static com.google.datastore.v1.Key getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Key parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Key(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.datastore.v1.Key getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy