@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 com.google.spanner.v1.StructType.Field buildPartial() { com.google.spanner.v1.StructType.Field result = new com.google.spanner.v1.StructType.Field(this); result.name_ = name_; if (typeBuilder_ == null) { result.type_ = type_; } else { result.type_ = typeBuilder_.build(); } onBuilt(); return result; }
/** * * * <pre> * The list of fields that make up this struct. Order is * significant, because values of this struct type are represented as * lists, where the order of field values matches the order of * fields in the [StructType][google.spanner.v1.StructType]. In turn, the order of fields * matches the order of columns in a read request, or the order of * fields in the `SELECT` clause of a query. * </pre> * * <code>repeated .google.spanner.v1.StructType.Field fields = 1;</code> */ public com.google.spanner.v1.StructType.Field.Builder addFieldsBuilder(int index) { return getFieldsFieldBuilder() .addBuilder(index, com.google.spanner.v1.StructType.Field.getDefaultInstance()); } /**
List<StructField> fields = new ArrayList<>(proto.getStructType().getFieldsCount()); for (com.google.spanner.v1.StructType.Field field : proto.getStructType().getFieldsList()) { 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())));
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
List<StructField> fields = new ArrayList<>(proto.getStructType().getFieldsCount()); for (com.google.spanner.v1.StructType.Field field : proto.getStructType().getFieldsList()) { 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; } /**
/** * * * <pre> * The list of fields that make up this struct. Order is * significant, because values of this struct type are represented as * lists, where the order of field values matches the order of * fields in the [StructType][google.spanner.v1.StructType]. In turn, the order of fields * matches the order of columns in a read request, or the order of * fields in the `SELECT` clause of a query. * </pre> * * <code>repeated .google.spanner.v1.StructType.Field fields = 1;</code> */ public com.google.spanner.v1.StructType.Field.Builder addFieldsBuilder() { return getFieldsFieldBuilder() .addBuilder(com.google.spanner.v1.StructType.Field.getDefaultInstance()); } /**
@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; }
@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_); } if (type_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
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; }
@java.lang.Override public com.google.spanner.v1.StructType.Field build() { com.google.spanner.v1.StructType.Field result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * * * <pre> * The type of the field. * </pre> * * <code>.google.spanner.v1.Type type = 2;</code> */ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { return getType(); }
@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_); } if (type_ != null) { output.writeMessage(2, getType()); } unknownFields.writeTo(output); }
@java.lang.Override public com.google.spanner.v1.StructType.Field getDefaultInstanceForType() { return com.google.spanner.v1.StructType.Field.getDefaultInstance(); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }