input.readMessage(com.google.spanner.v1.StructType.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(structType_); structType_ = subBuilder.buildPartial();
bitField0_ = (bitField0_ & ~0x00000001); } else { ensureFieldsIsMutable(); fields_.addAll(other.fields_); onChanged(); fieldsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFieldsFieldBuilder() : null; } else { this.mergeUnknownFields(other.unknownFields); onChanged(); return this;
private com.google.protobuf.RepeatedFieldBuilderV3< com.google.spanner.v1.StructType.Field, com.google.spanner.v1.StructType.Field.Builder, com.google.spanner.v1.StructType.FieldOrBuilder> getFieldsFieldBuilder() { if (fieldsBuilder_ == null) { fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.spanner.v1.StructType.Field, com.google.spanner.v1.StructType.Field.Builder, com.google.spanner.v1.StructType.FieldOrBuilder>( fields_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); fields_ = null; } return fieldsBuilder_; }
com.google.spanner.v1.Type toProto() { com.google.spanner.v1.Type.Builder proto = com.google.spanner.v1.Type.newBuilder(); proto.setCode(code.protoCode()); if (code == Code.ARRAY) { proto.setArrayElementType(arrayElementType.toProto()); } else if (code == Code.STRUCT) { com.google.spanner.v1.StructType.Builder fields = proto.getStructTypeBuilder(); for (StructField field : structFields) { fields.addFieldsBuilder().setName(field.getName()).setType(field.getType().toProto()); } } return proto.build(); }
input.readMessage(com.google.spanner.v1.StructType.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(rowType_); rowType_ = subBuilder.buildPartial();
/** * * * <pre> * Indicates the field names and types for the rows in the result * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * "fields": [ * { "name": "UserId", "type": { "code": "INT64" } }, * { "name": "UserName", "type": { "code": "STRING" } }, * ] * </pre> * * <code>.google.spanner.v1.StructType row_type = 1;</code> */ public Builder mergeRowType(com.google.spanner.v1.StructType value) { if (rowTypeBuilder_ == null) { if (rowType_ != null) { rowType_ = com.google.spanner.v1.StructType.newBuilder(rowType_).mergeFrom(value).buildPartial(); } else { rowType_ = value; } onChanged(); } else { rowTypeBuilder_.mergeFrom(value); } 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 Builder addFields(int index, com.google.spanner.v1.StructType.Field value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(index, value); onChanged(); } else { fieldsBuilder_.addMessage(index, value); } 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 Builder addFields(com.google.spanner.v1.StructType.Field value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(value); onChanged(); } else { fieldsBuilder_.addMessage(value); } 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 Builder addAllFields( java.lang.Iterable<? extends com.google.spanner.v1.StructType.Field> values) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); onChanged(); } else { fieldsBuilder_.addAllMessages(values); } 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 Builder addFields( int index, com.google.spanner.v1.StructType.Field.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(index, builderForValue.build()); } 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 Builder setFields( int index, com.google.spanner.v1.StructType.Field.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.set(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.setMessage(index, builderForValue.build()); } 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 Builder removeFields(int index) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.remove(index); onChanged(); } else { fieldsBuilder_.remove(index); } return this; } /**
/** * * * <pre> * Indicates the field names and types for the rows in the result * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * "fields": [ * { "name": "UserId", "type": { "code": "INT64" } }, * { "name": "UserName", "type": { "code": "STRING" } }, * ] * </pre> * * <code>.google.spanner.v1.StructType row_type = 1;</code> */ public Builder setRowType(com.google.spanner.v1.StructType.Builder builderForValue) { if (rowTypeBuilder_ == null) { rowType_ = builderForValue.build(); onChanged(); } else { rowTypeBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` * provides type information for the struct's fields. * </pre> * * <code>.google.spanner.v1.StructType struct_type = 3;</code> */ public Builder mergeStructType(com.google.spanner.v1.StructType value) { if (structTypeBuilder_ == null) { if (structType_ != null) { structType_ = com.google.spanner.v1.StructType.newBuilder(structType_) .mergeFrom(value) .buildPartial(); } else { structType_ = value; } onChanged(); } else { structTypeBuilder_.mergeFrom(value); } 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 Builder setFields(int index, com.google.spanner.v1.StructType.Field value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.set(index, value); onChanged(); } else { fieldsBuilder_.setMessage(index, value); } 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 Builder addFields(com.google.spanner.v1.StructType.Field.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(builderForValue.build()); } 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(int index) { return getFieldsFieldBuilder() .addBuilder(index, com.google.spanner.v1.StructType.Field.getDefaultInstance()); } /**
/** * * * <pre> * If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` * provides type information for the struct's fields. * </pre> * * <code>.google.spanner.v1.StructType struct_type = 3;</code> */ public Builder setStructType(com.google.spanner.v1.StructType.Builder builderForValue) { if (structTypeBuilder_ == null) { structType_ = builderForValue.build(); onChanged(); } else { structTypeBuilder_.setMessage(builderForValue.build()); } 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()); } /**
/** * * * <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 getFieldsBuilder(int index) { return getFieldsFieldBuilder().getBuilder(index); } /**