/** * <pre> * Additional custom properties associated with * the current cursor position * </pre> * * <code>repeated .LongProperty properties = 5;</code> */ public Builder addProperties( org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.add(builderForValue.build()); onChanged(); } else { propertiesBuilder_.addMessage(builderForValue.build()); } return this; } /**
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
/** * <pre> * Additional custom properties associated with * the current cursor position * </pre> * * <code>repeated .LongProperty properties = 5;</code> */ public Builder addProperties( int index, org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.add(index, builderForValue.build()); onChanged(); } else { propertiesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <pre> * Additional custom properties associated with * the current cursor position * </pre> * * <code>repeated .LongProperty properties = 4;</code> */ public Builder setProperties( int index, org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.set(index, builderForValue.build()); onChanged(); } else { propertiesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <pre> * Additional custom properties associated with * the current cursor position * </pre> * * <code>repeated .LongProperty properties = 5;</code> */ public Builder setProperties( int index, org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.set(index, builderForValue.build()); onChanged(); } else { propertiesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <pre> * Additional custom properties associated with * the current cursor position * </pre> * * <code>repeated .LongProperty properties = 4;</code> */ public Builder addProperties( int index, org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.add(index, builderForValue.build()); onChanged(); } else { propertiesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <pre> * Additional custom properties associated with * the current cursor position * </pre> * * <code>repeated .LongProperty properties = 4;</code> */ public Builder addProperties( org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.add(builderForValue.build()); onChanged(); } else { propertiesBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <pre> * Additional custom properties associated with * the current cursor position * </pre> * * <code>repeated .LongProperty properties = 5;</code> */ public Builder addProperties( org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.Builder builderForValue) { if (propertiesBuilder_ == null) { ensurePropertiesIsMutable(); properties_.add(builderForValue.build()); onChanged(); } else { propertiesBuilder_.addMessage(builderForValue.build()); } return this; } /**
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
public org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty buildPartial() { org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty result = new org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.name_ = name_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty other) { if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder(org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
public org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty build() { org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty) { return mergeFrom((org.apache.bookkeeper.mledger.proto.MLDataFormats.LongProperty)other); } else { super.mergeFrom(other); return this; } }
private List<LongProperty> buildPropertiesMap(Map<String, Long> properties) { if (properties.isEmpty()) { return Collections.emptyList(); } List<LongProperty> longProperties = Lists.newArrayList(); properties.forEach((name, value) -> { LongProperty lp = LongProperty.newBuilder().setName(name).setValue(value).build(); longProperties.add(lp); }); return longProperties; }