/** * * * <pre> * Output only. The timestamp when the session is created. * </pre> * * <code>.google.protobuf.Timestamp create_time = 3;</code> */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); if (createTime_ != null) { output.writeMessage(3, getCreateTime()); } if (approximateLastUseTime_ != null) { output.writeMessage(4, getApproximateLastUseTime()); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__); } if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); } if (approximateLastUseTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getApproximateLastUseTime()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.spanner.v1.Session)) { return super.equals(obj); } com.google.spanner.v1.Session other = (com.google.spanner.v1.Session) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && (hasCreateTime() == other.hasCreateTime()); if (hasCreateTime()) { result = result && getCreateTime().equals(other.getCreateTime()); } result = result && (hasApproximateLastUseTime() == other.hasApproximateLastUseTime()); if (hasApproximateLastUseTime()) { result = result && getApproximateLastUseTime().equals(other.getApproximateLastUseTime()); } 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } if (hasApproximateLastUseTime()) { hash = (37 * hash) + APPROXIMATE_LAST_USE_TIME_FIELD_NUMBER; hash = (53 * hash) + getApproximateLastUseTime().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.spanner.v1.Session other) { if (other == com.google.spanner.v1.Session.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } if (other.hasApproximateLastUseTime()) { mergeApproximateLastUseTime(other.getApproximateLastUseTime()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }