.setHeader(header.toByteString()) .setPayload(payload.toByteString()) .build();
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.FabricProposal.Proposal parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.FabricProposal.Proposal) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * <pre> * The payload of the proposal as defined by the type in the proposal * header. * </pre> * * <code>optional bytes payload = 2;</code> */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } payload_ = value; onChanged(); return this; } /**
.setHeader(header.toByteString()) .setPayload(payload.toByteString()) .build();
.setHeader(header.toByteString()) .setPayload(payload.toByteString()) .build();
/** * <pre> * Optional extensions to the proposal. Its content depends on the Header's * type field. For the type CHAINCODE, it might be the bytes of a * ChaincodeAction message. * </pre> * * <code>optional bytes extension = 3;</code> */ public Builder setExtension(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } extension_ = value; onChanged(); return this; } /**
/** * <pre> * Optional extensions to the proposal. Its content depends on the Header's * type field. For the type CHAINCODE, it might be the bytes of a * ChaincodeAction message. * </pre> * * <code>optional bytes extension = 3;</code> */ public Builder setExtension(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } extension_ = value; onChanged(); return this; } /**
/** * <pre> * The payload of the proposal as defined by the type in the proposal * header. * </pre> * * <code>optional bytes payload = 2;</code> */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } payload_ = value; onChanged(); return this; } /**
/** * <pre> * The header of the proposal. It is the bytes of the Header * </pre> * * <code>optional bytes header = 1;</code> */ public Builder setHeader(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } header_ = value; onChanged(); return this; } /**
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.FabricProposal.Proposal parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.FabricProposal.Proposal) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * <pre> * The payload of the proposal as defined by the type in the proposal * header. * </pre> * * <code>optional bytes payload = 2;</code> */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } payload_ = value; onChanged(); return this; } /**
/** * <pre> * The header of the proposal. It is the bytes of the Header * </pre> * * <code>optional bytes header = 1;</code> */ public Builder setHeader(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } header_ = value; onChanged(); return this; } /**
/** * <pre> * Optional extensions to the proposal. Its content depends on the Header's * type field. For the type CHAINCODE, it might be the bytes of a * ChaincodeAction message. * </pre> * * <code>optional bytes extension = 3;</code> */ public Builder clearExtension() { extension_ = getDefaultInstance().getExtension(); onChanged(); return this; } public final Builder setUnknownFields(
/** * <pre> * Optional extensions to the proposal. Its content depends on the Header's * type field. For the type CHAINCODE, it might be the bytes of a * ChaincodeAction message. * </pre> * * <code>optional bytes extension = 3;</code> */ public Builder clearExtension() { extension_ = getDefaultInstance().getExtension(); onChanged(); return this; } public final Builder setUnknownFields(
private Builder() { maybeForceBuilderInitialization(); }
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricProposal.Proposal other) { if (other == org.hyperledger.fabric.protos.peer.FabricProposal.Proposal.getDefaultInstance()) return this; if (other.getHeader() != com.google.protobuf.ByteString.EMPTY) { setHeader(other.getHeader()); } if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { setPayload(other.getPayload()); } if (other.getExtension() != com.google.protobuf.ByteString.EMPTY) { setExtension(other.getExtension()); } onChanged(); return this; }
private Builder() { maybeForceBuilderInitialization(); }
/** * <pre> * The payload of the proposal as defined by the type in the proposal * header. * </pre> * * <code>optional bytes payload = 2;</code> */ public Builder clearPayload() { payload_ = getDefaultInstance().getPayload(); onChanged(); return this; }
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.FabricProposal.Proposal prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricProposal.Proposal other) { if (other == org.hyperledger.fabric.protos.peer.FabricProposal.Proposal.getDefaultInstance()) return this; if (other.getHeader() != com.google.protobuf.ByteString.EMPTY) { setHeader(other.getHeader()); } if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { setPayload(other.getPayload()); } if (other.getExtension() != com.google.protobuf.ByteString.EMPTY) { setExtension(other.getExtension()); } onChanged(); return this; }