@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 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; }
Common.Header header = Common.Header.parseFrom(chaincodeProposal.getHeader());
Common.Header header = Common.Header.parseFrom(chaincodeProposal.getHeader());
Common.Header header = Common.Header.parseFrom(chaincodeProposal.getHeader());
/** * 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; }
/** * 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); } }
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; }
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; }
/** * <pre> * The header of the proposal. It is the bytes of the Header * </pre> * * <code>optional bytes header = 1;</code> */ public Builder clearHeader() { header_ = getDefaultInstance().getHeader(); 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 clearHeader() { header_ = getDefaultInstance().getHeader(); onChanged(); return this; }
/** * 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); } }
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; }
/** * <pre> * The header of the proposal. It is the bytes of the Header * </pre> * * <code>optional bytes header = 1;</code> */ public Builder clearHeader() { header_ = getDefaultInstance().getHeader(); onChanged(); return this; }