@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 (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().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.spanner.v1.StructType.Field)) { return super.equals(obj); } com.google.spanner.v1.StructType.Field other = (com.google.spanner.v1.StructType.Field) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && (hasType() == other.hasType()); if (hasType()) { result = result && getType().equals(other.getType()); } result = result && unknownFields.equals(other.unknownFields); return result; }
checkArgument(field.hasType(), "Missing expected 'type' attribute in 'Field': %s", proto); String name = Strings.nullToEmpty(field.getName()); fields.add(StructField.of(name, fromProto(field.getType())));
checkArgument(field.hasType(), "Missing expected 'type' attribute in 'Field': %s", proto); String name = Strings.nullToEmpty(field.getName()); fields.add(StructField.of(name, fromProto(field.getType())));
/** * * * <pre> * The name of the field. For reads, this is the column name. For * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some * columns might have an empty name (e.g., !"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.spanner.v1.StructType.Field other) { if (other == com.google.spanner.v1.StructType.Field.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.hasType()) { mergeType(other.getType()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }