@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + HEADER_FIELD_NUMBER; hash = (53 * hash) + getHeader().hashCode(); hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); hash = (37 * hash) + EXTENSION_FIELD_NUMBER; hash = (53 * hash) + getExtension().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
.build(); return FabricProposal.Proposal.newBuilder() .setHeader(header.toByteString()) .setPayload(payload.toByteString())
chaincodeProposalPayloadNoTransBuilder.mergeFrom(chaincodeProposal.getPayload()); chaincodeProposalPayloadNoTransBuilder.clearTransientMap(); Common.Header header = Common.Header.parseFrom(chaincodeProposal.getHeader());
chaincodeProposalPayloadNoTransBuilder.mergeFrom(chaincodeProposal.getPayload()); chaincodeProposalPayloadNoTransBuilder.clearTransientMap(); Common.Header header = Common.Header.parseFrom(chaincodeProposal.getHeader());
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
.build(); return FabricProposal.Proposal.newBuilder() .setHeader(header.toByteString()) .setPayload(payload.toByteString())
.build(); return FabricProposal.Proposal.newBuilder() .setHeader(header.toByteString()) .setPayload(payload.toByteString())
/** * Chaincode ID that was executed. * * @return See {@link ChaincodeID} * @throws InvalidArgumentException */ public ChaincodeID getChaincodeID() throws InvalidArgumentException { try { if (chaincodeID == null) { Header header = Header.parseFrom(proposal.getHeader()); Common.ChannelHeader channelHeader = Common.ChannelHeader.parseFrom(header.getChannelHeader()); ChaincodeHeaderExtension chaincodeHeaderExtension = ChaincodeHeaderExtension.parseFrom(channelHeader.getExtension()); chaincodeID = new ChaincodeID(chaincodeHeaderExtension.getChaincodeId()); } return chaincodeID; } catch (Exception e) { throw new InvalidArgumentException(e); } }
/** * Chaincode ID that was executed. * * @return See {@link ChaincodeID} * @throws InvalidArgumentException */ public ChaincodeID getChaincodeID() throws InvalidArgumentException { try { if (chaincodeID == null) { Header header = Header.parseFrom(proposal.getHeader()); Common.ChannelHeader channelHeader = Common.ChannelHeader.parseFrom(header.getChannelHeader()); ChaincodeHeaderExtension chaincodeHeaderExtension = ChaincodeHeaderExtension.parseFrom(channelHeader.getExtension()); chaincodeID = new ChaincodeID(chaincodeHeaderExtension.getChaincodeId()); } return chaincodeID; } catch (Exception e) { throw new InvalidArgumentException(e); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricProposal.Proposal)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.Proposal other = (org.hyperledger.fabric.protos.peer.FabricProposal.Proposal) obj; boolean result = true; result = result && getHeader() .equals(other.getHeader()); result = result && getPayload() .equals(other.getPayload()); result = result && getExtension() .equals(other.getExtension()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricProposal.Proposal)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.Proposal other = (org.hyperledger.fabric.protos.peer.FabricProposal.Proposal) obj; boolean result = true; result = result && getHeader() .equals(other.getHeader()); result = result && getPayload() .equals(other.getPayload()); result = result && getExtension() .equals(other.getExtension()); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + HEADER_FIELD_NUMBER; hash = (53 * hash) + getHeader().hashCode(); hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); hash = (37 * hash) + EXTENSION_FIELD_NUMBER; hash = (53 * hash) + getExtension().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + HEADER_FIELD_NUMBER; hash = (53 * hash) + getHeader().hashCode(); hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); hash = (37 * hash) + EXTENSION_FIELD_NUMBER; hash = (53 * hash) + getExtension().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
/** * <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(
public org.hyperledger.fabric.protos.peer.FabricProposal.Proposal getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.FabricProposal.Proposal.getDefaultInstance(); }
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; }