/** * <code>repeated .ncstream.EnumTypedef.EnumType map = 2;</code> */ public Builder addMap( ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.add(builderForValue.build()); onChanged(); } else { mapBuilder_.addMessage(builderForValue.build()); } return this; } /**
static NcStreamProto.EnumTypedef.Builder encodeEnumTypedef(EnumTypedef enumType) throws IOException { NcStreamProto.EnumTypedef.Builder builder = NcStreamProto.EnumTypedef.newBuilder(); builder.setName(enumType.getShortName()); Map<Integer, String> map = enumType.getMap(); NcStreamProto.EnumTypedef.EnumType.Builder b2 = NcStreamProto.EnumTypedef.EnumType.newBuilder(); for (int code : map.keySet()) { b2.clear(); b2.setCode(code); b2.setValue(map.get(code)); builder.addMap(b2); } return builder; }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
public ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType buildPartial() { ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType result = new ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.code_ = code_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * <code>repeated .EnumTypedef.EnumType map = 2;</code> */ public Builder setMap( int index, ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.set(index, builderForValue.build()); onChanged(); } else { mapBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .ncstream.EnumTypedef.EnumType map = 2;</code> */ public Builder addMap( int index, ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.add(index, builderForValue.build()); onChanged(); } else { mapBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .ncstream.EnumTypedef.EnumType map = 2;</code> */ public Builder addMap( ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.add(builderForValue.build()); onChanged(); } else { mapBuilder_.addMessage(builderForValue.build()); } return this; } /**
public ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType buildPartial() { ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType result = new ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.code_ = code_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * <code>repeated .EnumTypedef.EnumType map = 2;</code> */ public Builder addMap( int index, ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.add(index, builderForValue.build()); onChanged(); } else { mapBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .ncstream.EnumTypedef.EnumType map = 2;</code> */ public Builder setMap( int index, ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.set(index, builderForValue.build()); onChanged(); } else { mapBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>optional string value = 2;</code> */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); value_ = value; onChanged(); return this; } public final Builder setUnknownFields(
private Builder() { maybeForceBuilderInitialization(); }
/** * <code>required string value = 2;</code> */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; value_ = value; onChanged(); return this; } /**
/** * <code>required string value = 2;</code> */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; value_ = value; onChanged(); return this; } /**
/** * <code>repeated .EnumTypedef.EnumType map = 2;</code> */ public Builder addMap( ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.add(builderForValue.build()); onChanged(); } else { mapBuilder_.addMessage(builderForValue.build()); } return this; } /**
private static Builder create() { return new Builder(); }
private static Builder create() { return new Builder(); }
/** * <code>repeated .ncstream.EnumTypedef.EnumType map = 2;</code> */ public Builder addMap( int index, ucar.nc2.stream.NcStreamProto.EnumTypedef.EnumType.Builder builderForValue) { if (mapBuilder_ == null) { ensureMapIsMutable(); map_.add(index, builderForValue.build()); onChanged(); } else { mapBuilder_.addMessage(index, builderForValue.build()); } return this; } /**