public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!payloadVisibility_.isEmpty()) { output.writeBytes(1, payloadVisibility_); } if (chaincodeId_ != null) { output.writeMessage(2, getChaincodeId()); } }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!payloadVisibility_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, payloadVisibility_); } if (chaincodeId_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getChaincodeId()); } memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + PAYLOAD_VISIBILITY_FIELD_NUMBER; hash = (53 * hash) + getPayloadVisibility().hashCode(); if (hasChaincodeId()) { hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER; hash = (53 * hash) + getChaincodeId().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); } }
@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.ChaincodeHeaderExtension)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension) obj; boolean result = true; result = result && getPayloadVisibility() .equals(other.getPayloadVisibility()); result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } 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.ChaincodeHeaderExtension)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension) obj; boolean result = true; result = result && getPayloadVisibility() .equals(other.getPayloadVisibility()); result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + PAYLOAD_VISIBILITY_FIELD_NUMBER; hash = (53 * hash) + getPayloadVisibility().hashCode(); if (hasChaincodeId()) { hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER; hash = (53 * hash) + getChaincodeId().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) + PAYLOAD_VISIBILITY_FIELD_NUMBER; hash = (53 * hash) + getPayloadVisibility().hashCode(); if (hasChaincodeId()) { hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER; hash = (53 * hash) + getChaincodeId().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!payloadVisibility_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, payloadVisibility_); } if (chaincodeId_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getChaincodeId()); } memoizedSize = size; return size; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!payloadVisibility_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, payloadVisibility_); } if (chaincodeId_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getChaincodeId()); } memoizedSize = size; return size; }
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension other) { if (other == org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension.getDefaultInstance()) return this; if (other.getPayloadVisibility() != com.google.protobuf.ByteString.EMPTY) { setPayloadVisibility(other.getPayloadVisibility()); } if (other.hasChaincodeId()) { mergeChaincodeId(other.getChaincodeId()); } onChanged(); return this; }
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() { return getChaincodeId(); }
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension other) { if (other == org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension.getDefaultInstance()) return this; if (other.getPayloadVisibility() != com.google.protobuf.ByteString.EMPTY) { setPayloadVisibility(other.getPayloadVisibility()); } if (other.hasChaincodeId()) { mergeChaincodeId(other.getChaincodeId()); } onChanged(); return this; }
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() { return getChaincodeId(); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!payloadVisibility_.isEmpty()) { output.writeBytes(1, payloadVisibility_); } if (chaincodeId_ != null) { output.writeMessage(2, getChaincodeId()); } }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!payloadVisibility_.isEmpty()) { output.writeBytes(1, payloadVisibility_); } if (chaincodeId_ != null) { output.writeMessage(2, getChaincodeId()); } }
@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.ChaincodeHeaderExtension)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension) obj; boolean result = true; result = result && getPayloadVisibility() .equals(other.getPayloadVisibility()); result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
/** * 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.ChaincodeHeaderExtension other) { if (other == org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension.getDefaultInstance()) return this; if (other.getPayloadVisibility() != com.google.protobuf.ByteString.EMPTY) { setPayloadVisibility(other.getPayloadVisibility()); } if (other.hasChaincodeId()) { mergeChaincodeId(other.getChaincodeId()); } onChanged(); return this; }
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() { return getChaincodeId(); }