@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getKeysCount() > 0) { hash = (37 * hash) + KEYS_FIELD_NUMBER; hash = (53 * hash) + getKeysList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public com.google.datastore.v1.AllocateIdsResponse buildPartial() { com.google.datastore.v1.AllocateIdsResponse result = new com.google.datastore.v1.AllocateIdsResponse(this); int from_bitField0_ = bitField0_; if (keysBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { keys_ = java.util.Collections.unmodifiableList(keys_); bitField0_ = (bitField0_ & ~0x00000001); } result.keys_ = keys_; } else { result.keys_ = keysBuilder_.build(); } onBuilt(); return result; }
@java.lang.Override public com.google.datastore.v1.AllocateIdsResponse getDefaultInstanceForType() { return com.google.datastore.v1.AllocateIdsResponse.getDefaultInstance(); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getKeysCount() > 0) { hash = (37 * hash) + KEYS_FIELD_NUMBER; hash = (53 * hash) + getKeysList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.AllocateIdsResponse)) { return super.equals(obj); } com.google.datastore.v1.AllocateIdsResponse other = (com.google.datastore.v1.AllocateIdsResponse) obj; boolean result = true; result = result && getKeysList().equals(other.getKeysList()); result = result && unknownFields.equals(other.unknownFields); return result; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.datastore.v1.AllocateIdsResponse build() { com.google.datastore.v1.AllocateIdsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public AllocateIdsResponse allocateIds(AllocateIdsRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("allocateIds", request)) { return AllocateIdsResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("allocateIds", exception); } }
keys_ = java.util.Collections.unmodifiableList(keys_); makeExtensionsImmutable();
@Override public List<Key> allocateId(IncompleteKey... keys) { Preconditions.checkArgument( verifyIncompleteKeyType(keys), "keys must be IncompleteKey instances"); if (keys.length == 0) { return Collections.emptyList(); } com.google.datastore.v1.AllocateIdsRequest.Builder requestPb = com.google.datastore.v1.AllocateIdsRequest.newBuilder(); for (IncompleteKey key : keys) { requestPb.addKeys(trimNameOrId(key).toPb()); } com.google.datastore.v1.AllocateIdsResponse responsePb = allocateIds(requestPb.build()); ImmutableList.Builder<Key> keyList = ImmutableList.builder(); for (com.google.datastore.v1.Key keyPb : responsePb.getKeysList()) { keyList.add(Key.fromPb(keyPb)); } return keyList.build(); }
public static Builder newBuilder(com.google.datastore.v1.AllocateIdsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.datastore.v1.AllocateIdsResponse build() { com.google.datastore.v1.AllocateIdsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public AllocateIdsResponse allocateIds(AllocateIdsRequest request) throws DatastoreException { try (InputStream is = remoteRpc.call("allocateIds", request)) { return AllocateIdsResponse.parseFrom(is); } catch (IOException exception) { throw invalidResponseException("allocateIds", exception); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getKeysCount() > 0) { hash = (37 * hash) + KEYS_FIELD_NUMBER; hash = (53 * hash) + getKeysList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.AllocateIdsResponse)) { return super.equals(obj); } com.google.datastore.v1.AllocateIdsResponse other = (com.google.datastore.v1.AllocateIdsResponse) obj; boolean result = true; result = result && getKeysList() .equals(other.getKeysList()); return result; }
public Builder mergeFrom(com.google.datastore.v1.AllocateIdsResponse other) { if (other == com.google.datastore.v1.AllocateIdsResponse.getDefaultInstance()) return this; if (keysBuilder_ == null) { if (!other.keys_.isEmpty()) {