@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.datastore.v1.CommitRequest buildPartial() { com.google.datastore.v1.CommitRequest result = new com.google.datastore.v1.CommitRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.projectId_ = projectId_; result.mode_ = mode_; if (transactionSelectorCase_ == 1) { result.transactionSelector_ = transactionSelector_; } if (mutationsBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008)) { mutations_ = java.util.Collections.unmodifiableList(mutations_); bitField0_ = (bitField0_ & ~0x00000008); } result.mutations_ = mutations_; } else { result.mutations_ = mutationsBuilder_.build(); } result.bitField0_ = to_bitField0_; result.transactionSelectorCase_ = transactionSelectorCase_; onBuilt(); return result; }
public Builder mergeFrom(com.google.datastore.v1.CommitRequest other) { if (other == com.google.datastore.v1.CommitRequest.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged(); setModeValue(other.getModeValue()); switch (other.getTransactionSelectorCase()) { case TRANSACTION: setTransaction(other.getTransaction()); break;
/** * * * <pre> * The ID of the project against which to make the request. * </pre> * * <code>string project_id = 8;</code> */ public Builder clearProjectId() { projectId_ = getDefaultInstance().getProjectId(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.CommitRequest)) { return super.equals(obj); } com.google.datastore.v1.CommitRequest other = (com.google.datastore.v1.CommitRequest) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && mode_ == other.mode_; result = result && getMutationsList().equals(other.getMutationsList()); result = result && getTransactionSelectorCase().equals(other.getTransactionSelectorCase()); if (!result) return false; switch (transactionSelectorCase_) { case 1: result = result && getTransaction().equals(other.getTransaction()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; if (getMutationsCount() > 0) { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } switch (transactionSelectorCase_) { case 1: hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; hash = (53 * hash) + getTransaction().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; if (getMutationsCount() > 0) { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } switch (transactionSelectorCase_) { case 1: hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; hash = (53 * hash) + getTransaction().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public com.google.datastore.v1.CommitRequest getDefaultInstanceForType() { return com.google.datastore.v1.CommitRequest.getDefaultInstance(); }
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.datastore.v1.CommitRequest.getDescriptor().getEnumTypes().get(0); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; if (getMutationsCount() > 0) { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } switch (transactionSelectorCase_) { case 1: hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; hash = (53 * hash) + getTransaction().hashCode(); break; case 0: default: } 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.CommitRequest)) { return super.equals(obj); } com.google.datastore.v1.CommitRequest other = (com.google.datastore.v1.CommitRequest) obj; boolean result = true; result = result && getProjectId().equals(other.getProjectId()); result = result && mode_ == other.mode_; result = result && getMutationsList().equals(other.getMutationsList()); result = result && getTransactionSelectorCase().equals(other.getTransactionSelectorCase()); if (!result) return false; switch (transactionSelectorCase_) { case 1: result = result && getTransaction().equals(other.getTransaction()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * <pre> * The ID of the project against which to make the request. * </pre> * * <code>optional string project_id = 8;</code> */ public Builder clearProjectId() { projectId_ = getDefaultInstance().getProjectId(); onChanged(); return this; } /**
@java.lang.Override public com.google.datastore.v1.CommitRequest getDefaultInstanceForType() { return com.google.datastore.v1.CommitRequest.getDefaultInstance(); }
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.datastore.v1.CommitRequest.getDescriptor().getEnumTypes().get(0); }
private com.google.datastore.v1.CommitResponse commitMutation( List<com.google.datastore.v1.Mutation> mutationsPb) { com.google.datastore.v1.CommitRequest.Builder requestPb = com.google.datastore.v1.CommitRequest.newBuilder(); requestPb.setMode(com.google.datastore.v1.CommitRequest.Mode.NON_TRANSACTIONAL); requestPb.addAllMutations(mutationsPb); return commit(requestPb.build()); }
public Builder mergeFrom(com.google.datastore.v1.CommitRequest other) { if (other == com.google.datastore.v1.CommitRequest.getDefaultInstance()) return this; if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; onChanged(); setModeValue(other.getModeValue()); switch (other.getTransactionSelectorCase()) { case TRANSACTION: { setTransaction(other.getTransaction()); break;
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.CommitRequest)) { return super.equals(obj); } com.google.datastore.v1.CommitRequest other = (com.google.datastore.v1.CommitRequest) obj; boolean result = true; result = result && getProjectId() .equals(other.getProjectId()); result = result && mode_ == other.mode_; result = result && getMutationsList() .equals(other.getMutationsList()); result = result && getTransactionSelectorCase().equals( other.getTransactionSelectorCase()); if (!result) return false; switch (transactionSelectorCase_) { case 1: result = result && getTransaction() .equals(other.getTransaction()); break; case 0: default: } return result; }
/** * * * <pre> * The ID of the project against which to make the request. * </pre> * * <code>string project_id = 8;</code> */ public Builder clearProjectId() { projectId_ = getDefaultInstance().getProjectId(); onChanged(); return this; } /**
public com.google.datastore.v1.CommitRequest getDefaultInstanceForType() { return com.google.datastore.v1.CommitRequest.getDefaultInstance(); }
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.datastore.v1.CommitRequest.getDescriptor().getEnumTypes().get(0); }