getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Header getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ChannelHeaderOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.ChannelHeader)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Header types 0-10000 are reserved and defined by HeaderType
- *
- *
- * optional int32 type = 1;
- */
- int getType();
-
- /**
- *
- * Version indicates message protocol version
- *
- *
- * optional int32 version = 2;
- */
- int getVersion();
-
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- boolean hasTimestamp();
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- com.google.protobuf.Timestamp getTimestamp();
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
-
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- java.lang.String getChannelId();
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- com.google.protobuf.ByteString
- getChannelIdBytes();
-
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- java.lang.String getTxId();
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- com.google.protobuf.ByteString
- getTxIdBytes();
-
- /**
- *
- * The epoch in which this header was generated, where epoch is defined based on block height
- * Epoch in which the response has been generated. This field identifies a
- * logical window of time. A proposal response is accepted by a peer only if
- * two conditions hold:
- * 1. the epoch specified in the message is the current epoch
- * 2. this message has been only seen once during this epoch (i.e. it hasn't
- * been replayed)
- *
- *
- * optional uint64 epoch = 6;
- */
- long getEpoch();
-
- /**
- *
- * Extension that may be attached based on the header type
- *
- *
- * optional bytes extension = 7;
- */
- com.google.protobuf.ByteString getExtension();
-
- /**
- *
- * If mutual TLS is employed, this represents
- * the hash of the client's TLS certificate
- *
- *
- * optional bytes tls_cert_hash = 8;
- */
- com.google.protobuf.ByteString getTlsCertHash();
- }
- /**
- *
- * Header is a generic replay prevention and identity message to include in a signed payload
- *
- *
- * Protobuf type {@code common.ChannelHeader}
- */
- public static final class ChannelHeader extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.ChannelHeader)
- ChannelHeaderOrBuilder {
- // Use ChannelHeader.newBuilder() to construct.
- private ChannelHeader(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChannelHeader() {
- type_ = 0;
- version_ = 0;
- channelId_ = "";
- txId_ = "";
- epoch_ = 0L;
- extension_ = com.google.protobuf.ByteString.EMPTY;
- tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChannelHeader(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- type_ = input.readInt32();
- break;
- }
- case 16: {
-
- version_ = input.readInt32();
- break;
- }
- case 26: {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (timestamp_ != null) {
- subBuilder = timestamp_.toBuilder();
- }
- timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(timestamp_);
- timestamp_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 34: {
- java.lang.String s = input.readStringRequireUtf8();
-
- channelId_ = s;
- break;
- }
- case 42: {
- java.lang.String s = input.readStringRequireUtf8();
-
- txId_ = s;
- break;
- }
- case 48: {
-
- epoch_ = input.readUInt64();
- break;
- }
- case 58: {
-
- extension_ = input.readBytes();
- break;
- }
- case 66: {
-
- tlsCertHash_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.ChannelHeader.class, org.hyperledger.fabric.protos.common.Common.ChannelHeader.Builder.class);
- }
-
- public static final int TYPE_FIELD_NUMBER = 1;
- private int type_;
- /**
- *
- * Header types 0-10000 are reserved and defined by HeaderType
- *
- *
- * optional int32 type = 1;
- */
- public int getType() {
- return type_;
- }
-
- public static final int VERSION_FIELD_NUMBER = 2;
- private int version_;
- /**
- *
- * Version indicates message protocol version
- *
- *
- * optional int32 version = 2;
- */
- public int getVersion() {
- return version_;
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 3;
- private com.google.protobuf.Timestamp timestamp_;
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public boolean hasTimestamp() {
- return timestamp_ != null;
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.Timestamp getTimestamp() {
- return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
- return getTimestamp();
- }
-
- public static final int CHANNEL_ID_FIELD_NUMBER = 4;
- private volatile java.lang.Object channelId_;
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- public java.lang.String getChannelId() {
- java.lang.Object ref = channelId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- channelId_ = s;
- return s;
- }
- }
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- public com.google.protobuf.ByteString
- getChannelIdBytes() {
- java.lang.Object ref = channelId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- channelId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int TX_ID_FIELD_NUMBER = 5;
- private volatile java.lang.Object txId_;
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- public java.lang.String getTxId() {
- java.lang.Object ref = txId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txId_ = s;
- return s;
- }
- }
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- public com.google.protobuf.ByteString
- getTxIdBytes() {
- java.lang.Object ref = txId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int EPOCH_FIELD_NUMBER = 6;
- private long epoch_;
- /**
- *
- * The epoch in which this header was generated, where epoch is defined based on block height
- * Epoch in which the response has been generated. This field identifies a
- * logical window of time. A proposal response is accepted by a peer only if
- * two conditions hold:
- * 1. the epoch specified in the message is the current epoch
- * 2. this message has been only seen once during this epoch (i.e. it hasn't
- * been replayed)
- *
- *
- * optional uint64 epoch = 6;
- */
- public long getEpoch() {
- return epoch_;
- }
-
- public static final int EXTENSION_FIELD_NUMBER = 7;
- private com.google.protobuf.ByteString extension_;
- /**
- *
- * Extension that may be attached based on the header type
- *
- *
- * optional bytes extension = 7;
- */
- public com.google.protobuf.ByteString getExtension() {
- return extension_;
- }
-
- public static final int TLS_CERT_HASH_FIELD_NUMBER = 8;
- private com.google.protobuf.ByteString tlsCertHash_;
- /**
- *
- * If mutual TLS is employed, this represents
- * the hash of the client's TLS certificate
- *
- *
- * optional bytes tls_cert_hash = 8;
- */
- public com.google.protobuf.ByteString getTlsCertHash() {
- return tlsCertHash_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (type_ != 0) {
- output.writeInt32(1, type_);
- }
- if (version_ != 0) {
- output.writeInt32(2, version_);
- }
- if (timestamp_ != null) {
- output.writeMessage(3, getTimestamp());
- }
- if (!getChannelIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, channelId_);
- }
- if (!getTxIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 5, txId_);
- }
- if (epoch_ != 0L) {
- output.writeUInt64(6, epoch_);
- }
- if (!extension_.isEmpty()) {
- output.writeBytes(7, extension_);
- }
- if (!tlsCertHash_.isEmpty()) {
- output.writeBytes(8, tlsCertHash_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (type_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, type_);
- }
- if (version_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(2, version_);
- }
- if (timestamp_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getTimestamp());
- }
- if (!getChannelIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, channelId_);
- }
- if (!getTxIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, txId_);
- }
- if (epoch_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(6, epoch_);
- }
- if (!extension_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(7, extension_);
- }
- if (!tlsCertHash_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(8, tlsCertHash_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.ChannelHeader)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.ChannelHeader other = (org.hyperledger.fabric.protos.common.Common.ChannelHeader) obj;
-
- boolean result = true;
- result = result && (getType()
- == other.getType());
- result = result && (getVersion()
- == other.getVersion());
- result = result && (hasTimestamp() == other.hasTimestamp());
- if (hasTimestamp()) {
- result = result && getTimestamp()
- .equals(other.getTimestamp());
- }
- result = result && getChannelId()
- .equals(other.getChannelId());
- result = result && getTxId()
- .equals(other.getTxId());
- result = result && (getEpoch()
- == other.getEpoch());
- result = result && getExtension()
- .equals(other.getExtension());
- result = result && getTlsCertHash()
- .equals(other.getTlsCertHash());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + getType();
- hash = (37 * hash) + VERSION_FIELD_NUMBER;
- hash = (53 * hash) + getVersion();
- if (hasTimestamp()) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + getTimestamp().hashCode();
- }
- hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER;
- hash = (53 * hash) + getChannelId().hashCode();
- hash = (37 * hash) + TX_ID_FIELD_NUMBER;
- hash = (53 * hash) + getTxId().hashCode();
- hash = (37 * hash) + EPOCH_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getEpoch());
- hash = (37 * hash) + EXTENSION_FIELD_NUMBER;
- hash = (53 * hash) + getExtension().hashCode();
- hash = (37 * hash) + TLS_CERT_HASH_FIELD_NUMBER;
- hash = (53 * hash) + getTlsCertHash().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.ChannelHeader prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Header is a generic replay prevention and identity message to include in a signed payload
- *
- *
- * Protobuf type {@code common.ChannelHeader}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.ChannelHeader)
- org.hyperledger.fabric.protos.common.Common.ChannelHeaderOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.ChannelHeader.class, org.hyperledger.fabric.protos.common.Common.ChannelHeader.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.ChannelHeader.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- type_ = 0;
-
- version_ = 0;
-
- if (timestampBuilder_ == null) {
- timestamp_ = null;
- } else {
- timestamp_ = null;
- timestampBuilder_ = null;
- }
- channelId_ = "";
-
- txId_ = "";
-
- epoch_ = 0L;
-
- extension_ = com.google.protobuf.ByteString.EMPTY;
-
- tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_ChannelHeader_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.ChannelHeader getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.ChannelHeader.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.ChannelHeader build() {
- org.hyperledger.fabric.protos.common.Common.ChannelHeader result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.ChannelHeader buildPartial() {
- org.hyperledger.fabric.protos.common.Common.ChannelHeader result = new org.hyperledger.fabric.protos.common.Common.ChannelHeader(this);
- result.type_ = type_;
- result.version_ = version_;
- if (timestampBuilder_ == null) {
- result.timestamp_ = timestamp_;
- } else {
- result.timestamp_ = timestampBuilder_.build();
- }
- result.channelId_ = channelId_;
- result.txId_ = txId_;
- result.epoch_ = epoch_;
- result.extension_ = extension_;
- result.tlsCertHash_ = tlsCertHash_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.ChannelHeader) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.ChannelHeader)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.ChannelHeader other) {
- if (other == org.hyperledger.fabric.protos.common.Common.ChannelHeader.getDefaultInstance()) return this;
- if (other.getType() != 0) {
- setType(other.getType());
- }
- if (other.getVersion() != 0) {
- setVersion(other.getVersion());
- }
- if (other.hasTimestamp()) {
- mergeTimestamp(other.getTimestamp());
- }
- if (!other.getChannelId().isEmpty()) {
- channelId_ = other.channelId_;
- onChanged();
- }
- if (!other.getTxId().isEmpty()) {
- txId_ = other.txId_;
- onChanged();
- }
- if (other.getEpoch() != 0L) {
- setEpoch(other.getEpoch());
- }
- if (other.getExtension() != com.google.protobuf.ByteString.EMPTY) {
- setExtension(other.getExtension());
- }
- if (other.getTlsCertHash() != com.google.protobuf.ByteString.EMPTY) {
- setTlsCertHash(other.getTlsCertHash());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.ChannelHeader parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.ChannelHeader) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int type_ ;
- /**
- *
- * Header types 0-10000 are reserved and defined by HeaderType
- *
- *
- * optional int32 type = 1;
- */
- public int getType() {
- return type_;
- }
- /**
- *
- * Header types 0-10000 are reserved and defined by HeaderType
- *
- *
- * optional int32 type = 1;
- */
- public Builder setType(int value) {
-
- type_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Header types 0-10000 are reserved and defined by HeaderType
- *
- *
- * optional int32 type = 1;
- */
- public Builder clearType() {
-
- type_ = 0;
- onChanged();
- return this;
- }
-
- private int version_ ;
- /**
- *
- * Version indicates message protocol version
- *
- *
- * optional int32 version = 2;
- */
- public int getVersion() {
- return version_;
- }
- /**
- *
- * Version indicates message protocol version
- *
- *
- * optional int32 version = 2;
- */
- public Builder setVersion(int value) {
-
- version_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Version indicates message protocol version
- *
- *
- * optional int32 version = 2;
- */
- public Builder clearVersion() {
-
- version_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Timestamp timestamp_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public boolean hasTimestamp() {
- return timestampBuilder_ != null || timestamp_ != null;
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.Timestamp getTimestamp() {
- if (timestampBuilder_ == null) {
- return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- } else {
- return timestampBuilder_.getMessage();
- }
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder setTimestamp(com.google.protobuf.Timestamp value) {
- if (timestampBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- timestamp_ = value;
- onChanged();
- } else {
- timestampBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder setTimestamp(
- com.google.protobuf.Timestamp.Builder builderForValue) {
- if (timestampBuilder_ == null) {
- timestamp_ = builderForValue.build();
- onChanged();
- } else {
- timestampBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
- if (timestampBuilder_ == null) {
- if (timestamp_ != null) {
- timestamp_ =
- com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
- } else {
- timestamp_ = value;
- }
- onChanged();
- } else {
- timestampBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder clearTimestamp() {
- if (timestampBuilder_ == null) {
- timestamp_ = null;
- onChanged();
- } else {
- timestamp_ = null;
- timestampBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
-
- onChanged();
- return getTimestampFieldBuilder().getBuilder();
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
- if (timestampBuilder_ != null) {
- return timestampBuilder_.getMessageOrBuilder();
- } else {
- return timestamp_ == null ?
- com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- }
- }
- /**
- *
- * Timestamp is the local time when the message was created
- * by the sender
- *
- *
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
- getTimestampFieldBuilder() {
- if (timestampBuilder_ == null) {
- timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
- getTimestamp(),
- getParentForChildren(),
- isClean());
- timestamp_ = null;
- }
- return timestampBuilder_;
- }
-
- private java.lang.Object channelId_ = "";
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- public java.lang.String getChannelId() {
- java.lang.Object ref = channelId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- channelId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- public com.google.protobuf.ByteString
- getChannelIdBytes() {
- java.lang.Object ref = channelId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- channelId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- public Builder setChannelId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- channelId_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- public Builder clearChannelId() {
-
- channelId_ = getDefaultInstance().getChannelId();
- onChanged();
- return this;
- }
- /**
- *
- * Identifier of the channel this message is bound for
- *
- *
- * optional string channel_id = 4;
- */
- public Builder setChannelIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- channelId_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object txId_ = "";
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- public java.lang.String getTxId() {
- java.lang.Object ref = txId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- public com.google.protobuf.ByteString
- getTxIdBytes() {
- java.lang.Object ref = txId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- public Builder setTxId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- txId_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- public Builder clearTxId() {
-
- txId_ = getDefaultInstance().getTxId();
- onChanged();
- return this;
- }
- /**
- *
- * An unique identifier that is used end-to-end.
- * - set by higher layers such as end user or SDK
- * - passed to the endorser (which will check for uniqueness)
- * - as the header is passed along unchanged, it will be
- * be retrieved by the committer (uniqueness check here as well)
- * - to be stored in the ledger
- *
- *
- * optional string tx_id = 5;
- */
- public Builder setTxIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- txId_ = value;
- onChanged();
- return this;
- }
-
- private long epoch_ ;
- /**
- *
- * The epoch in which this header was generated, where epoch is defined based on block height
- * Epoch in which the response has been generated. This field identifies a
- * logical window of time. A proposal response is accepted by a peer only if
- * two conditions hold:
- * 1. the epoch specified in the message is the current epoch
- * 2. this message has been only seen once during this epoch (i.e. it hasn't
- * been replayed)
- *
- *
- * optional uint64 epoch = 6;
- */
- public long getEpoch() {
- return epoch_;
- }
- /**
- *
- * The epoch in which this header was generated, where epoch is defined based on block height
- * Epoch in which the response has been generated. This field identifies a
- * logical window of time. A proposal response is accepted by a peer only if
- * two conditions hold:
- * 1. the epoch specified in the message is the current epoch
- * 2. this message has been only seen once during this epoch (i.e. it hasn't
- * been replayed)
- *
- *
- * optional uint64 epoch = 6;
- */
- public Builder setEpoch(long value) {
-
- epoch_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * The epoch in which this header was generated, where epoch is defined based on block height
- * Epoch in which the response has been generated. This field identifies a
- * logical window of time. A proposal response is accepted by a peer only if
- * two conditions hold:
- * 1. the epoch specified in the message is the current epoch
- * 2. this message has been only seen once during this epoch (i.e. it hasn't
- * been replayed)
- *
- *
- * optional uint64 epoch = 6;
- */
- public Builder clearEpoch() {
-
- epoch_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString extension_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * Extension that may be attached based on the header type
- *
- *
- * optional bytes extension = 7;
- */
- public com.google.protobuf.ByteString getExtension() {
- return extension_;
- }
- /**
- *
- * Extension that may be attached based on the header type
- *
- *
- * optional bytes extension = 7;
- */
- public Builder setExtension(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- extension_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Extension that may be attached based on the header type
- *
- *
- * optional bytes extension = 7;
- */
- public Builder clearExtension() {
-
- extension_ = getDefaultInstance().getExtension();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * If mutual TLS is employed, this represents
- * the hash of the client's TLS certificate
- *
- *
- * optional bytes tls_cert_hash = 8;
- */
- public com.google.protobuf.ByteString getTlsCertHash() {
- return tlsCertHash_;
- }
- /**
- *
- * If mutual TLS is employed, this represents
- * the hash of the client's TLS certificate
- *
- *
- * optional bytes tls_cert_hash = 8;
- */
- public Builder setTlsCertHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- tlsCertHash_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * If mutual TLS is employed, this represents
- * the hash of the client's TLS certificate
- *
- *
- * optional bytes tls_cert_hash = 8;
- */
- public Builder clearTlsCertHash() {
-
- tlsCertHash_ = getDefaultInstance().getTlsCertHash();
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.ChannelHeader)
- }
-
- // @@protoc_insertion_point(class_scope:common.ChannelHeader)
- private static final org.hyperledger.fabric.protos.common.Common.ChannelHeader DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.ChannelHeader();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.ChannelHeader getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChannelHeader parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChannelHeader(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.ChannelHeader getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface SignatureHeaderOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.SignatureHeader)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Creator of the message, a marshaled msp.SerializedIdentity
- *
- *
- * optional bytes creator = 1;
- */
- com.google.protobuf.ByteString getCreator();
-
- /**
- *
- * Arbitrary number that may only be used once. Can be used to detect replay attacks.
- *
- *
- * optional bytes nonce = 2;
- */
- com.google.protobuf.ByteString getNonce();
- }
- /**
- * Protobuf type {@code common.SignatureHeader}
- */
- public static final class SignatureHeader extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.SignatureHeader)
- SignatureHeaderOrBuilder {
- // Use SignatureHeader.newBuilder() to construct.
- private SignatureHeader(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private SignatureHeader() {
- creator_ = com.google.protobuf.ByteString.EMPTY;
- nonce_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private SignatureHeader(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
-
- creator_ = input.readBytes();
- break;
- }
- case 18: {
-
- nonce_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_SignatureHeader_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_SignatureHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.SignatureHeader.class, org.hyperledger.fabric.protos.common.Common.SignatureHeader.Builder.class);
- }
-
- public static final int CREATOR_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString creator_;
- /**
- *
- * Creator of the message, a marshaled msp.SerializedIdentity
- *
- *
- * optional bytes creator = 1;
- */
- public com.google.protobuf.ByteString getCreator() {
- return creator_;
- }
-
- public static final int NONCE_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString nonce_;
- /**
- *
- * Arbitrary number that may only be used once. Can be used to detect replay attacks.
- *
- *
- * optional bytes nonce = 2;
- */
- public com.google.protobuf.ByteString getNonce() {
- return nonce_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!creator_.isEmpty()) {
- output.writeBytes(1, creator_);
- }
- if (!nonce_.isEmpty()) {
- output.writeBytes(2, nonce_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!creator_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, creator_);
- }
- if (!nonce_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, nonce_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.SignatureHeader)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.SignatureHeader other = (org.hyperledger.fabric.protos.common.Common.SignatureHeader) obj;
-
- boolean result = true;
- result = result && getCreator()
- .equals(other.getCreator());
- result = result && getNonce()
- .equals(other.getNonce());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + CREATOR_FIELD_NUMBER;
- hash = (53 * hash) + getCreator().hashCode();
- hash = (37 * hash) + NONCE_FIELD_NUMBER;
- hash = (53 * hash) + getNonce().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.SignatureHeader prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code common.SignatureHeader}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.SignatureHeader)
- org.hyperledger.fabric.protos.common.Common.SignatureHeaderOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_SignatureHeader_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_SignatureHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.SignatureHeader.class, org.hyperledger.fabric.protos.common.Common.SignatureHeader.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.SignatureHeader.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- creator_ = com.google.protobuf.ByteString.EMPTY;
-
- nonce_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_SignatureHeader_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.SignatureHeader getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.SignatureHeader.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.SignatureHeader build() {
- org.hyperledger.fabric.protos.common.Common.SignatureHeader result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.SignatureHeader buildPartial() {
- org.hyperledger.fabric.protos.common.Common.SignatureHeader result = new org.hyperledger.fabric.protos.common.Common.SignatureHeader(this);
- result.creator_ = creator_;
- result.nonce_ = nonce_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.SignatureHeader) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.SignatureHeader)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.SignatureHeader other) {
- if (other == org.hyperledger.fabric.protos.common.Common.SignatureHeader.getDefaultInstance()) return this;
- if (other.getCreator() != com.google.protobuf.ByteString.EMPTY) {
- setCreator(other.getCreator());
- }
- if (other.getNonce() != com.google.protobuf.ByteString.EMPTY) {
- setNonce(other.getNonce());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.SignatureHeader parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.SignatureHeader) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private com.google.protobuf.ByteString creator_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * Creator of the message, a marshaled msp.SerializedIdentity
- *
- *
- * optional bytes creator = 1;
- */
- public com.google.protobuf.ByteString getCreator() {
- return creator_;
- }
- /**
- *
- * Creator of the message, a marshaled msp.SerializedIdentity
- *
- *
- * optional bytes creator = 1;
- */
- public Builder setCreator(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- creator_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Creator of the message, a marshaled msp.SerializedIdentity
- *
- *
- * optional bytes creator = 1;
- */
- public Builder clearCreator() {
-
- creator_ = getDefaultInstance().getCreator();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString nonce_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * Arbitrary number that may only be used once. Can be used to detect replay attacks.
- *
- *
- * optional bytes nonce = 2;
- */
- public com.google.protobuf.ByteString getNonce() {
- return nonce_;
- }
- /**
- *
- * Arbitrary number that may only be used once. Can be used to detect replay attacks.
- *
- *
- * optional bytes nonce = 2;
- */
- public Builder setNonce(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- nonce_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Arbitrary number that may only be used once. Can be used to detect replay attacks.
- *
- *
- * optional bytes nonce = 2;
- */
- public Builder clearNonce() {
-
- nonce_ = getDefaultInstance().getNonce();
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.SignatureHeader)
- }
-
- // @@protoc_insertion_point(class_scope:common.SignatureHeader)
- private static final org.hyperledger.fabric.protos.common.Common.SignatureHeader DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.SignatureHeader();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.SignatureHeader getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public SignatureHeader parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SignatureHeader(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.SignatureHeader getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface PayloadOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.Payload)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- boolean hasHeader();
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- org.hyperledger.fabric.protos.common.Common.Header getHeader();
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- org.hyperledger.fabric.protos.common.Common.HeaderOrBuilder getHeaderOrBuilder();
-
- /**
- *
- * Data, the encoding of which is defined by the type in the header
- *
- *
- * optional bytes data = 2;
- */
- com.google.protobuf.ByteString getData();
- }
- /**
- *
- * Payload is the message contents (and header to allow for signing)
- *
- *
- * Protobuf type {@code common.Payload}
- */
- public static final class Payload extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.Payload)
- PayloadOrBuilder {
- // Use Payload.newBuilder() to construct.
- private Payload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Payload() {
- data_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Payload(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- org.hyperledger.fabric.protos.common.Common.Header.Builder subBuilder = null;
- if (header_ != null) {
- subBuilder = header_.toBuilder();
- }
- header_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.Header.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(header_);
- header_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 18: {
-
- data_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Payload_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Payload_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.Payload.class, org.hyperledger.fabric.protos.common.Common.Payload.Builder.class);
- }
-
- public static final int HEADER_FIELD_NUMBER = 1;
- private org.hyperledger.fabric.protos.common.Common.Header header_;
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public boolean hasHeader() {
- return header_ != null;
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.Header getHeader() {
- return header_ == null ? org.hyperledger.fabric.protos.common.Common.Header.getDefaultInstance() : header_;
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.HeaderOrBuilder getHeaderOrBuilder() {
- return getHeader();
- }
-
- public static final int DATA_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString data_;
- /**
- *
- * Data, the encoding of which is defined by the type in the header
- *
- *
- * optional bytes data = 2;
- */
- public com.google.protobuf.ByteString getData() {
- return data_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (header_ != null) {
- output.writeMessage(1, getHeader());
- }
- if (!data_.isEmpty()) {
- output.writeBytes(2, data_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (header_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getHeader());
- }
- if (!data_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, data_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.Payload)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.Payload other = (org.hyperledger.fabric.protos.common.Common.Payload) obj;
-
- boolean result = true;
- result = result && (hasHeader() == other.hasHeader());
- if (hasHeader()) {
- result = result && getHeader()
- .equals(other.getHeader());
- }
- result = result && getData()
- .equals(other.getData());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (hasHeader()) {
- hash = (37 * hash) + HEADER_FIELD_NUMBER;
- hash = (53 * hash) + getHeader().hashCode();
- }
- hash = (37 * hash) + DATA_FIELD_NUMBER;
- hash = (53 * hash) + getData().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Payload parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.Payload prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Payload is the message contents (and header to allow for signing)
- *
- *
- * Protobuf type {@code common.Payload}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.Payload)
- org.hyperledger.fabric.protos.common.Common.PayloadOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Payload_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Payload_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.Payload.class, org.hyperledger.fabric.protos.common.Common.Payload.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.Payload.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- if (headerBuilder_ == null) {
- header_ = null;
- } else {
- header_ = null;
- headerBuilder_ = null;
- }
- data_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Payload_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Payload getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.Payload.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.Payload build() {
- org.hyperledger.fabric.protos.common.Common.Payload result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Payload buildPartial() {
- org.hyperledger.fabric.protos.common.Common.Payload result = new org.hyperledger.fabric.protos.common.Common.Payload(this);
- if (headerBuilder_ == null) {
- result.header_ = header_;
- } else {
- result.header_ = headerBuilder_.build();
- }
- result.data_ = data_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.Payload) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.Payload)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.Payload other) {
- if (other == org.hyperledger.fabric.protos.common.Common.Payload.getDefaultInstance()) return this;
- if (other.hasHeader()) {
- mergeHeader(other.getHeader());
- }
- if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
- setData(other.getData());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.Payload parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.Payload) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private org.hyperledger.fabric.protos.common.Common.Header header_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.Header, org.hyperledger.fabric.protos.common.Common.Header.Builder, org.hyperledger.fabric.protos.common.Common.HeaderOrBuilder> headerBuilder_;
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public boolean hasHeader() {
- return headerBuilder_ != null || header_ != null;
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.Header getHeader() {
- if (headerBuilder_ == null) {
- return header_ == null ? org.hyperledger.fabric.protos.common.Common.Header.getDefaultInstance() : header_;
- } else {
- return headerBuilder_.getMessage();
- }
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public Builder setHeader(org.hyperledger.fabric.protos.common.Common.Header value) {
- if (headerBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- header_ = value;
- onChanged();
- } else {
- headerBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public Builder setHeader(
- org.hyperledger.fabric.protos.common.Common.Header.Builder builderForValue) {
- if (headerBuilder_ == null) {
- header_ = builderForValue.build();
- onChanged();
- } else {
- headerBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public Builder mergeHeader(org.hyperledger.fabric.protos.common.Common.Header value) {
- if (headerBuilder_ == null) {
- if (header_ != null) {
- header_ =
- org.hyperledger.fabric.protos.common.Common.Header.newBuilder(header_).mergeFrom(value).buildPartial();
- } else {
- header_ = value;
- }
- onChanged();
- } else {
- headerBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public Builder clearHeader() {
- if (headerBuilder_ == null) {
- header_ = null;
- onChanged();
- } else {
- header_ = null;
- headerBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.Header.Builder getHeaderBuilder() {
-
- onChanged();
- return getHeaderFieldBuilder().getBuilder();
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.HeaderOrBuilder getHeaderOrBuilder() {
- if (headerBuilder_ != null) {
- return headerBuilder_.getMessageOrBuilder();
- } else {
- return header_ == null ?
- org.hyperledger.fabric.protos.common.Common.Header.getDefaultInstance() : header_;
- }
- }
- /**
- *
- * Header is included to provide identity and prevent replay
- *
- *
- * optional .common.Header header = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.Header, org.hyperledger.fabric.protos.common.Common.Header.Builder, org.hyperledger.fabric.protos.common.Common.HeaderOrBuilder>
- getHeaderFieldBuilder() {
- if (headerBuilder_ == null) {
- headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.Header, org.hyperledger.fabric.protos.common.Common.Header.Builder, org.hyperledger.fabric.protos.common.Common.HeaderOrBuilder>(
- getHeader(),
- getParentForChildren(),
- isClean());
- header_ = null;
- }
- return headerBuilder_;
- }
-
- private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * Data, the encoding of which is defined by the type in the header
- *
- *
- * optional bytes data = 2;
- */
- public com.google.protobuf.ByteString getData() {
- return data_;
- }
- /**
- *
- * Data, the encoding of which is defined by the type in the header
- *
- *
- * optional bytes data = 2;
- */
- public Builder setData(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- data_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Data, the encoding of which is defined by the type in the header
- *
- *
- * optional bytes data = 2;
- */
- public Builder clearData() {
-
- data_ = getDefaultInstance().getData();
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.Payload)
- }
-
- // @@protoc_insertion_point(class_scope:common.Payload)
- private static final org.hyperledger.fabric.protos.common.Common.Payload DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.Payload();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.Payload getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public Payload parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Payload(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Payload getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface EnvelopeOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.Envelope)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * A marshaled Payload
- *
- *
- * optional bytes payload = 1;
- */
- com.google.protobuf.ByteString getPayload();
-
- /**
- *
- * A signature by the creator specified in the Payload header
- *
- *
- * optional bytes signature = 2;
- */
- com.google.protobuf.ByteString getSignature();
- }
- /**
- *
- * Envelope wraps a Payload with a signature so that the message may be authenticated
- *
- *
- * Protobuf type {@code common.Envelope}
- */
- public static final class Envelope extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.Envelope)
- EnvelopeOrBuilder {
- // Use Envelope.newBuilder() to construct.
- private Envelope(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Envelope() {
- payload_ = com.google.protobuf.ByteString.EMPTY;
- signature_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Envelope(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
-
- payload_ = input.readBytes();
- break;
- }
- case 18: {
-
- signature_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Envelope_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Envelope_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.Envelope.class, org.hyperledger.fabric.protos.common.Common.Envelope.Builder.class);
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString payload_;
- /**
- *
- * A marshaled Payload
- *
- *
- * optional bytes payload = 1;
- */
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
-
- public static final int SIGNATURE_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString signature_;
- /**
- *
- * A signature by the creator specified in the Payload header
- *
- *
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!payload_.isEmpty()) {
- output.writeBytes(1, payload_);
- }
- if (!signature_.isEmpty()) {
- output.writeBytes(2, signature_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!payload_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, payload_);
- }
- if (!signature_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, signature_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.Envelope)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.Envelope other = (org.hyperledger.fabric.protos.common.Common.Envelope) obj;
-
- boolean result = true;
- result = result && getPayload()
- .equals(other.getPayload());
- result = result && getSignature()
- .equals(other.getSignature());
- 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_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
- hash = (53 * hash) + getSignature().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Envelope parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.Envelope prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Envelope wraps a Payload with a signature so that the message may be authenticated
- *
- *
- * Protobuf type {@code common.Envelope}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.Envelope)
- org.hyperledger.fabric.protos.common.Common.EnvelopeOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Envelope_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Envelope_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.Envelope.class, org.hyperledger.fabric.protos.common.Common.Envelope.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.Envelope.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- payload_ = com.google.protobuf.ByteString.EMPTY;
-
- signature_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Envelope_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Envelope getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.Envelope build() {
- org.hyperledger.fabric.protos.common.Common.Envelope result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Envelope buildPartial() {
- org.hyperledger.fabric.protos.common.Common.Envelope result = new org.hyperledger.fabric.protos.common.Common.Envelope(this);
- result.payload_ = payload_;
- result.signature_ = signature_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.Envelope) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.Envelope)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.Envelope other) {
- if (other == org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance()) return this;
- if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
- setPayload(other.getPayload());
- }
- if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) {
- setSignature(other.getSignature());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.Envelope parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.Envelope) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * A marshaled Payload
- *
- *
- * optional bytes payload = 1;
- */
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
- /**
- *
- * A marshaled Payload
- *
- *
- * optional bytes payload = 1;
- */
- public Builder setPayload(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- payload_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * A marshaled Payload
- *
- *
- * optional bytes payload = 1;
- */
- public Builder clearPayload() {
-
- payload_ = getDefaultInstance().getPayload();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * A signature by the creator specified in the Payload header
- *
- *
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
- /**
- *
- * A signature by the creator specified in the Payload header
- *
- *
- * optional bytes signature = 2;
- */
- public Builder setSignature(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- signature_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * A signature by the creator specified in the Payload header
- *
- *
- * optional bytes signature = 2;
- */
- public Builder clearSignature() {
-
- signature_ = getDefaultInstance().getSignature();
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.Envelope)
- }
-
- // @@protoc_insertion_point(class_scope:common.Envelope)
- private static final org.hyperledger.fabric.protos.common.Common.Envelope DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.Envelope();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.Envelope getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public Envelope parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Envelope(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Envelope getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface BlockOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.Block)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional .common.BlockHeader header = 1;
- */
- boolean hasHeader();
- /**
- * optional .common.BlockHeader header = 1;
- */
- org.hyperledger.fabric.protos.common.Common.BlockHeader getHeader();
- /**
- * optional .common.BlockHeader header = 1;
- */
- org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder getHeaderOrBuilder();
-
- /**
- * optional .common.BlockData data = 2;
- */
- boolean hasData();
- /**
- * optional .common.BlockData data = 2;
- */
- org.hyperledger.fabric.protos.common.Common.BlockData getData();
- /**
- * optional .common.BlockData data = 2;
- */
- org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder getDataOrBuilder();
-
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- boolean hasMetadata();
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- org.hyperledger.fabric.protos.common.Common.BlockMetadata getMetadata();
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder getMetadataOrBuilder();
- }
- /**
- *
- * This is finalized block structure to be shared among the orderer and peer
- * Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded
- * in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but
- * the Metadata is not.
- *
- *
- * Protobuf type {@code common.Block}
- */
- public static final class Block extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.Block)
- BlockOrBuilder {
- // Use Block.newBuilder() to construct.
- private Block(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Block() {
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Block(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder subBuilder = null;
- if (header_ != null) {
- subBuilder = header_.toBuilder();
- }
- header_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.BlockHeader.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(header_);
- header_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 18: {
- org.hyperledger.fabric.protos.common.Common.BlockData.Builder subBuilder = null;
- if (data_ != null) {
- subBuilder = data_.toBuilder();
- }
- data_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.BlockData.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(data_);
- data_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26: {
- org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder subBuilder = null;
- if (metadata_ != null) {
- subBuilder = metadata_.toBuilder();
- }
- metadata_ = input.readMessage(org.hyperledger.fabric.protos.common.Common.BlockMetadata.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(metadata_);
- metadata_ = subBuilder.buildPartial();
- }
-
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Block_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Block_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.Block.class, org.hyperledger.fabric.protos.common.Common.Block.Builder.class);
- }
-
- public static final int HEADER_FIELD_NUMBER = 1;
- private org.hyperledger.fabric.protos.common.Common.BlockHeader header_;
- /**
- * optional .common.BlockHeader header = 1;
- */
- public boolean hasHeader() {
- return header_ != null;
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockHeader getHeader() {
- return header_ == null ? org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance() : header_;
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder getHeaderOrBuilder() {
- return getHeader();
- }
-
- public static final int DATA_FIELD_NUMBER = 2;
- private org.hyperledger.fabric.protos.common.Common.BlockData data_;
- /**
- * optional .common.BlockData data = 2;
- */
- public boolean hasData() {
- return data_ != null;
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockData getData() {
- return data_ == null ? org.hyperledger.fabric.protos.common.Common.BlockData.getDefaultInstance() : data_;
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder getDataOrBuilder() {
- return getData();
- }
-
- public static final int METADATA_FIELD_NUMBER = 3;
- private org.hyperledger.fabric.protos.common.Common.BlockMetadata metadata_;
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public boolean hasMetadata() {
- return metadata_ != null;
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockMetadata getMetadata() {
- return metadata_ == null ? org.hyperledger.fabric.protos.common.Common.BlockMetadata.getDefaultInstance() : metadata_;
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder getMetadataOrBuilder() {
- return getMetadata();
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (header_ != null) {
- output.writeMessage(1, getHeader());
- }
- if (data_ != null) {
- output.writeMessage(2, getData());
- }
- if (metadata_ != null) {
- output.writeMessage(3, getMetadata());
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (header_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getHeader());
- }
- if (data_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getData());
- }
- if (metadata_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getMetadata());
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.Block)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.Block other = (org.hyperledger.fabric.protos.common.Common.Block) obj;
-
- boolean result = true;
- result = result && (hasHeader() == other.hasHeader());
- if (hasHeader()) {
- result = result && getHeader()
- .equals(other.getHeader());
- }
- result = result && (hasData() == other.hasData());
- if (hasData()) {
- result = result && getData()
- .equals(other.getData());
- }
- result = result && (hasMetadata() == other.hasMetadata());
- if (hasMetadata()) {
- result = result && getMetadata()
- .equals(other.getMetadata());
- }
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (hasHeader()) {
- hash = (37 * hash) + HEADER_FIELD_NUMBER;
- hash = (53 * hash) + getHeader().hashCode();
- }
- if (hasData()) {
- hash = (37 * hash) + DATA_FIELD_NUMBER;
- hash = (53 * hash) + getData().hashCode();
- }
- if (hasMetadata()) {
- hash = (37 * hash) + METADATA_FIELD_NUMBER;
- hash = (53 * hash) + getMetadata().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.Block parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.Block prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * This is finalized block structure to be shared among the orderer and peer
- * Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded
- * in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but
- * the Metadata is not.
- *
- *
- * Protobuf type {@code common.Block}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.Block)
- org.hyperledger.fabric.protos.common.Common.BlockOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Block_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Block_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.Block.class, org.hyperledger.fabric.protos.common.Common.Block.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.Block.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- if (headerBuilder_ == null) {
- header_ = null;
- } else {
- header_ = null;
- headerBuilder_ = null;
- }
- if (dataBuilder_ == null) {
- data_ = null;
- } else {
- data_ = null;
- dataBuilder_ = null;
- }
- if (metadataBuilder_ == null) {
- metadata_ = null;
- } else {
- metadata_ = null;
- metadataBuilder_ = null;
- }
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_Block_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Block getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.Block.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.Block build() {
- org.hyperledger.fabric.protos.common.Common.Block result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Block buildPartial() {
- org.hyperledger.fabric.protos.common.Common.Block result = new org.hyperledger.fabric.protos.common.Common.Block(this);
- if (headerBuilder_ == null) {
- result.header_ = header_;
- } else {
- result.header_ = headerBuilder_.build();
- }
- if (dataBuilder_ == null) {
- result.data_ = data_;
- } else {
- result.data_ = dataBuilder_.build();
- }
- if (metadataBuilder_ == null) {
- result.metadata_ = metadata_;
- } else {
- result.metadata_ = metadataBuilder_.build();
- }
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.Block) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.Block)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.Block other) {
- if (other == org.hyperledger.fabric.protos.common.Common.Block.getDefaultInstance()) return this;
- if (other.hasHeader()) {
- mergeHeader(other.getHeader());
- }
- if (other.hasData()) {
- mergeData(other.getData());
- }
- if (other.hasMetadata()) {
- mergeMetadata(other.getMetadata());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.Block parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.Block) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private org.hyperledger.fabric.protos.common.Common.BlockHeader header_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockHeader, org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder, org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder> headerBuilder_;
- /**
- * optional .common.BlockHeader header = 1;
- */
- public boolean hasHeader() {
- return headerBuilder_ != null || header_ != null;
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockHeader getHeader() {
- if (headerBuilder_ == null) {
- return header_ == null ? org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance() : header_;
- } else {
- return headerBuilder_.getMessage();
- }
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public Builder setHeader(org.hyperledger.fabric.protos.common.Common.BlockHeader value) {
- if (headerBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- header_ = value;
- onChanged();
- } else {
- headerBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public Builder setHeader(
- org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder builderForValue) {
- if (headerBuilder_ == null) {
- header_ = builderForValue.build();
- onChanged();
- } else {
- headerBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public Builder mergeHeader(org.hyperledger.fabric.protos.common.Common.BlockHeader value) {
- if (headerBuilder_ == null) {
- if (header_ != null) {
- header_ =
- org.hyperledger.fabric.protos.common.Common.BlockHeader.newBuilder(header_).mergeFrom(value).buildPartial();
- } else {
- header_ = value;
- }
- onChanged();
- } else {
- headerBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public Builder clearHeader() {
- if (headerBuilder_ == null) {
- header_ = null;
- onChanged();
- } else {
- header_ = null;
- headerBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder getHeaderBuilder() {
-
- onChanged();
- return getHeaderFieldBuilder().getBuilder();
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder getHeaderOrBuilder() {
- if (headerBuilder_ != null) {
- return headerBuilder_.getMessageOrBuilder();
- } else {
- return header_ == null ?
- org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance() : header_;
- }
- }
- /**
- * optional .common.BlockHeader header = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockHeader, org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder, org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder>
- getHeaderFieldBuilder() {
- if (headerBuilder_ == null) {
- headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockHeader, org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder, org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder>(
- getHeader(),
- getParentForChildren(),
- isClean());
- header_ = null;
- }
- return headerBuilder_;
- }
-
- private org.hyperledger.fabric.protos.common.Common.BlockData data_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockData, org.hyperledger.fabric.protos.common.Common.BlockData.Builder, org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder> dataBuilder_;
- /**
- * optional .common.BlockData data = 2;
- */
- public boolean hasData() {
- return dataBuilder_ != null || data_ != null;
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockData getData() {
- if (dataBuilder_ == null) {
- return data_ == null ? org.hyperledger.fabric.protos.common.Common.BlockData.getDefaultInstance() : data_;
- } else {
- return dataBuilder_.getMessage();
- }
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public Builder setData(org.hyperledger.fabric.protos.common.Common.BlockData value) {
- if (dataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- dataBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public Builder setData(
- org.hyperledger.fabric.protos.common.Common.BlockData.Builder builderForValue) {
- if (dataBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- dataBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public Builder mergeData(org.hyperledger.fabric.protos.common.Common.BlockData value) {
- if (dataBuilder_ == null) {
- if (data_ != null) {
- data_ =
- org.hyperledger.fabric.protos.common.Common.BlockData.newBuilder(data_).mergeFrom(value).buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- dataBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public Builder clearData() {
- if (dataBuilder_ == null) {
- data_ = null;
- onChanged();
- } else {
- data_ = null;
- dataBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockData.Builder getDataBuilder() {
-
- onChanged();
- return getDataFieldBuilder().getBuilder();
- }
- /**
- * optional .common.BlockData data = 2;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder getDataOrBuilder() {
- if (dataBuilder_ != null) {
- return dataBuilder_.getMessageOrBuilder();
- } else {
- return data_ == null ?
- org.hyperledger.fabric.protos.common.Common.BlockData.getDefaultInstance() : data_;
- }
- }
- /**
- * optional .common.BlockData data = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockData, org.hyperledger.fabric.protos.common.Common.BlockData.Builder, org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder>
- getDataFieldBuilder() {
- if (dataBuilder_ == null) {
- dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockData, org.hyperledger.fabric.protos.common.Common.BlockData.Builder, org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder>(
- getData(),
- getParentForChildren(),
- isClean());
- data_ = null;
- }
- return dataBuilder_;
- }
-
- private org.hyperledger.fabric.protos.common.Common.BlockMetadata metadata_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockMetadata, org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder, org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder> metadataBuilder_;
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public boolean hasMetadata() {
- return metadataBuilder_ != null || metadata_ != null;
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockMetadata getMetadata() {
- if (metadataBuilder_ == null) {
- return metadata_ == null ? org.hyperledger.fabric.protos.common.Common.BlockMetadata.getDefaultInstance() : metadata_;
- } else {
- return metadataBuilder_.getMessage();
- }
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public Builder setMetadata(org.hyperledger.fabric.protos.common.Common.BlockMetadata value) {
- if (metadataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- metadata_ = value;
- onChanged();
- } else {
- metadataBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public Builder setMetadata(
- org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder builderForValue) {
- if (metadataBuilder_ == null) {
- metadata_ = builderForValue.build();
- onChanged();
- } else {
- metadataBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public Builder mergeMetadata(org.hyperledger.fabric.protos.common.Common.BlockMetadata value) {
- if (metadataBuilder_ == null) {
- if (metadata_ != null) {
- metadata_ =
- org.hyperledger.fabric.protos.common.Common.BlockMetadata.newBuilder(metadata_).mergeFrom(value).buildPartial();
- } else {
- metadata_ = value;
- }
- onChanged();
- } else {
- metadataBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public Builder clearMetadata() {
- if (metadataBuilder_ == null) {
- metadata_ = null;
- onChanged();
- } else {
- metadata_ = null;
- metadataBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder getMetadataBuilder() {
-
- onChanged();
- return getMetadataFieldBuilder().getBuilder();
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- public org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder getMetadataOrBuilder() {
- if (metadataBuilder_ != null) {
- return metadataBuilder_.getMessageOrBuilder();
- } else {
- return metadata_ == null ?
- org.hyperledger.fabric.protos.common.Common.BlockMetadata.getDefaultInstance() : metadata_;
- }
- }
- /**
- * optional .common.BlockMetadata metadata = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockMetadata, org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder, org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder>
- getMetadataFieldBuilder() {
- if (metadataBuilder_ == null) {
- metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.common.Common.BlockMetadata, org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder, org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder>(
- getMetadata(),
- getParentForChildren(),
- isClean());
- metadata_ = null;
- }
- return metadataBuilder_;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.Block)
- }
-
- // @@protoc_insertion_point(class_scope:common.Block)
- private static final org.hyperledger.fabric.protos.common.Common.Block DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.Block();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.Block getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public Block parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Block(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.Block getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface BlockHeaderOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.BlockHeader)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * The position in the blockchain
- *
- *
- * optional uint64 number = 1;
- */
- long getNumber();
-
- /**
- *
- * The hash of the previous block header
- *
- *
- * optional bytes previous_hash = 2;
- */
- com.google.protobuf.ByteString getPreviousHash();
-
- /**
- *
- * The hash of the BlockData, by MerkleTree
- *
- *
- * optional bytes data_hash = 3;
- */
- com.google.protobuf.ByteString getDataHash();
- }
- /**
- *
- * BlockHeader is the element of the block which forms the block chain
- * The block header is hashed using the configured chain hashing algorithm
- * over the ASN.1 encoding of the BlockHeader
- *
- *
- * Protobuf type {@code common.BlockHeader}
- */
- public static final class BlockHeader extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.BlockHeader)
- BlockHeaderOrBuilder {
- // Use BlockHeader.newBuilder() to construct.
- private BlockHeader(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private BlockHeader() {
- number_ = 0L;
- previousHash_ = com.google.protobuf.ByteString.EMPTY;
- dataHash_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private BlockHeader(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- number_ = input.readUInt64();
- break;
- }
- case 18: {
-
- previousHash_ = input.readBytes();
- break;
- }
- case 26: {
-
- dataHash_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.BlockHeader.class, org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder.class);
- }
-
- public static final int NUMBER_FIELD_NUMBER = 1;
- private long number_;
- /**
- *
- * The position in the blockchain
- *
- *
- * optional uint64 number = 1;
- */
- public long getNumber() {
- return number_;
- }
-
- public static final int PREVIOUS_HASH_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString previousHash_;
- /**
- *
- * The hash of the previous block header
- *
- *
- * optional bytes previous_hash = 2;
- */
- public com.google.protobuf.ByteString getPreviousHash() {
- return previousHash_;
- }
-
- public static final int DATA_HASH_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString dataHash_;
- /**
- *
- * The hash of the BlockData, by MerkleTree
- *
- *
- * optional bytes data_hash = 3;
- */
- public com.google.protobuf.ByteString getDataHash() {
- return dataHash_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (number_ != 0L) {
- output.writeUInt64(1, number_);
- }
- if (!previousHash_.isEmpty()) {
- output.writeBytes(2, previousHash_);
- }
- if (!dataHash_.isEmpty()) {
- output.writeBytes(3, dataHash_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (number_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(1, number_);
- }
- if (!previousHash_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, previousHash_);
- }
- if (!dataHash_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, dataHash_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.BlockHeader)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.BlockHeader other = (org.hyperledger.fabric.protos.common.Common.BlockHeader) obj;
-
- boolean result = true;
- result = result && (getNumber()
- == other.getNumber());
- result = result && getPreviousHash()
- .equals(other.getPreviousHash());
- result = result && getDataHash()
- .equals(other.getDataHash());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + NUMBER_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getNumber());
- hash = (37 * hash) + PREVIOUS_HASH_FIELD_NUMBER;
- hash = (53 * hash) + getPreviousHash().hashCode();
- hash = (37 * hash) + DATA_HASH_FIELD_NUMBER;
- hash = (53 * hash) + getDataHash().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.BlockHeader prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * BlockHeader is the element of the block which forms the block chain
- * The block header is hashed using the configured chain hashing algorithm
- * over the ASN.1 encoding of the BlockHeader
- *
- *
- * Protobuf type {@code common.BlockHeader}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.BlockHeader)
- org.hyperledger.fabric.protos.common.Common.BlockHeaderOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.BlockHeader.class, org.hyperledger.fabric.protos.common.Common.BlockHeader.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.BlockHeader.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- number_ = 0L;
-
- previousHash_ = com.google.protobuf.ByteString.EMPTY;
-
- dataHash_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockHeader_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockHeader getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockHeader build() {
- org.hyperledger.fabric.protos.common.Common.BlockHeader result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockHeader buildPartial() {
- org.hyperledger.fabric.protos.common.Common.BlockHeader result = new org.hyperledger.fabric.protos.common.Common.BlockHeader(this);
- result.number_ = number_;
- result.previousHash_ = previousHash_;
- result.dataHash_ = dataHash_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.BlockHeader) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.BlockHeader)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.BlockHeader other) {
- if (other == org.hyperledger.fabric.protos.common.Common.BlockHeader.getDefaultInstance()) return this;
- if (other.getNumber() != 0L) {
- setNumber(other.getNumber());
- }
- if (other.getPreviousHash() != com.google.protobuf.ByteString.EMPTY) {
- setPreviousHash(other.getPreviousHash());
- }
- if (other.getDataHash() != com.google.protobuf.ByteString.EMPTY) {
- setDataHash(other.getDataHash());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.BlockHeader parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.BlockHeader) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private long number_ ;
- /**
- *
- * The position in the blockchain
- *
- *
- * optional uint64 number = 1;
- */
- public long getNumber() {
- return number_;
- }
- /**
- *
- * The position in the blockchain
- *
- *
- * optional uint64 number = 1;
- */
- public Builder setNumber(long value) {
-
- number_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * The position in the blockchain
- *
- *
- * optional uint64 number = 1;
- */
- public Builder clearNumber() {
-
- number_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString previousHash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * The hash of the previous block header
- *
- *
- * optional bytes previous_hash = 2;
- */
- public com.google.protobuf.ByteString getPreviousHash() {
- return previousHash_;
- }
- /**
- *
- * The hash of the previous block header
- *
- *
- * optional bytes previous_hash = 2;
- */
- public Builder setPreviousHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- previousHash_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * The hash of the previous block header
- *
- *
- * optional bytes previous_hash = 2;
- */
- public Builder clearPreviousHash() {
-
- previousHash_ = getDefaultInstance().getPreviousHash();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString dataHash_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * The hash of the BlockData, by MerkleTree
- *
- *
- * optional bytes data_hash = 3;
- */
- public com.google.protobuf.ByteString getDataHash() {
- return dataHash_;
- }
- /**
- *
- * The hash of the BlockData, by MerkleTree
- *
- *
- * optional bytes data_hash = 3;
- */
- public Builder setDataHash(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- dataHash_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * The hash of the BlockData, by MerkleTree
- *
- *
- * optional bytes data_hash = 3;
- */
- public Builder clearDataHash() {
-
- dataHash_ = getDefaultInstance().getDataHash();
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.BlockHeader)
- }
-
- // @@protoc_insertion_point(class_scope:common.BlockHeader)
- private static final org.hyperledger.fabric.protos.common.Common.BlockHeader DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.BlockHeader();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.BlockHeader getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public BlockHeader parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new BlockHeader(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockHeader getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface BlockDataOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.BlockData)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated bytes data = 1;
- */
- java.util.List getDataList();
- /**
- * repeated bytes data = 1;
- */
- int getDataCount();
- /**
- * repeated bytes data = 1;
- */
- com.google.protobuf.ByteString getData(int index);
- }
- /**
- * Protobuf type {@code common.BlockData}
- */
- public static final class BlockData extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.BlockData)
- BlockDataOrBuilder {
- // Use BlockData.newBuilder() to construct.
- private BlockData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private BlockData() {
- data_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private BlockData(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- data_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- data_.add(input.readBytes());
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- data_ = java.util.Collections.unmodifiableList(data_);
- }
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockData_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockData_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.BlockData.class, org.hyperledger.fabric.protos.common.Common.BlockData.Builder.class);
- }
-
- public static final int DATA_FIELD_NUMBER = 1;
- private java.util.List data_;
- /**
- * repeated bytes data = 1;
- */
- public java.util.List
- getDataList() {
- return data_;
- }
- /**
- * repeated bytes data = 1;
- */
- public int getDataCount() {
- return data_.size();
- }
- /**
- * repeated bytes data = 1;
- */
- public com.google.protobuf.ByteString getData(int index) {
- return data_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < data_.size(); i++) {
- output.writeBytes(1, data_.get(i));
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int i = 0; i < data_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(data_.get(i));
- }
- size += dataSize;
- size += 1 * getDataList().size();
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.BlockData)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.BlockData other = (org.hyperledger.fabric.protos.common.Common.BlockData) obj;
-
- boolean result = true;
- result = result && getDataList()
- .equals(other.getDataList());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (getDataCount() > 0) {
- hash = (37 * hash) + DATA_FIELD_NUMBER;
- hash = (53 * hash) + getDataList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockData parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.BlockData prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code common.BlockData}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.BlockData)
- org.hyperledger.fabric.protos.common.Common.BlockDataOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockData_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockData_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.BlockData.class, org.hyperledger.fabric.protos.common.Common.BlockData.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.BlockData.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- data_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockData_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockData getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.BlockData.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockData build() {
- org.hyperledger.fabric.protos.common.Common.BlockData result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockData buildPartial() {
- org.hyperledger.fabric.protos.common.Common.BlockData result = new org.hyperledger.fabric.protos.common.Common.BlockData(this);
- int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- data_ = java.util.Collections.unmodifiableList(data_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.data_ = data_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.BlockData) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.BlockData)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.BlockData other) {
- if (other == org.hyperledger.fabric.protos.common.Common.BlockData.getDefaultInstance()) return this;
- if (!other.data_.isEmpty()) {
- if (data_.isEmpty()) {
- data_ = other.data_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureDataIsMutable();
- data_.addAll(other.data_);
- }
- onChanged();
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.BlockData parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.BlockData) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List data_ = java.util.Collections.emptyList();
- private void ensureDataIsMutable() {
- if (!((bitField0_ & 0x00000001) == 0x00000001)) {
- data_ = new java.util.ArrayList(data_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- * repeated bytes data = 1;
- */
- public java.util.List
- getDataList() {
- return java.util.Collections.unmodifiableList(data_);
- }
- /**
- * repeated bytes data = 1;
- */
- public int getDataCount() {
- return data_.size();
- }
- /**
- * repeated bytes data = 1;
- */
- public com.google.protobuf.ByteString getData(int index) {
- return data_.get(index);
- }
- /**
- * repeated bytes data = 1;
- */
- public Builder setData(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureDataIsMutable();
- data_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes data = 1;
- */
- public Builder addData(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureDataIsMutable();
- data_.add(value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes data = 1;
- */
- public Builder addAllData(
- java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, data_);
- onChanged();
- return this;
- }
- /**
- * repeated bytes data = 1;
- */
- public Builder clearData() {
- data_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.BlockData)
- }
-
- // @@protoc_insertion_point(class_scope:common.BlockData)
- private static final org.hyperledger.fabric.protos.common.Common.BlockData DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.BlockData();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.BlockData getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public BlockData parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new BlockData(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockData getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface BlockMetadataOrBuilder extends
- // @@protoc_insertion_point(interface_extends:common.BlockMetadata)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated bytes metadata = 1;
- */
- java.util.List getMetadataList();
- /**
- * repeated bytes metadata = 1;
- */
- int getMetadataCount();
- /**
- * repeated bytes metadata = 1;
- */
- com.google.protobuf.ByteString getMetadata(int index);
- }
- /**
- * Protobuf type {@code common.BlockMetadata}
- */
- public static final class BlockMetadata extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:common.BlockMetadata)
- BlockMetadataOrBuilder {
- // Use BlockMetadata.newBuilder() to construct.
- private BlockMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private BlockMetadata() {
- metadata_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private BlockMetadata(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- metadata_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- metadata_.add(input.readBytes());
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- metadata_ = java.util.Collections.unmodifiableList(metadata_);
- }
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockMetadata_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockMetadata_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.BlockMetadata.class, org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder.class);
- }
-
- public static final int METADATA_FIELD_NUMBER = 1;
- private java.util.List metadata_;
- /**
- * repeated bytes metadata = 1;
- */
- public java.util.List
- getMetadataList() {
- return metadata_;
- }
- /**
- * repeated bytes metadata = 1;
- */
- public int getMetadataCount() {
- return metadata_.size();
- }
- /**
- * repeated bytes metadata = 1;
- */
- public com.google.protobuf.ByteString getMetadata(int index) {
- return metadata_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < metadata_.size(); i++) {
- output.writeBytes(1, metadata_.get(i));
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int i = 0; i < metadata_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(metadata_.get(i));
- }
- size += dataSize;
- size += 1 * getMetadataList().size();
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.common.Common.BlockMetadata)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.common.Common.BlockMetadata other = (org.hyperledger.fabric.protos.common.Common.BlockMetadata) obj;
-
- boolean result = true;
- result = result && getMetadataList()
- .equals(other.getMetadataList());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (getMetadataCount() > 0) {
- hash = (37 * hash) + METADATA_FIELD_NUMBER;
- hash = (53 * hash) + getMetadataList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.common.Common.BlockMetadata prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code common.BlockMetadata}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:common.BlockMetadata)
- org.hyperledger.fabric.protos.common.Common.BlockMetadataOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockMetadata_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockMetadata_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.common.Common.BlockMetadata.class, org.hyperledger.fabric.protos.common.Common.BlockMetadata.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.common.Common.BlockMetadata.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- metadata_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.common.Common.internal_static_common_BlockMetadata_descriptor;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockMetadata getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.common.Common.BlockMetadata.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockMetadata build() {
- org.hyperledger.fabric.protos.common.Common.BlockMetadata result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockMetadata buildPartial() {
- org.hyperledger.fabric.protos.common.Common.BlockMetadata result = new org.hyperledger.fabric.protos.common.Common.BlockMetadata(this);
- int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- metadata_ = java.util.Collections.unmodifiableList(metadata_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.metadata_ = metadata_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.common.Common.BlockMetadata) {
- return mergeFrom((org.hyperledger.fabric.protos.common.Common.BlockMetadata)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.common.Common.BlockMetadata other) {
- if (other == org.hyperledger.fabric.protos.common.Common.BlockMetadata.getDefaultInstance()) return this;
- if (!other.metadata_.isEmpty()) {
- if (metadata_.isEmpty()) {
- metadata_ = other.metadata_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureMetadataIsMutable();
- metadata_.addAll(other.metadata_);
- }
- onChanged();
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.common.Common.BlockMetadata parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.common.Common.BlockMetadata) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List metadata_ = java.util.Collections.emptyList();
- private void ensureMetadataIsMutable() {
- if (!((bitField0_ & 0x00000001) == 0x00000001)) {
- metadata_ = new java.util.ArrayList(metadata_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- * repeated bytes metadata = 1;
- */
- public java.util.List
- getMetadataList() {
- return java.util.Collections.unmodifiableList(metadata_);
- }
- /**
- * repeated bytes metadata = 1;
- */
- public int getMetadataCount() {
- return metadata_.size();
- }
- /**
- * repeated bytes metadata = 1;
- */
- public com.google.protobuf.ByteString getMetadata(int index) {
- return metadata_.get(index);
- }
- /**
- * repeated bytes metadata = 1;
- */
- public Builder setMetadata(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureMetadataIsMutable();
- metadata_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes metadata = 1;
- */
- public Builder addMetadata(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureMetadataIsMutable();
- metadata_.add(value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes metadata = 1;
- */
- public Builder addAllMetadata(
- java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureMetadataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, metadata_);
- onChanged();
- return this;
- }
- /**
- * repeated bytes metadata = 1;
- */
- public Builder clearMetadata() {
- metadata_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:common.BlockMetadata)
- }
-
- // @@protoc_insertion_point(class_scope:common.BlockMetadata)
- private static final org.hyperledger.fabric.protos.common.Common.BlockMetadata DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Common.BlockMetadata();
- }
-
- public static org.hyperledger.fabric.protos.common.Common.BlockMetadata getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public BlockMetadata parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new BlockMetadata(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.common.Common.BlockMetadata getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_LastConfig_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_LastConfig_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_Metadata_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_Metadata_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_MetadataSignature_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_MetadataSignature_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_Header_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_Header_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_ChannelHeader_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_ChannelHeader_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_SignatureHeader_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_SignatureHeader_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_Payload_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_Payload_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_Envelope_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_Envelope_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_Block_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_Block_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_BlockHeader_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_BlockHeader_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_BlockData_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_BlockData_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_common_BlockMetadata_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_common_BlockMetadata_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\023common/common.proto\022\006common\032\037google/pr" +
- "otobuf/timestamp.proto\"\033\n\nLastConfig\022\r\n\005" +
- "index\030\001 \001(\004\"H\n\010Metadata\022\r\n\005value\030\001 \001(\014\022-" +
- "\n\nsignatures\030\002 \003(\0132\031.common.MetadataSign" +
- "ature\"@\n\021MetadataSignature\022\030\n\020signature_" +
- "header\030\001 \001(\014\022\021\n\tsignature\030\002 \001(\014\":\n\006Heade" +
- "r\022\026\n\016channel_header\030\001 \001(\014\022\030\n\020signature_h" +
- "eader\030\002 \001(\014\"\271\001\n\rChannelHeader\022\014\n\004type\030\001 " +
- "\001(\005\022\017\n\007version\030\002 \001(\005\022-\n\ttimestamp\030\003 \001(\0132" +
- "\032.google.protobuf.Timestamp\022\022\n\nchannel_i",
- "d\030\004 \001(\t\022\r\n\005tx_id\030\005 \001(\t\022\r\n\005epoch\030\006 \001(\004\022\021\n" +
- "\textension\030\007 \001(\014\022\025\n\rtls_cert_hash\030\010 \001(\014\"" +
- "1\n\017SignatureHeader\022\017\n\007creator\030\001 \001(\014\022\r\n\005n" +
- "once\030\002 \001(\014\"7\n\007Payload\022\036\n\006header\030\001 \001(\0132\016." +
- "common.Header\022\014\n\004data\030\002 \001(\014\".\n\010Envelope\022" +
- "\017\n\007payload\030\001 \001(\014\022\021\n\tsignature\030\002 \001(\014\"v\n\005B" +
- "lock\022#\n\006header\030\001 \001(\0132\023.common.BlockHeade" +
- "r\022\037\n\004data\030\002 \001(\0132\021.common.BlockData\022\'\n\010me" +
- "tadata\030\003 \001(\0132\025.common.BlockMetadata\"G\n\013B" +
- "lockHeader\022\016\n\006number\030\001 \001(\004\022\025\n\rprevious_h",
- "ash\030\002 \001(\014\022\021\n\tdata_hash\030\003 \001(\014\"\031\n\tBlockDat" +
- "a\022\014\n\004data\030\001 \003(\014\"!\n\rBlockMetadata\022\020\n\010meta" +
- "data\030\001 \003(\014*\300\001\n\006Status\022\013\n\007UNKNOWN\020\000\022\014\n\007SU" +
- "CCESS\020\310\001\022\020\n\013BAD_REQUEST\020\220\003\022\016\n\tFORBIDDEN\020" +
- "\223\003\022\016\n\tNOT_FOUND\020\224\003\022\035\n\030REQUEST_ENTITY_TOO" +
- "_LARGE\020\235\003\022\032\n\025INTERNAL_SERVER_ERROR\020\364\003\022\024\n" +
- "\017NOT_IMPLEMENTED\020\365\003\022\030\n\023SERVICE_UNAVAILAB" +
- "LE\020\367\003*\263\001\n\nHeaderType\022\013\n\007MESSAGE\020\000\022\n\n\006CON" +
- "FIG\020\001\022\021\n\rCONFIG_UPDATE\020\002\022\030\n\024ENDORSER_TRA" +
- "NSACTION\020\003\022\027\n\023ORDERER_TRANSACTION\020\004\022\025\n\021D",
- "ELIVER_SEEK_INFO\020\005\022\025\n\021CHAINCODE_PACKAGE\020" +
- "\006\022\030\n\024PEER_RESOURCE_UPDATE\020\007*[\n\022BlockMeta" +
- "dataIndex\022\016\n\nSIGNATURES\020\000\022\017\n\013LAST_CONFIG" +
- "\020\001\022\027\n\023TRANSACTIONS_FILTER\020\002\022\013\n\007ORDERER\020\003" +
- "BS\n$org.hyperledger.fabric.protos.common" +
- "Z+github.com/hyperledger/fabric/protos/c" +
- "ommonb\006proto3"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.TimestampProto.getDescriptor(),
- }, assigner);
- internal_static_common_LastConfig_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_common_LastConfig_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_LastConfig_descriptor,
- new java.lang.String[] { "Index", });
- internal_static_common_Metadata_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_common_Metadata_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_Metadata_descriptor,
- new java.lang.String[] { "Value", "Signatures", });
- internal_static_common_MetadataSignature_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_common_MetadataSignature_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_MetadataSignature_descriptor,
- new java.lang.String[] { "SignatureHeader", "Signature", });
- internal_static_common_Header_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_common_Header_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_Header_descriptor,
- new java.lang.String[] { "ChannelHeader", "SignatureHeader", });
- internal_static_common_ChannelHeader_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_common_ChannelHeader_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_ChannelHeader_descriptor,
- new java.lang.String[] { "Type", "Version", "Timestamp", "ChannelId", "TxId", "Epoch", "Extension", "TlsCertHash", });
- internal_static_common_SignatureHeader_descriptor =
- getDescriptor().getMessageTypes().get(5);
- internal_static_common_SignatureHeader_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_SignatureHeader_descriptor,
- new java.lang.String[] { "Creator", "Nonce", });
- internal_static_common_Payload_descriptor =
- getDescriptor().getMessageTypes().get(6);
- internal_static_common_Payload_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_Payload_descriptor,
- new java.lang.String[] { "Header", "Data", });
- internal_static_common_Envelope_descriptor =
- getDescriptor().getMessageTypes().get(7);
- internal_static_common_Envelope_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_Envelope_descriptor,
- new java.lang.String[] { "Payload", "Signature", });
- internal_static_common_Block_descriptor =
- getDescriptor().getMessageTypes().get(8);
- internal_static_common_Block_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_Block_descriptor,
- new java.lang.String[] { "Header", "Data", "Metadata", });
- internal_static_common_BlockHeader_descriptor =
- getDescriptor().getMessageTypes().get(9);
- internal_static_common_BlockHeader_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_BlockHeader_descriptor,
- new java.lang.String[] { "Number", "PreviousHash", "DataHash", });
- internal_static_common_BlockData_descriptor =
- getDescriptor().getMessageTypes().get(10);
- internal_static_common_BlockData_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_BlockData_descriptor,
- new java.lang.String[] { "Data", });
- internal_static_common_BlockMetadata_descriptor =
- getDescriptor().getMessageTypes().get(11);
- internal_static_common_BlockMetadata_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_common_BlockMetadata_descriptor,
- new java.lang.String[] { "Metadata", });
- com.google.protobuf.TimestampProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/ledger/queryresult/KvQueryResult.java b/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/ledger/queryresult/KvQueryResult.java
deleted file mode 100644
index f7ff13a64..000000000
--- a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/ledger/queryresult/KvQueryResult.java
+++ /dev/null
@@ -1,1627 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: ledger/queryresult/kv_query_result.proto
-
-package org.hyperledger.fabric.protos.ledger.queryresult;
-
-public final class KvQueryResult {
- private KvQueryResult() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- public interface KVOrBuilder extends
- // @@protoc_insertion_point(interface_extends:queryresult.KV)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional string namespace = 1;
- */
- java.lang.String getNamespace();
- /**
- * optional string namespace = 1;
- */
- com.google.protobuf.ByteString
- getNamespaceBytes();
-
- /**
- * optional string key = 2;
- */
- java.lang.String getKey();
- /**
- * optional string key = 2;
- */
- com.google.protobuf.ByteString
- getKeyBytes();
-
- /**
- * optional bytes value = 3;
- */
- com.google.protobuf.ByteString getValue();
- }
- /**
- *
- * KV -- QueryResult for range/execute query. Holds a key and corresponding value.
- *
- *
- * Protobuf type {@code queryresult.KV}
- */
- public static final class KV extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:queryresult.KV)
- KVOrBuilder {
- // Use KV.newBuilder() to construct.
- private KV(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private KV() {
- namespace_ = "";
- key_ = "";
- value_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private KV(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- namespace_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- key_ = s;
- break;
- }
- case 26: {
-
- value_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KV_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KV_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV.class, org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV.Builder.class);
- }
-
- public static final int NAMESPACE_FIELD_NUMBER = 1;
- private volatile java.lang.Object namespace_;
- /**
- * optional string namespace = 1;
- */
- public java.lang.String getNamespace() {
- java.lang.Object ref = namespace_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- namespace_ = s;
- return s;
- }
- }
- /**
- * optional string namespace = 1;
- */
- public com.google.protobuf.ByteString
- getNamespaceBytes() {
- java.lang.Object ref = namespace_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- namespace_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int KEY_FIELD_NUMBER = 2;
- private volatile java.lang.Object key_;
- /**
- * optional string key = 2;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- key_ = s;
- return s;
- }
- }
- /**
- * optional string key = 2;
- */
- public com.google.protobuf.ByteString
- getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int VALUE_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString value_;
- /**
- * optional bytes value = 3;
- */
- public com.google.protobuf.ByteString getValue() {
- return value_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getNamespaceBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_);
- }
- if (!getKeyBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_);
- }
- if (!value_.isEmpty()) {
- output.writeBytes(3, value_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNamespaceBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_);
- }
- if (!getKeyBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_);
- }
- if (!value_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, value_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV other = (org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV) obj;
-
- boolean result = true;
- result = result && getNamespace()
- .equals(other.getNamespace());
- result = result && getKey()
- .equals(other.getKey());
- result = result && getValue()
- .equals(other.getValue());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
- hash = (53 * hash) + getNamespace().hashCode();
- hash = (37 * hash) + KEY_FIELD_NUMBER;
- hash = (53 * hash) + getKey().hashCode();
- hash = (37 * hash) + VALUE_FIELD_NUMBER;
- hash = (53 * hash) + getValue().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * KV -- QueryResult for range/execute query. Holds a key and corresponding value.
- *
- *
- * Protobuf type {@code queryresult.KV}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:queryresult.KV)
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KVOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KV_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KV_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV.class, org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- namespace_ = "";
-
- key_ = "";
-
- value_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KV_descriptor;
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV build() {
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV buildPartial() {
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV result = new org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV(this);
- result.namespace_ = namespace_;
- result.key_ = key_;
- result.value_ = value_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV) {
- return mergeFrom((org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV other) {
- if (other == org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV.getDefaultInstance()) return this;
- if (!other.getNamespace().isEmpty()) {
- namespace_ = other.namespace_;
- onChanged();
- }
- if (!other.getKey().isEmpty()) {
- key_ = other.key_;
- onChanged();
- }
- if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
- setValue(other.getValue());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object namespace_ = "";
- /**
- * optional string namespace = 1;
- */
- public java.lang.String getNamespace() {
- java.lang.Object ref = namespace_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- namespace_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string namespace = 1;
- */
- public com.google.protobuf.ByteString
- getNamespaceBytes() {
- java.lang.Object ref = namespace_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- namespace_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string namespace = 1;
- */
- public Builder setNamespace(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- namespace_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string namespace = 1;
- */
- public Builder clearNamespace() {
-
- namespace_ = getDefaultInstance().getNamespace();
- onChanged();
- return this;
- }
- /**
- * optional string namespace = 1;
- */
- public Builder setNamespaceBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- namespace_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object key_ = "";
- /**
- * optional string key = 2;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- key_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string key = 2;
- */
- public com.google.protobuf.ByteString
- getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string key = 2;
- */
- public Builder setKey(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- key_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string key = 2;
- */
- public Builder clearKey() {
-
- key_ = getDefaultInstance().getKey();
- onChanged();
- return this;
- }
- /**
- * optional string key = 2;
- */
- public Builder setKeyBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- key_ = value;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes value = 3;
- */
- public com.google.protobuf.ByteString getValue() {
- return value_;
- }
- /**
- * optional bytes value = 3;
- */
- public Builder setValue(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- value_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes value = 3;
- */
- public Builder clearValue() {
-
- value_ = getDefaultInstance().getValue();
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:queryresult.KV)
- }
-
- // @@protoc_insertion_point(class_scope:queryresult.KV)
- private static final org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV();
- }
-
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public KV parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new KV(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KV getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface KeyModificationOrBuilder extends
- // @@protoc_insertion_point(interface_extends:queryresult.KeyModification)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional string tx_id = 1;
- */
- java.lang.String getTxId();
- /**
- * optional string tx_id = 1;
- */
- com.google.protobuf.ByteString
- getTxIdBytes();
-
- /**
- * optional bytes value = 2;
- */
- com.google.protobuf.ByteString getValue();
-
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- boolean hasTimestamp();
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- com.google.protobuf.Timestamp getTimestamp();
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
-
- /**
- * optional bool is_delete = 4;
- */
- boolean getIsDelete();
- }
- /**
- *
- * KeyModification -- QueryResult for history query. Holds a transaction ID, value,
- * timestamp, and delete marker which resulted from a history query.
- *
- *
- * Protobuf type {@code queryresult.KeyModification}
- */
- public static final class KeyModification extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:queryresult.KeyModification)
- KeyModificationOrBuilder {
- // Use KeyModification.newBuilder() to construct.
- private KeyModification(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private KeyModification() {
- txId_ = "";
- value_ = com.google.protobuf.ByteString.EMPTY;
- isDelete_ = false;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private KeyModification(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- txId_ = s;
- break;
- }
- case 18: {
-
- value_ = input.readBytes();
- break;
- }
- case 26: {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (timestamp_ != null) {
- subBuilder = timestamp_.toBuilder();
- }
- timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(timestamp_);
- timestamp_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 32: {
-
- isDelete_ = input.readBool();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KeyModification_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KeyModification_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification.class, org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification.Builder.class);
- }
-
- public static final int TX_ID_FIELD_NUMBER = 1;
- private volatile java.lang.Object txId_;
- /**
- * optional string tx_id = 1;
- */
- public java.lang.String getTxId() {
- java.lang.Object ref = txId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txId_ = s;
- return s;
- }
- }
- /**
- * optional string tx_id = 1;
- */
- public com.google.protobuf.ByteString
- getTxIdBytes() {
- java.lang.Object ref = txId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int VALUE_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString value_;
- /**
- * optional bytes value = 2;
- */
- public com.google.protobuf.ByteString getValue() {
- return value_;
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 3;
- private com.google.protobuf.Timestamp timestamp_;
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public boolean hasTimestamp() {
- return timestamp_ != null;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.Timestamp getTimestamp() {
- return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
- return getTimestamp();
- }
-
- public static final int IS_DELETE_FIELD_NUMBER = 4;
- private boolean isDelete_;
- /**
- * optional bool is_delete = 4;
- */
- public boolean getIsDelete() {
- return isDelete_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getTxIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, txId_);
- }
- if (!value_.isEmpty()) {
- output.writeBytes(2, value_);
- }
- if (timestamp_ != null) {
- output.writeMessage(3, getTimestamp());
- }
- if (isDelete_ != false) {
- output.writeBool(4, isDelete_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getTxIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, txId_);
- }
- if (!value_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, value_);
- }
- if (timestamp_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getTimestamp());
- }
- if (isDelete_ != false) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(4, isDelete_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification other = (org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification) obj;
-
- boolean result = true;
- result = result && getTxId()
- .equals(other.getTxId());
- result = result && getValue()
- .equals(other.getValue());
- result = result && (hasTimestamp() == other.hasTimestamp());
- if (hasTimestamp()) {
- result = result && getTimestamp()
- .equals(other.getTimestamp());
- }
- result = result && (getIsDelete()
- == other.getIsDelete());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + TX_ID_FIELD_NUMBER;
- hash = (53 * hash) + getTxId().hashCode();
- hash = (37 * hash) + VALUE_FIELD_NUMBER;
- hash = (53 * hash) + getValue().hashCode();
- if (hasTimestamp()) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + getTimestamp().hashCode();
- }
- hash = (37 * hash) + IS_DELETE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getIsDelete());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * KeyModification -- QueryResult for history query. Holds a transaction ID, value,
- * timestamp, and delete marker which resulted from a history query.
- *
- *
- * Protobuf type {@code queryresult.KeyModification}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:queryresult.KeyModification)
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModificationOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KeyModification_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KeyModification_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification.class, org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- txId_ = "";
-
- value_ = com.google.protobuf.ByteString.EMPTY;
-
- if (timestampBuilder_ == null) {
- timestamp_ = null;
- } else {
- timestamp_ = null;
- timestampBuilder_ = null;
- }
- isDelete_ = false;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.internal_static_queryresult_KeyModification_descriptor;
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification build() {
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification buildPartial() {
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification result = new org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification(this);
- result.txId_ = txId_;
- result.value_ = value_;
- if (timestampBuilder_ == null) {
- result.timestamp_ = timestamp_;
- } else {
- result.timestamp_ = timestampBuilder_.build();
- }
- result.isDelete_ = isDelete_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification) {
- return mergeFrom((org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification other) {
- if (other == org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification.getDefaultInstance()) return this;
- if (!other.getTxId().isEmpty()) {
- txId_ = other.txId_;
- onChanged();
- }
- if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
- setValue(other.getValue());
- }
- if (other.hasTimestamp()) {
- mergeTimestamp(other.getTimestamp());
- }
- if (other.getIsDelete() != false) {
- setIsDelete(other.getIsDelete());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object txId_ = "";
- /**
- * optional string tx_id = 1;
- */
- public java.lang.String getTxId() {
- java.lang.Object ref = txId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string tx_id = 1;
- */
- public com.google.protobuf.ByteString
- getTxIdBytes() {
- java.lang.Object ref = txId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string tx_id = 1;
- */
- public Builder setTxId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- txId_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string tx_id = 1;
- */
- public Builder clearTxId() {
-
- txId_ = getDefaultInstance().getTxId();
- onChanged();
- return this;
- }
- /**
- * optional string tx_id = 1;
- */
- public Builder setTxIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- txId_ = value;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes value = 2;
- */
- public com.google.protobuf.ByteString getValue() {
- return value_;
- }
- /**
- * optional bytes value = 2;
- */
- public Builder setValue(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- value_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes value = 2;
- */
- public Builder clearValue() {
-
- value_ = getDefaultInstance().getValue();
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Timestamp timestamp_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public boolean hasTimestamp() {
- return timestampBuilder_ != null || timestamp_ != null;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.Timestamp getTimestamp() {
- if (timestampBuilder_ == null) {
- return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- } else {
- return timestampBuilder_.getMessage();
- }
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder setTimestamp(com.google.protobuf.Timestamp value) {
- if (timestampBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- timestamp_ = value;
- onChanged();
- } else {
- timestampBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder setTimestamp(
- com.google.protobuf.Timestamp.Builder builderForValue) {
- if (timestampBuilder_ == null) {
- timestamp_ = builderForValue.build();
- onChanged();
- } else {
- timestampBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
- if (timestampBuilder_ == null) {
- if (timestamp_ != null) {
- timestamp_ =
- com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
- } else {
- timestamp_ = value;
- }
- onChanged();
- } else {
- timestampBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public Builder clearTimestamp() {
- if (timestampBuilder_ == null) {
- timestamp_ = null;
- onChanged();
- } else {
- timestamp_ = null;
- timestampBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
-
- onChanged();
- return getTimestampFieldBuilder().getBuilder();
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
- if (timestampBuilder_ != null) {
- return timestampBuilder_.getMessageOrBuilder();
- } else {
- return timestamp_ == null ?
- com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- }
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
- getTimestampFieldBuilder() {
- if (timestampBuilder_ == null) {
- timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
- getTimestamp(),
- getParentForChildren(),
- isClean());
- timestamp_ = null;
- }
- return timestampBuilder_;
- }
-
- private boolean isDelete_ ;
- /**
- * optional bool is_delete = 4;
- */
- public boolean getIsDelete() {
- return isDelete_;
- }
- /**
- * optional bool is_delete = 4;
- */
- public Builder setIsDelete(boolean value) {
-
- isDelete_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bool is_delete = 4;
- */
- public Builder clearIsDelete() {
-
- isDelete_ = false;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:queryresult.KeyModification)
- }
-
- // @@protoc_insertion_point(class_scope:queryresult.KeyModification)
- private static final org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification();
- }
-
- public static org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public KeyModification parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new KeyModification(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.ledger.queryresult.KvQueryResult.KeyModification getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_queryresult_KV_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_queryresult_KV_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_queryresult_KeyModification_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_queryresult_KeyModification_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n(ledger/queryresult/kv_query_result.pro" +
- "to\022\013queryresult\032\037google/protobuf/timesta" +
- "mp.proto\"3\n\002KV\022\021\n\tnamespace\030\001 \001(\t\022\013\n\003key" +
- "\030\002 \001(\t\022\r\n\005value\030\003 \001(\014\"q\n\017KeyModification" +
- "\022\r\n\005tx_id\030\001 \001(\t\022\r\n\005value\030\002 \001(\014\022-\n\ttimest" +
- "amp\030\003 \001(\0132\032.google.protobuf.Timestamp\022\021\n" +
- "\tis_delete\030\004 \001(\010Bk\n0org.hyperledger.fabr" +
- "ic.protos.ledger.queryresultZ7github.com" +
- "/hyperledger/fabric/protos/ledger/queryr" +
- "esultb\006proto3"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.TimestampProto.getDescriptor(),
- }, assigner);
- internal_static_queryresult_KV_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_queryresult_KV_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_queryresult_KV_descriptor,
- new java.lang.String[] { "Namespace", "Key", "Value", });
- internal_static_queryresult_KeyModification_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_queryresult_KeyModification_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_queryresult_KeyModification_descriptor,
- new java.lang.String[] { "TxId", "Value", "Timestamp", "IsDelete", });
- com.google.protobuf.TimestampProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/Chaincode.java b/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/Chaincode.java
deleted file mode 100644
index 36343c83c..000000000
--- a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/Chaincode.java
+++ /dev/null
@@ -1,4909 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: peer/chaincode.proto
-
-package org.hyperledger.fabric.protos.peer;
-
-public final class Chaincode {
- private Chaincode() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- /**
- *
- * Confidentiality Levels
- *
- *
- * Protobuf enum {@code protos.ConfidentialityLevel}
- */
- public enum ConfidentialityLevel
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * PUBLIC = 0;
- */
- PUBLIC(0),
- /**
- * CONFIDENTIAL = 1;
- */
- CONFIDENTIAL(1),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * PUBLIC = 0;
- */
- public static final int PUBLIC_VALUE = 0;
- /**
- * CONFIDENTIAL = 1;
- */
- public static final int CONFIDENTIAL_VALUE = 1;
-
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static ConfidentialityLevel valueOf(int value) {
- return forNumber(value);
- }
-
- public static ConfidentialityLevel forNumber(int value) {
- switch (value) {
- case 0: return PUBLIC;
- case 1: return CONFIDENTIAL;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- ConfidentialityLevel> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public ConfidentialityLevel findValueByNumber(int number) {
- return ConfidentialityLevel.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final ConfidentialityLevel[] VALUES = values();
-
- public static ConfidentialityLevel valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- if (desc.getIndex() == -1) {
- return UNRECOGNIZED;
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private ConfidentialityLevel(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:protos.ConfidentialityLevel)
- }
-
- public interface ChaincodeIDOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.ChaincodeID)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- java.lang.String getPath();
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- com.google.protobuf.ByteString
- getPathBytes();
-
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- java.lang.String getName();
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- java.lang.String getVersion();
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- com.google.protobuf.ByteString
- getVersionBytes();
- }
- /**
- *
- *ChaincodeID contains the path as specified by the deploy transaction
- *that created it as well as the hashCode that is generated by the
- *system for the path. From the user level (ie, CLI, REST API and so on)
- *deploy transaction is expected to provide the path and other requests
- *are expected to provide the hashCode. The other value will be ignored.
- *Internally, the structure could contain both values. For instance, the
- *hashCode will be set when first generated using the path
- *
- *
- * Protobuf type {@code protos.ChaincodeID}
- */
- public static final class ChaincodeID extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.ChaincodeID)
- ChaincodeIDOrBuilder {
- // Use ChaincodeID.newBuilder() to construct.
- private ChaincodeID(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChaincodeID() {
- path_ = "";
- name_ = "";
- version_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChaincodeID(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- path_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- version_ = s;
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder.class);
- }
-
- public static final int PATH_FIELD_NUMBER = 1;
- private volatile java.lang.Object path_;
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- public java.lang.String getPath() {
- java.lang.Object ref = path_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- path_ = s;
- return s;
- }
- }
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- public com.google.protobuf.ByteString
- getPathBytes() {
- java.lang.Object ref = path_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- path_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int NAME_FIELD_NUMBER = 2;
- private volatile java.lang.Object name_;
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int VERSION_FIELD_NUMBER = 3;
- private volatile java.lang.Object version_;
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- public java.lang.String getVersion() {
- java.lang.Object ref = version_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- version_ = s;
- return s;
- }
- }
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- public com.google.protobuf.ByteString
- getVersionBytes() {
- java.lang.Object ref = version_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- version_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getPathBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_);
- }
- if (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
- }
- if (!getVersionBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getPathBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_);
- }
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
- }
- if (!getVersionBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID) obj;
-
- boolean result = true;
- result = result && getPath()
- .equals(other.getPath());
- result = result && getName()
- .equals(other.getName());
- result = result && getVersion()
- .equals(other.getVersion());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + PATH_FIELD_NUMBER;
- hash = (53 * hash) + getPath().hashCode();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + VERSION_FIELD_NUMBER;
- hash = (53 * hash) + getVersion().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- *ChaincodeID contains the path as specified by the deploy transaction
- *that created it as well as the hashCode that is generated by the
- *system for the path. From the user level (ie, CLI, REST API and so on)
- *deploy transaction is expected to provide the path and other requests
- *are expected to provide the hashCode. The other value will be ignored.
- *Internally, the structure could contain both values. For instance, the
- *hashCode will be set when first generated using the path
- *
- *
- * Protobuf type {@code protos.ChaincodeID}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.ChaincodeID)
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- path_ = "";
-
- name_ = "";
-
- version_ = "";
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID build() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID buildPartial() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID(this);
- result.path_ = path_;
- result.name_ = name_;
- result.version_ = version_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID other) {
- if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance()) return this;
- if (!other.getPath().isEmpty()) {
- path_ = other.path_;
- onChanged();
- }
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- if (!other.getVersion().isEmpty()) {
- version_ = other.version_;
- onChanged();
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object path_ = "";
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- public java.lang.String getPath() {
- java.lang.Object ref = path_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- path_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- public com.google.protobuf.ByteString
- getPathBytes() {
- java.lang.Object ref = path_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- path_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- public Builder setPath(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- path_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- public Builder clearPath() {
-
- path_ = getDefaultInstance().getPath();
- onChanged();
- return this;
- }
- /**
- *
- *deploy transaction will use the path
- *
- *
- * optional string path = 1;
- */
- public Builder setPathBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- path_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object name_ = "";
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- public Builder setName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- *
- *all other requests will use the name (really a hashcode) generated by
- *the deploy transaction
- *
- *
- * optional string name = 2;
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object version_ = "";
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- public java.lang.String getVersion() {
- java.lang.Object ref = version_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- version_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- public com.google.protobuf.ByteString
- getVersionBytes() {
- java.lang.Object ref = version_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- version_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- public Builder setVersion(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- version_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- public Builder clearVersion() {
-
- version_ = getDefaultInstance().getVersion();
- onChanged();
- return this;
- }
- /**
- *
- *user friendly version name for the chaincode
- *
- *
- * optional string version = 3;
- */
- public Builder setVersionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- version_ = value;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.ChaincodeID)
- }
-
- // @@protoc_insertion_point(class_scope:protos.ChaincodeID)
- private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID();
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChaincodeID parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChaincodeID(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ChaincodeInputOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.ChaincodeInput)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated bytes args = 1;
- */
- java.util.List getArgsList();
- /**
- * repeated bytes args = 1;
- */
- int getArgsCount();
- /**
- * repeated bytes args = 1;
- */
- com.google.protobuf.ByteString getArgs(int index);
-
- /**
- * map<string, bytes> decorations = 2;
- */
- int getDecorationsCount();
- /**
- * map<string, bytes> decorations = 2;
- */
- boolean containsDecorations(
- java.lang.String key);
- /**
- * Use {@link #getDecorationsMap()} instead.
- */
- @java.lang.Deprecated
- java.util.Map
- getDecorations();
- /**
- * map<string, bytes> decorations = 2;
- */
- java.util.Map
- getDecorationsMap();
- /**
- * map<string, bytes> decorations = 2;
- */
-
- com.google.protobuf.ByteString getDecorationsOrDefault(
- java.lang.String key,
- com.google.protobuf.ByteString defaultValue);
- /**
- * map<string, bytes> decorations = 2;
- */
-
- com.google.protobuf.ByteString getDecorationsOrThrow(
- java.lang.String key);
- }
- /**
- *
- * Carries the chaincode function and its arguments.
- * UnmarshalJSON in transaction.go converts the string-based REST/JSON input to
- * the []byte-based current ChaincodeInput structure.
- *
- *
- * Protobuf type {@code protos.ChaincodeInput}
- */
- public static final class ChaincodeInput extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.ChaincodeInput)
- ChaincodeInputOrBuilder {
- // Use ChaincodeInput.newBuilder() to construct.
- private ChaincodeInput(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChaincodeInput() {
- args_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChaincodeInput(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- args_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- args_.add(input.readBytes());
- break;
- }
- case 18: {
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
- decorations_ = com.google.protobuf.MapField.newMapField(
- DecorationsDefaultEntryHolder.defaultEntry);
- mutable_bitField0_ |= 0x00000002;
- }
- com.google.protobuf.MapEntry
- decorations = input.readMessage(
- DecorationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
- decorations_.getMutableMap().put(decorations.getKey(), decorations.getValue());
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- args_ = java.util.Collections.unmodifiableList(args_);
- }
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_descriptor;
- }
-
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMapField(
- int number) {
- switch (number) {
- case 2:
- return internalGetDecorations();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder.class);
- }
-
- public static final int ARGS_FIELD_NUMBER = 1;
- private java.util.List args_;
- /**
- * repeated bytes args = 1;
- */
- public java.util.List
- getArgsList() {
- return args_;
- }
- /**
- * repeated bytes args = 1;
- */
- public int getArgsCount() {
- return args_.size();
- }
- /**
- * repeated bytes args = 1;
- */
- public com.google.protobuf.ByteString getArgs(int index) {
- return args_.get(index);
- }
-
- public static final int DECORATIONS_FIELD_NUMBER = 2;
- private static final class DecorationsDefaultEntryHolder {
- static final com.google.protobuf.MapEntry<
- java.lang.String, com.google.protobuf.ByteString> defaultEntry =
- com.google.protobuf.MapEntry
- .newDefaultInstance(
- org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor,
- com.google.protobuf.WireFormat.FieldType.STRING,
- "",
- com.google.protobuf.WireFormat.FieldType.BYTES,
- com.google.protobuf.ByteString.EMPTY);
- }
- private com.google.protobuf.MapField<
- java.lang.String, com.google.protobuf.ByteString> decorations_;
- private com.google.protobuf.MapField
- internalGetDecorations() {
- if (decorations_ == null) {
- return com.google.protobuf.MapField.emptyMapField(
- DecorationsDefaultEntryHolder.defaultEntry);
- }
- return decorations_;
- }
-
- public int getDecorationsCount() {
- return internalGetDecorations().getMap().size();
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public boolean containsDecorations(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- return internalGetDecorations().getMap().containsKey(key);
- }
- /**
- * Use {@link #getDecorationsMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Map getDecorations() {
- return getDecorationsMap();
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public java.util.Map getDecorationsMap() {
- return internalGetDecorations().getMap();
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public com.google.protobuf.ByteString getDecorationsOrDefault(
- java.lang.String key,
- com.google.protobuf.ByteString defaultValue) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetDecorations().getMap();
- return map.containsKey(key) ? map.get(key) : defaultValue;
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public com.google.protobuf.ByteString getDecorationsOrThrow(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetDecorations().getMap();
- if (!map.containsKey(key)) {
- throw new java.lang.IllegalArgumentException();
- }
- return map.get(key);
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < args_.size(); i++) {
- output.writeBytes(1, args_.get(i));
- }
- for (java.util.Map.Entry entry
- : internalGetDecorations().getMap().entrySet()) {
- com.google.protobuf.MapEntry
- decorations = DecorationsDefaultEntryHolder.defaultEntry.newBuilderForType()
- .setKey(entry.getKey())
- .setValue(entry.getValue())
- .build();
- output.writeMessage(2, decorations);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int i = 0; i < args_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(args_.get(i));
- }
- size += dataSize;
- size += 1 * getArgsList().size();
- }
- for (java.util.Map.Entry entry
- : internalGetDecorations().getMap().entrySet()) {
- com.google.protobuf.MapEntry
- decorations = DecorationsDefaultEntryHolder.defaultEntry.newBuilderForType()
- .setKey(entry.getKey())
- .setValue(entry.getValue())
- .build();
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, decorations);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput) obj;
-
- boolean result = true;
- result = result && getArgsList()
- .equals(other.getArgsList());
- result = result && internalGetDecorations().equals(
- other.internalGetDecorations());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (getArgsCount() > 0) {
- hash = (37 * hash) + ARGS_FIELD_NUMBER;
- hash = (53 * hash) + getArgsList().hashCode();
- }
- if (!internalGetDecorations().getMap().isEmpty()) {
- hash = (37 * hash) + DECORATIONS_FIELD_NUMBER;
- hash = (53 * hash) + internalGetDecorations().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Carries the chaincode function and its arguments.
- * UnmarshalJSON in transaction.go converts the string-based REST/JSON input to
- * the []byte-based current ChaincodeInput structure.
- *
- *
- * Protobuf type {@code protos.ChaincodeInput}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.ChaincodeInput)
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_descriptor;
- }
-
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMapField(
- int number) {
- switch (number) {
- case 2:
- return internalGetDecorations();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMutableMapField(
- int number) {
- switch (number) {
- case 2:
- return internalGetMutableDecorations();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- args_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- internalGetMutableDecorations().clear();
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput build() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput buildPartial() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput(this);
- int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- args_ = java.util.Collections.unmodifiableList(args_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.args_ = args_;
- result.decorations_ = internalGetDecorations();
- result.decorations_.makeImmutable();
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput other) {
- if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance()) return this;
- if (!other.args_.isEmpty()) {
- if (args_.isEmpty()) {
- args_ = other.args_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureArgsIsMutable();
- args_.addAll(other.args_);
- }
- onChanged();
- }
- internalGetMutableDecorations().mergeFrom(
- other.internalGetDecorations());
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List args_ = java.util.Collections.emptyList();
- private void ensureArgsIsMutable() {
- if (!((bitField0_ & 0x00000001) == 0x00000001)) {
- args_ = new java.util.ArrayList(args_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- * repeated bytes args = 1;
- */
- public java.util.List
- getArgsList() {
- return java.util.Collections.unmodifiableList(args_);
- }
- /**
- * repeated bytes args = 1;
- */
- public int getArgsCount() {
- return args_.size();
- }
- /**
- * repeated bytes args = 1;
- */
- public com.google.protobuf.ByteString getArgs(int index) {
- return args_.get(index);
- }
- /**
- * repeated bytes args = 1;
- */
- public Builder setArgs(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureArgsIsMutable();
- args_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes args = 1;
- */
- public Builder addArgs(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureArgsIsMutable();
- args_.add(value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes args = 1;
- */
- public Builder addAllArgs(
- java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureArgsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, args_);
- onChanged();
- return this;
- }
- /**
- * repeated bytes args = 1;
- */
- public Builder clearArgs() {
- args_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.MapField<
- java.lang.String, com.google.protobuf.ByteString> decorations_;
- private com.google.protobuf.MapField
- internalGetDecorations() {
- if (decorations_ == null) {
- return com.google.protobuf.MapField.emptyMapField(
- DecorationsDefaultEntryHolder.defaultEntry);
- }
- return decorations_;
- }
- private com.google.protobuf.MapField
- internalGetMutableDecorations() {
- onChanged();;
- if (decorations_ == null) {
- decorations_ = com.google.protobuf.MapField.newMapField(
- DecorationsDefaultEntryHolder.defaultEntry);
- }
- if (!decorations_.isMutable()) {
- decorations_ = decorations_.copy();
- }
- return decorations_;
- }
-
- public int getDecorationsCount() {
- return internalGetDecorations().getMap().size();
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public boolean containsDecorations(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- return internalGetDecorations().getMap().containsKey(key);
- }
- /**
- * Use {@link #getDecorationsMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Map getDecorations() {
- return getDecorationsMap();
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public java.util.Map getDecorationsMap() {
- return internalGetDecorations().getMap();
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public com.google.protobuf.ByteString getDecorationsOrDefault(
- java.lang.String key,
- com.google.protobuf.ByteString defaultValue) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetDecorations().getMap();
- return map.containsKey(key) ? map.get(key) : defaultValue;
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public com.google.protobuf.ByteString getDecorationsOrThrow(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetDecorations().getMap();
- if (!map.containsKey(key)) {
- throw new java.lang.IllegalArgumentException();
- }
- return map.get(key);
- }
-
- public Builder clearDecorations() {
- getMutableDecorations().clear();
- return this;
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public Builder removeDecorations(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- getMutableDecorations().remove(key);
- return this;
- }
- /**
- * Use alternate mutation accessors instead.
- */
- @java.lang.Deprecated
- public java.util.Map
- getMutableDecorations() {
- return internalGetMutableDecorations().getMutableMap();
- }
- /**
- * map<string, bytes> decorations = 2;
- */
- public Builder putDecorations(
- java.lang.String key,
- com.google.protobuf.ByteString value) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- if (value == null) { throw new java.lang.NullPointerException(); }
- getMutableDecorations().put(key, value);
- return this;
- }
- /**
- * map<string, bytes> decorations = 2;
- */
-
- public Builder putAllDecorations(
- java.util.Map values) {
- getMutableDecorations().putAll(values);
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.ChaincodeInput)
- }
-
- // @@protoc_insertion_point(class_scope:protos.ChaincodeInput)
- private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput();
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChaincodeInput parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChaincodeInput(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ChaincodeSpecOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.ChaincodeSpec)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- int getTypeValue();
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType();
-
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- boolean hasChaincodeId();
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId();
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder();
-
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- boolean hasInput();
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getInput();
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder getInputOrBuilder();
-
- /**
- * optional int32 timeout = 4;
- */
- int getTimeout();
- }
- /**
- *
- * Carries the chaincode specification. This is the actual metadata required for
- * defining a chaincode.
- *
- *
- * Protobuf type {@code protos.ChaincodeSpec}
- */
- public static final class ChaincodeSpec extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.ChaincodeSpec)
- ChaincodeSpecOrBuilder {
- // Use ChaincodeSpec.newBuilder() to construct.
- private ChaincodeSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChaincodeSpec() {
- type_ = 0;
- timeout_ = 0;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChaincodeSpec(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- int rawValue = input.readEnum();
-
- type_ = rawValue;
- break;
- }
- case 18: {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder subBuilder = null;
- if (chaincodeId_ != null) {
- subBuilder = chaincodeId_.toBuilder();
- }
- chaincodeId_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(chaincodeId_);
- chaincodeId_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26: {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder subBuilder = null;
- if (input_ != null) {
- subBuilder = input_.toBuilder();
- }
- input_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(input_);
- input_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 32: {
-
- timeout_ = input.readInt32();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder.class);
- }
-
- /**
- * Protobuf enum {@code protos.ChaincodeSpec.Type}
- */
- public enum Type
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * UNDEFINED = 0;
- */
- UNDEFINED(0),
- /**
- * GOLANG = 1;
- */
- GOLANG(1),
- /**
- * NODE = 2;
- */
- NODE(2),
- /**
- * CAR = 3;
- */
- CAR(3),
- /**
- * JAVA = 4;
- */
- JAVA(4),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * UNDEFINED = 0;
- */
- public static final int UNDEFINED_VALUE = 0;
- /**
- * GOLANG = 1;
- */
- public static final int GOLANG_VALUE = 1;
- /**
- * NODE = 2;
- */
- public static final int NODE_VALUE = 2;
- /**
- * CAR = 3;
- */
- public static final int CAR_VALUE = 3;
- /**
- * JAVA = 4;
- */
- public static final int JAVA_VALUE = 4;
-
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static Type valueOf(int value) {
- return forNumber(value);
- }
-
- public static Type forNumber(int value) {
- switch (value) {
- case 0: return UNDEFINED;
- case 1: return GOLANG;
- case 2: return NODE;
- case 3: return CAR;
- case 4: return JAVA;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- Type> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public Type findValueByNumber(int number) {
- return Type.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Type[] VALUES = values();
-
- public static Type valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- if (desc.getIndex() == -1) {
- return UNRECOGNIZED;
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private Type(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:protos.ChaincodeSpec.Type)
- }
-
- public static final int TYPE_FIELD_NUMBER = 1;
- private int type_;
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- public int getTypeValue() {
- return type_;
- }
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.valueOf(type_);
- return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNRECOGNIZED : result;
- }
-
- public static final int CHAINCODE_ID_FIELD_NUMBER = 2;
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_;
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public boolean hasChaincodeId() {
- return chaincodeId_ != null;
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
- return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
- return getChaincodeId();
- }
-
- public static final int INPUT_FIELD_NUMBER = 3;
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput input_;
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public boolean hasInput() {
- return input_ != null;
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getInput() {
- return input_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance() : input_;
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder getInputOrBuilder() {
- return getInput();
- }
-
- public static final int TIMEOUT_FIELD_NUMBER = 4;
- private int timeout_;
- /**
- * optional int32 timeout = 4;
- */
- public int getTimeout() {
- return timeout_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (type_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNDEFINED.getNumber()) {
- output.writeEnum(1, type_);
- }
- if (chaincodeId_ != null) {
- output.writeMessage(2, getChaincodeId());
- }
- if (input_ != null) {
- output.writeMessage(3, getInput());
- }
- if (timeout_ != 0) {
- output.writeInt32(4, timeout_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (type_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNDEFINED.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, type_);
- }
- if (chaincodeId_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getChaincodeId());
- }
- if (input_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getInput());
- }
- if (timeout_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(4, timeout_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) obj;
-
- boolean result = true;
- result = result && type_ == other.type_;
- result = result && (hasChaincodeId() == other.hasChaincodeId());
- if (hasChaincodeId()) {
- result = result && getChaincodeId()
- .equals(other.getChaincodeId());
- }
- result = result && (hasInput() == other.hasInput());
- if (hasInput()) {
- result = result && getInput()
- .equals(other.getInput());
- }
- result = result && (getTimeout()
- == other.getTimeout());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + type_;
- if (hasChaincodeId()) {
- hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER;
- hash = (53 * hash) + getChaincodeId().hashCode();
- }
- if (hasInput()) {
- hash = (37 * hash) + INPUT_FIELD_NUMBER;
- hash = (53 * hash) + getInput().hashCode();
- }
- hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
- hash = (53 * hash) + getTimeout();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Carries the chaincode specification. This is the actual metadata required for
- * defining a chaincode.
- *
- *
- * Protobuf type {@code protos.ChaincodeSpec}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.ChaincodeSpec)
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- type_ = 0;
-
- if (chaincodeIdBuilder_ == null) {
- chaincodeId_ = null;
- } else {
- chaincodeId_ = null;
- chaincodeIdBuilder_ = null;
- }
- if (inputBuilder_ == null) {
- input_ = null;
- } else {
- input_ = null;
- inputBuilder_ = null;
- }
- timeout_ = 0;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec build() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec buildPartial() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec(this);
- result.type_ = type_;
- if (chaincodeIdBuilder_ == null) {
- result.chaincodeId_ = chaincodeId_;
- } else {
- result.chaincodeId_ = chaincodeIdBuilder_.build();
- }
- if (inputBuilder_ == null) {
- result.input_ = input_;
- } else {
- result.input_ = inputBuilder_.build();
- }
- result.timeout_ = timeout_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other) {
- if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance()) return this;
- if (other.type_ != 0) {
- setTypeValue(other.getTypeValue());
- }
- if (other.hasChaincodeId()) {
- mergeChaincodeId(other.getChaincodeId());
- }
- if (other.hasInput()) {
- mergeInput(other.getInput());
- }
- if (other.getTimeout() != 0) {
- setTimeout(other.getTimeout());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int type_ = 0;
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- public int getTypeValue() {
- return type_;
- }
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- public Builder setTypeValue(int value) {
- type_ = value;
- onChanged();
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.valueOf(type_);
- return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNRECOGNIZED : result;
- }
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- public Builder setType(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- type_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec.Type type = 1;
- */
- public Builder clearType() {
-
- type_ = 0;
- onChanged();
- return this;
- }
-
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder> chaincodeIdBuilder_;
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public boolean hasChaincodeId() {
- return chaincodeIdBuilder_ != null || chaincodeId_ != null;
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
- if (chaincodeIdBuilder_ == null) {
- return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
- } else {
- return chaincodeIdBuilder_.getMessage();
- }
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public Builder setChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
- if (chaincodeIdBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- chaincodeId_ = value;
- onChanged();
- } else {
- chaincodeIdBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public Builder setChaincodeId(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder builderForValue) {
- if (chaincodeIdBuilder_ == null) {
- chaincodeId_ = builderForValue.build();
- onChanged();
- } else {
- chaincodeIdBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
- if (chaincodeIdBuilder_ == null) {
- if (chaincodeId_ != null) {
- chaincodeId_ =
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial();
- } else {
- chaincodeId_ = value;
- }
- onChanged();
- } else {
- chaincodeIdBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public Builder clearChaincodeId() {
- if (chaincodeIdBuilder_ == null) {
- chaincodeId_ = null;
- onChanged();
- } else {
- chaincodeId_ = null;
- chaincodeIdBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder getChaincodeIdBuilder() {
-
- onChanged();
- return getChaincodeIdFieldBuilder().getBuilder();
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
- if (chaincodeIdBuilder_ != null) {
- return chaincodeIdBuilder_.getMessageOrBuilder();
- } else {
- return chaincodeId_ == null ?
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
- }
- }
- /**
- * optional .protos.ChaincodeID chaincode_id = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>
- getChaincodeIdFieldBuilder() {
- if (chaincodeIdBuilder_ == null) {
- chaincodeIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>(
- getChaincodeId(),
- getParentForChildren(),
- isClean());
- chaincodeId_ = null;
- }
- return chaincodeIdBuilder_;
- }
-
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput input_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder> inputBuilder_;
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public boolean hasInput() {
- return inputBuilder_ != null || input_ != null;
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getInput() {
- if (inputBuilder_ == null) {
- return input_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance() : input_;
- } else {
- return inputBuilder_.getMessage();
- }
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public Builder setInput(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput value) {
- if (inputBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- input_ = value;
- onChanged();
- } else {
- inputBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public Builder setInput(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder builderForValue) {
- if (inputBuilder_ == null) {
- input_ = builderForValue.build();
- onChanged();
- } else {
- inputBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public Builder mergeInput(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput value) {
- if (inputBuilder_ == null) {
- if (input_ != null) {
- input_ =
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.newBuilder(input_).mergeFrom(value).buildPartial();
- } else {
- input_ = value;
- }
- onChanged();
- } else {
- inputBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public Builder clearInput() {
- if (inputBuilder_ == null) {
- input_ = null;
- onChanged();
- } else {
- input_ = null;
- inputBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder getInputBuilder() {
-
- onChanged();
- return getInputFieldBuilder().getBuilder();
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder getInputOrBuilder() {
- if (inputBuilder_ != null) {
- return inputBuilder_.getMessageOrBuilder();
- } else {
- return input_ == null ?
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance() : input_;
- }
- }
- /**
- * optional .protos.ChaincodeInput input = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder>
- getInputFieldBuilder() {
- if (inputBuilder_ == null) {
- inputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder>(
- getInput(),
- getParentForChildren(),
- isClean());
- input_ = null;
- }
- return inputBuilder_;
- }
-
- private int timeout_ ;
- /**
- * optional int32 timeout = 4;
- */
- public int getTimeout() {
- return timeout_;
- }
- /**
- * optional int32 timeout = 4;
- */
- public Builder setTimeout(int value) {
-
- timeout_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int32 timeout = 4;
- */
- public Builder clearTimeout() {
-
- timeout_ = 0;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.ChaincodeSpec)
- }
-
- // @@protoc_insertion_point(class_scope:protos.ChaincodeSpec)
- private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec();
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChaincodeSpec parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChaincodeSpec(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ChaincodeDeploymentSpecOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.ChaincodeDeploymentSpec)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- boolean hasChaincodeSpec();
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec();
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder();
-
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- boolean hasEffectiveDate();
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- com.google.protobuf.Timestamp getEffectiveDate();
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- com.google.protobuf.TimestampOrBuilder getEffectiveDateOrBuilder();
-
- /**
- * optional bytes code_package = 3;
- */
- com.google.protobuf.ByteString getCodePackage();
-
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- int getExecEnvValue();
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment getExecEnv();
- }
- /**
- *
- * Specify the deployment of a chaincode.
- * TODO: Define `codePackage`.
- *
- *
- * Protobuf type {@code protos.ChaincodeDeploymentSpec}
- */
- public static final class ChaincodeDeploymentSpec extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.ChaincodeDeploymentSpec)
- ChaincodeDeploymentSpecOrBuilder {
- // Use ChaincodeDeploymentSpec.newBuilder() to construct.
- private ChaincodeDeploymentSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChaincodeDeploymentSpec() {
- codePackage_ = com.google.protobuf.ByteString.EMPTY;
- execEnv_ = 0;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChaincodeDeploymentSpec(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder subBuilder = null;
- if (chaincodeSpec_ != null) {
- subBuilder = chaincodeSpec_.toBuilder();
- }
- chaincodeSpec_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(chaincodeSpec_);
- chaincodeSpec_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 18: {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (effectiveDate_ != null) {
- subBuilder = effectiveDate_.toBuilder();
- }
- effectiveDate_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(effectiveDate_);
- effectiveDate_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26: {
-
- codePackage_ = input.readBytes();
- break;
- }
- case 32: {
- int rawValue = input.readEnum();
-
- execEnv_ = rawValue;
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.Builder.class);
- }
-
- /**
- * Protobuf enum {@code protos.ChaincodeDeploymentSpec.ExecutionEnvironment}
- */
- public enum ExecutionEnvironment
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * DOCKER = 0;
- */
- DOCKER(0),
- /**
- * SYSTEM = 1;
- */
- SYSTEM(1),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * DOCKER = 0;
- */
- public static final int DOCKER_VALUE = 0;
- /**
- * SYSTEM = 1;
- */
- public static final int SYSTEM_VALUE = 1;
-
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static ExecutionEnvironment valueOf(int value) {
- return forNumber(value);
- }
-
- public static ExecutionEnvironment forNumber(int value) {
- switch (value) {
- case 0: return DOCKER;
- case 1: return SYSTEM;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- ExecutionEnvironment> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public ExecutionEnvironment findValueByNumber(int number) {
- return ExecutionEnvironment.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final ExecutionEnvironment[] VALUES = values();
-
- public static ExecutionEnvironment valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- if (desc.getIndex() == -1) {
- return UNRECOGNIZED;
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private ExecutionEnvironment(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:protos.ChaincodeDeploymentSpec.ExecutionEnvironment)
- }
-
- public static final int CHAINCODE_SPEC_FIELD_NUMBER = 1;
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_;
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public boolean hasChaincodeSpec() {
- return chaincodeSpec_ != null;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
- return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
- return getChaincodeSpec();
- }
-
- public static final int EFFECTIVE_DATE_FIELD_NUMBER = 2;
- private com.google.protobuf.Timestamp effectiveDate_;
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public boolean hasEffectiveDate() {
- return effectiveDate_ != null;
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public com.google.protobuf.Timestamp getEffectiveDate() {
- return effectiveDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : effectiveDate_;
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public com.google.protobuf.TimestampOrBuilder getEffectiveDateOrBuilder() {
- return getEffectiveDate();
- }
-
- public static final int CODE_PACKAGE_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString codePackage_;
- /**
- * optional bytes code_package = 3;
- */
- public com.google.protobuf.ByteString getCodePackage() {
- return codePackage_;
- }
-
- public static final int EXEC_ENV_FIELD_NUMBER = 4;
- private int execEnv_;
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- public int getExecEnvValue() {
- return execEnv_;
- }
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment getExecEnv() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.valueOf(execEnv_);
- return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.UNRECOGNIZED : result;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (chaincodeSpec_ != null) {
- output.writeMessage(1, getChaincodeSpec());
- }
- if (effectiveDate_ != null) {
- output.writeMessage(2, getEffectiveDate());
- }
- if (!codePackage_.isEmpty()) {
- output.writeBytes(3, codePackage_);
- }
- if (execEnv_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.DOCKER.getNumber()) {
- output.writeEnum(4, execEnv_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (chaincodeSpec_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getChaincodeSpec());
- }
- if (effectiveDate_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getEffectiveDate());
- }
- if (!codePackage_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, codePackage_);
- }
- if (execEnv_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.DOCKER.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(4, execEnv_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec) obj;
-
- boolean result = true;
- result = result && (hasChaincodeSpec() == other.hasChaincodeSpec());
- if (hasChaincodeSpec()) {
- result = result && getChaincodeSpec()
- .equals(other.getChaincodeSpec());
- }
- result = result && (hasEffectiveDate() == other.hasEffectiveDate());
- if (hasEffectiveDate()) {
- result = result && getEffectiveDate()
- .equals(other.getEffectiveDate());
- }
- result = result && getCodePackage()
- .equals(other.getCodePackage());
- result = result && execEnv_ == other.execEnv_;
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (hasChaincodeSpec()) {
- hash = (37 * hash) + CHAINCODE_SPEC_FIELD_NUMBER;
- hash = (53 * hash) + getChaincodeSpec().hashCode();
- }
- if (hasEffectiveDate()) {
- hash = (37 * hash) + EFFECTIVE_DATE_FIELD_NUMBER;
- hash = (53 * hash) + getEffectiveDate().hashCode();
- }
- hash = (37 * hash) + CODE_PACKAGE_FIELD_NUMBER;
- hash = (53 * hash) + getCodePackage().hashCode();
- hash = (37 * hash) + EXEC_ENV_FIELD_NUMBER;
- hash = (53 * hash) + execEnv_;
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Specify the deployment of a chaincode.
- * TODO: Define `codePackage`.
- *
- *
- * Protobuf type {@code protos.ChaincodeDeploymentSpec}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.ChaincodeDeploymentSpec)
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpecOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpec_ = null;
- } else {
- chaincodeSpec_ = null;
- chaincodeSpecBuilder_ = null;
- }
- if (effectiveDateBuilder_ == null) {
- effectiveDate_ = null;
- } else {
- effectiveDate_ = null;
- effectiveDateBuilder_ = null;
- }
- codePackage_ = com.google.protobuf.ByteString.EMPTY;
-
- execEnv_ = 0;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec build() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec buildPartial() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec(this);
- if (chaincodeSpecBuilder_ == null) {
- result.chaincodeSpec_ = chaincodeSpec_;
- } else {
- result.chaincodeSpec_ = chaincodeSpecBuilder_.build();
- }
- if (effectiveDateBuilder_ == null) {
- result.effectiveDate_ = effectiveDate_;
- } else {
- result.effectiveDate_ = effectiveDateBuilder_.build();
- }
- result.codePackage_ = codePackage_;
- result.execEnv_ = execEnv_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec other) {
- if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.getDefaultInstance()) return this;
- if (other.hasChaincodeSpec()) {
- mergeChaincodeSpec(other.getChaincodeSpec());
- }
- if (other.hasEffectiveDate()) {
- mergeEffectiveDate(other.getEffectiveDate());
- }
- if (other.getCodePackage() != com.google.protobuf.ByteString.EMPTY) {
- setCodePackage(other.getCodePackage());
- }
- if (other.execEnv_ != 0) {
- setExecEnvValue(other.getExecEnvValue());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder> chaincodeSpecBuilder_;
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public boolean hasChaincodeSpec() {
- return chaincodeSpecBuilder_ != null || chaincodeSpec_ != null;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
- if (chaincodeSpecBuilder_ == null) {
- return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
- } else {
- return chaincodeSpecBuilder_.getMessage();
- }
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder setChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
- if (chaincodeSpecBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- chaincodeSpec_ = value;
- onChanged();
- } else {
- chaincodeSpecBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder setChaincodeSpec(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder builderForValue) {
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpec_ = builderForValue.build();
- onChanged();
- } else {
- chaincodeSpecBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder mergeChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
- if (chaincodeSpecBuilder_ == null) {
- if (chaincodeSpec_ != null) {
- chaincodeSpec_ =
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.newBuilder(chaincodeSpec_).mergeFrom(value).buildPartial();
- } else {
- chaincodeSpec_ = value;
- }
- onChanged();
- } else {
- chaincodeSpecBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder clearChaincodeSpec() {
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpec_ = null;
- onChanged();
- } else {
- chaincodeSpec_ = null;
- chaincodeSpecBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder getChaincodeSpecBuilder() {
-
- onChanged();
- return getChaincodeSpecFieldBuilder().getBuilder();
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
- if (chaincodeSpecBuilder_ != null) {
- return chaincodeSpecBuilder_.getMessageOrBuilder();
- } else {
- return chaincodeSpec_ == null ?
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
- }
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>
- getChaincodeSpecFieldBuilder() {
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>(
- getChaincodeSpec(),
- getParentForChildren(),
- isClean());
- chaincodeSpec_ = null;
- }
- return chaincodeSpecBuilder_;
- }
-
- private com.google.protobuf.Timestamp effectiveDate_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> effectiveDateBuilder_;
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public boolean hasEffectiveDate() {
- return effectiveDateBuilder_ != null || effectiveDate_ != null;
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public com.google.protobuf.Timestamp getEffectiveDate() {
- if (effectiveDateBuilder_ == null) {
- return effectiveDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : effectiveDate_;
- } else {
- return effectiveDateBuilder_.getMessage();
- }
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public Builder setEffectiveDate(com.google.protobuf.Timestamp value) {
- if (effectiveDateBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- effectiveDate_ = value;
- onChanged();
- } else {
- effectiveDateBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public Builder setEffectiveDate(
- com.google.protobuf.Timestamp.Builder builderForValue) {
- if (effectiveDateBuilder_ == null) {
- effectiveDate_ = builderForValue.build();
- onChanged();
- } else {
- effectiveDateBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public Builder mergeEffectiveDate(com.google.protobuf.Timestamp value) {
- if (effectiveDateBuilder_ == null) {
- if (effectiveDate_ != null) {
- effectiveDate_ =
- com.google.protobuf.Timestamp.newBuilder(effectiveDate_).mergeFrom(value).buildPartial();
- } else {
- effectiveDate_ = value;
- }
- onChanged();
- } else {
- effectiveDateBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public Builder clearEffectiveDate() {
- if (effectiveDateBuilder_ == null) {
- effectiveDate_ = null;
- onChanged();
- } else {
- effectiveDate_ = null;
- effectiveDateBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public com.google.protobuf.Timestamp.Builder getEffectiveDateBuilder() {
-
- onChanged();
- return getEffectiveDateFieldBuilder().getBuilder();
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- public com.google.protobuf.TimestampOrBuilder getEffectiveDateOrBuilder() {
- if (effectiveDateBuilder_ != null) {
- return effectiveDateBuilder_.getMessageOrBuilder();
- } else {
- return effectiveDate_ == null ?
- com.google.protobuf.Timestamp.getDefaultInstance() : effectiveDate_;
- }
- }
- /**
- *
- * Controls when the chaincode becomes executable.
- *
- *
- * optional .google.protobuf.Timestamp effective_date = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
- getEffectiveDateFieldBuilder() {
- if (effectiveDateBuilder_ == null) {
- effectiveDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
- getEffectiveDate(),
- getParentForChildren(),
- isClean());
- effectiveDate_ = null;
- }
- return effectiveDateBuilder_;
- }
-
- private com.google.protobuf.ByteString codePackage_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes code_package = 3;
- */
- public com.google.protobuf.ByteString getCodePackage() {
- return codePackage_;
- }
- /**
- * optional bytes code_package = 3;
- */
- public Builder setCodePackage(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- codePackage_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes code_package = 3;
- */
- public Builder clearCodePackage() {
-
- codePackage_ = getDefaultInstance().getCodePackage();
- onChanged();
- return this;
- }
-
- private int execEnv_ = 0;
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- public int getExecEnvValue() {
- return execEnv_;
- }
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- public Builder setExecEnvValue(int value) {
- execEnv_ = value;
- onChanged();
- return this;
- }
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment getExecEnv() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.valueOf(execEnv_);
- return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.UNRECOGNIZED : result;
- }
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- public Builder setExecEnv(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- execEnv_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
- */
- public Builder clearExecEnv() {
-
- execEnv_ = 0;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.ChaincodeDeploymentSpec)
- }
-
- // @@protoc_insertion_point(class_scope:protos.ChaincodeDeploymentSpec)
- private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec();
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChaincodeDeploymentSpec parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChaincodeDeploymentSpec(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ChaincodeInvocationSpecOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.ChaincodeInvocationSpec)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- boolean hasChaincodeSpec();
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec();
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder();
-
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- java.lang.String getIdGenerationAlg();
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- com.google.protobuf.ByteString
- getIdGenerationAlgBytes();
- }
- /**
- *
- * Carries the chaincode function and its arguments.
- *
- *
- * Protobuf type {@code protos.ChaincodeInvocationSpec}
- */
- public static final class ChaincodeInvocationSpec extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.ChaincodeInvocationSpec)
- ChaincodeInvocationSpecOrBuilder {
- // Use ChaincodeInvocationSpec.newBuilder() to construct.
- private ChaincodeInvocationSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChaincodeInvocationSpec() {
- idGenerationAlg_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChaincodeInvocationSpec(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder subBuilder = null;
- if (chaincodeSpec_ != null) {
- subBuilder = chaincodeSpec_.toBuilder();
- }
- chaincodeSpec_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(chaincodeSpec_);
- chaincodeSpec_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- idGenerationAlg_ = s;
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.Builder.class);
- }
-
- public static final int CHAINCODE_SPEC_FIELD_NUMBER = 1;
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_;
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public boolean hasChaincodeSpec() {
- return chaincodeSpec_ != null;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
- return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
- return getChaincodeSpec();
- }
-
- public static final int ID_GENERATION_ALG_FIELD_NUMBER = 2;
- private volatile java.lang.Object idGenerationAlg_;
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- public java.lang.String getIdGenerationAlg() {
- java.lang.Object ref = idGenerationAlg_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- idGenerationAlg_ = s;
- return s;
- }
- }
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- public com.google.protobuf.ByteString
- getIdGenerationAlgBytes() {
- java.lang.Object ref = idGenerationAlg_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- idGenerationAlg_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (chaincodeSpec_ != null) {
- output.writeMessage(1, getChaincodeSpec());
- }
- if (!getIdGenerationAlgBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, idGenerationAlg_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (chaincodeSpec_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getChaincodeSpec());
- }
- if (!getIdGenerationAlgBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, idGenerationAlg_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec) obj;
-
- boolean result = true;
- result = result && (hasChaincodeSpec() == other.hasChaincodeSpec());
- if (hasChaincodeSpec()) {
- result = result && getChaincodeSpec()
- .equals(other.getChaincodeSpec());
- }
- result = result && getIdGenerationAlg()
- .equals(other.getIdGenerationAlg());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (hasChaincodeSpec()) {
- hash = (37 * hash) + CHAINCODE_SPEC_FIELD_NUMBER;
- hash = (53 * hash) + getChaincodeSpec().hashCode();
- }
- hash = (37 * hash) + ID_GENERATION_ALG_FIELD_NUMBER;
- hash = (53 * hash) + getIdGenerationAlg().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Carries the chaincode function and its arguments.
- *
- *
- * Protobuf type {@code protos.ChaincodeInvocationSpec}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.ChaincodeInvocationSpec)
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpecOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpec_ = null;
- } else {
- chaincodeSpec_ = null;
- chaincodeSpecBuilder_ = null;
- }
- idGenerationAlg_ = "";
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec build() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec buildPartial() {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec(this);
- if (chaincodeSpecBuilder_ == null) {
- result.chaincodeSpec_ = chaincodeSpec_;
- } else {
- result.chaincodeSpec_ = chaincodeSpecBuilder_.build();
- }
- result.idGenerationAlg_ = idGenerationAlg_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec other) {
- if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.getDefaultInstance()) return this;
- if (other.hasChaincodeSpec()) {
- mergeChaincodeSpec(other.getChaincodeSpec());
- }
- if (!other.getIdGenerationAlg().isEmpty()) {
- idGenerationAlg_ = other.idGenerationAlg_;
- onChanged();
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder> chaincodeSpecBuilder_;
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public boolean hasChaincodeSpec() {
- return chaincodeSpecBuilder_ != null || chaincodeSpec_ != null;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
- if (chaincodeSpecBuilder_ == null) {
- return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
- } else {
- return chaincodeSpecBuilder_.getMessage();
- }
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder setChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
- if (chaincodeSpecBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- chaincodeSpec_ = value;
- onChanged();
- } else {
- chaincodeSpecBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder setChaincodeSpec(
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder builderForValue) {
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpec_ = builderForValue.build();
- onChanged();
- } else {
- chaincodeSpecBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder mergeChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
- if (chaincodeSpecBuilder_ == null) {
- if (chaincodeSpec_ != null) {
- chaincodeSpec_ =
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.newBuilder(chaincodeSpec_).mergeFrom(value).buildPartial();
- } else {
- chaincodeSpec_ = value;
- }
- onChanged();
- } else {
- chaincodeSpecBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public Builder clearChaincodeSpec() {
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpec_ = null;
- onChanged();
- } else {
- chaincodeSpec_ = null;
- chaincodeSpecBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder getChaincodeSpecBuilder() {
-
- onChanged();
- return getChaincodeSpecFieldBuilder().getBuilder();
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
- if (chaincodeSpecBuilder_ != null) {
- return chaincodeSpecBuilder_.getMessageOrBuilder();
- } else {
- return chaincodeSpec_ == null ?
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
- }
- }
- /**
- * optional .protos.ChaincodeSpec chaincode_spec = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>
- getChaincodeSpecFieldBuilder() {
- if (chaincodeSpecBuilder_ == null) {
- chaincodeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>(
- getChaincodeSpec(),
- getParentForChildren(),
- isClean());
- chaincodeSpec_ = null;
- }
- return chaincodeSpecBuilder_;
- }
-
- private java.lang.Object idGenerationAlg_ = "";
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- public java.lang.String getIdGenerationAlg() {
- java.lang.Object ref = idGenerationAlg_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- idGenerationAlg_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- public com.google.protobuf.ByteString
- getIdGenerationAlgBytes() {
- java.lang.Object ref = idGenerationAlg_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- idGenerationAlg_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- public Builder setIdGenerationAlg(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- idGenerationAlg_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- public Builder clearIdGenerationAlg() {
-
- idGenerationAlg_ = getDefaultInstance().getIdGenerationAlg();
- onChanged();
- return this;
- }
- /**
- *
- * This field can contain a user-specified ID generation algorithm
- * If supplied, this will be used to generate a ID
- * If not supplied (left empty), sha256base64 will be used
- * The algorithm consists of two parts:
- * 1, a hash function
- * 2, a decoding used to decode user (string) input to bytes
- * Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
- *
- *
- * optional string id_generation_alg = 2;
- */
- public Builder setIdGenerationAlgBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- idGenerationAlg_ = value;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.ChaincodeInvocationSpec)
- }
-
- // @@protoc_insertion_point(class_scope:protos.ChaincodeInvocationSpec)
- private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec();
- }
-
- public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChaincodeInvocationSpec parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChaincodeInvocationSpec(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_protos_ChaincodeID_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_protos_ChaincodeID_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_protos_ChaincodeInput_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_protos_ChaincodeInput_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_protos_ChaincodeInput_DecorationsEntry_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_protos_ChaincodeSpec_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_protos_ChaincodeSpec_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_protos_ChaincodeDeploymentSpec_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_protos_ChaincodeInvocationSpec_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\024peer/chaincode.proto\022\006protos\032\037google/p" +
- "rotobuf/timestamp.proto\":\n\013ChaincodeID\022\014" +
- "\n\004path\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\017\n\007version\030\003 " +
- "\001(\t\"\220\001\n\016ChaincodeInput\022\014\n\004args\030\001 \003(\014\022<\n\013" +
- "decorations\030\002 \003(\0132\'.protos.ChaincodeInpu" +
- "t.DecorationsEntry\0322\n\020DecorationsEntry\022\013" +
- "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"\334\001\n\rChain" +
- "codeSpec\022(\n\004type\030\001 \001(\0162\032.protos.Chaincod" +
- "eSpec.Type\022)\n\014chaincode_id\030\002 \001(\0132\023.proto" +
- "s.ChaincodeID\022%\n\005input\030\003 \001(\0132\026.protos.Ch",
- "aincodeInput\022\017\n\007timeout\030\004 \001(\005\">\n\004Type\022\r\n" +
- "\tUNDEFINED\020\000\022\n\n\006GOLANG\020\001\022\010\n\004NODE\020\002\022\007\n\003CA" +
- "R\020\003\022\010\n\004JAVA\020\004\"\212\002\n\027ChaincodeDeploymentSpe" +
- "c\022-\n\016chaincode_spec\030\001 \001(\0132\025.protos.Chain" +
- "codeSpec\0222\n\016effective_date\030\002 \001(\0132\032.googl" +
- "e.protobuf.Timestamp\022\024\n\014code_package\030\003 \001" +
- "(\014\022F\n\010exec_env\030\004 \001(\01624.protos.ChaincodeD" +
- "eploymentSpec.ExecutionEnvironment\".\n\024Ex" +
- "ecutionEnvironment\022\n\n\006DOCKER\020\000\022\n\n\006SYSTEM" +
- "\020\001\"c\n\027ChaincodeInvocationSpec\022-\n\016chainco",
- "de_spec\030\001 \001(\0132\025.protos.ChaincodeSpec\022\031\n\021" +
- "id_generation_alg\030\002 \001(\t*4\n\024Confidentiali" +
- "tyLevel\022\n\n\006PUBLIC\020\000\022\020\n\014CONFIDENTIAL\020\001BO\n" +
- "\"org.hyperledger.fabric.protos.peerZ)git" +
- "hub.com/hyperledger/fabric/protos/peerb\006" +
- "proto3"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.TimestampProto.getDescriptor(),
- }, assigner);
- internal_static_protos_ChaincodeID_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_protos_ChaincodeID_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_protos_ChaincodeID_descriptor,
- new java.lang.String[] { "Path", "Name", "Version", });
- internal_static_protos_ChaincodeInput_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_protos_ChaincodeInput_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_protos_ChaincodeInput_descriptor,
- new java.lang.String[] { "Args", "Decorations", });
- internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor =
- internal_static_protos_ChaincodeInput_descriptor.getNestedTypes().get(0);
- internal_static_protos_ChaincodeInput_DecorationsEntry_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor,
- new java.lang.String[] { "Key", "Value", });
- internal_static_protos_ChaincodeSpec_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_protos_ChaincodeSpec_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_protos_ChaincodeSpec_descriptor,
- new java.lang.String[] { "Type", "ChaincodeId", "Input", "Timeout", });
- internal_static_protos_ChaincodeDeploymentSpec_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_protos_ChaincodeDeploymentSpec_descriptor,
- new java.lang.String[] { "ChaincodeSpec", "EffectiveDate", "CodePackage", "ExecEnv", });
- internal_static_protos_ChaincodeInvocationSpec_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_protos_ChaincodeInvocationSpec_descriptor,
- new java.lang.String[] { "ChaincodeSpec", "IdGenerationAlg", });
- com.google.protobuf.TimestampProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/ChaincodeEventPackage.java b/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/ChaincodeEventPackage.java
deleted file mode 100644
index a3a4ce962..000000000
--- a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/ChaincodeEventPackage.java
+++ /dev/null
@@ -1,912 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: peer/chaincode_event.proto
-
-package org.hyperledger.fabric.protos.peer;
-
-public final class ChaincodeEventPackage {
- private ChaincodeEventPackage() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- public interface ChaincodeEventOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.ChaincodeEvent)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional string chaincode_id = 1;
- */
- java.lang.String getChaincodeId();
- /**
- * optional string chaincode_id = 1;
- */
- com.google.protobuf.ByteString
- getChaincodeIdBytes();
-
- /**
- * optional string tx_id = 2;
- */
- java.lang.String getTxId();
- /**
- * optional string tx_id = 2;
- */
- com.google.protobuf.ByteString
- getTxIdBytes();
-
- /**
- * optional string event_name = 3;
- */
- java.lang.String getEventName();
- /**
- * optional string event_name = 3;
- */
- com.google.protobuf.ByteString
- getEventNameBytes();
-
- /**
- * optional bytes payload = 4;
- */
- com.google.protobuf.ByteString getPayload();
- }
- /**
- *
- *ChaincodeEvent is used for events and registrations that are specific to chaincode
- *string type - "chaincode"
- *
- *
- * Protobuf type {@code protos.ChaincodeEvent}
- */
- public static final class ChaincodeEvent extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.ChaincodeEvent)
- ChaincodeEventOrBuilder {
- // Use ChaincodeEvent.newBuilder() to construct.
- private ChaincodeEvent(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChaincodeEvent() {
- chaincodeId_ = "";
- txId_ = "";
- eventName_ = "";
- payload_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChaincodeEvent(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- chaincodeId_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- txId_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- eventName_ = s;
- break;
- }
- case 34: {
-
- payload_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.internal_static_protos_ChaincodeEvent_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.internal_static_protos_ChaincodeEvent_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.class, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder.class);
- }
-
- public static final int CHAINCODE_ID_FIELD_NUMBER = 1;
- private volatile java.lang.Object chaincodeId_;
- /**
- * optional string chaincode_id = 1;
- */
- public java.lang.String getChaincodeId() {
- java.lang.Object ref = chaincodeId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- chaincodeId_ = s;
- return s;
- }
- }
- /**
- * optional string chaincode_id = 1;
- */
- public com.google.protobuf.ByteString
- getChaincodeIdBytes() {
- java.lang.Object ref = chaincodeId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- chaincodeId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int TX_ID_FIELD_NUMBER = 2;
- private volatile java.lang.Object txId_;
- /**
- * optional string tx_id = 2;
- */
- public java.lang.String getTxId() {
- java.lang.Object ref = txId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txId_ = s;
- return s;
- }
- }
- /**
- * optional string tx_id = 2;
- */
- public com.google.protobuf.ByteString
- getTxIdBytes() {
- java.lang.Object ref = txId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int EVENT_NAME_FIELD_NUMBER = 3;
- private volatile java.lang.Object eventName_;
- /**
- * optional string event_name = 3;
- */
- public java.lang.String getEventName() {
- java.lang.Object ref = eventName_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- eventName_ = s;
- return s;
- }
- }
- /**
- * optional string event_name = 3;
- */
- public com.google.protobuf.ByteString
- getEventNameBytes() {
- java.lang.Object ref = eventName_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- eventName_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString payload_;
- /**
- * optional bytes payload = 4;
- */
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getChaincodeIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, chaincodeId_);
- }
- if (!getTxIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, txId_);
- }
- if (!getEventNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, eventName_);
- }
- if (!payload_.isEmpty()) {
- output.writeBytes(4, payload_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getChaincodeIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, chaincodeId_);
- }
- if (!getTxIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, txId_);
- }
- if (!getEventNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, eventName_);
- }
- if (!payload_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, payload_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent other = (org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent) obj;
-
- boolean result = true;
- result = result && getChaincodeId()
- .equals(other.getChaincodeId());
- result = result && getTxId()
- .equals(other.getTxId());
- result = result && getEventName()
- .equals(other.getEventName());
- result = result && getPayload()
- .equals(other.getPayload());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER;
- hash = (53 * hash) + getChaincodeId().hashCode();
- hash = (37 * hash) + TX_ID_FIELD_NUMBER;
- hash = (53 * hash) + getTxId().hashCode();
- hash = (37 * hash) + EVENT_NAME_FIELD_NUMBER;
- hash = (53 * hash) + getEventName().hashCode();
- hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- *ChaincodeEvent is used for events and registrations that are specific to chaincode
- *string type - "chaincode"
- *
- *
- * Protobuf type {@code protos.ChaincodeEvent}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.ChaincodeEvent)
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.internal_static_protos_ChaincodeEvent_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.internal_static_protos_ChaincodeEvent_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.class, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- chaincodeId_ = "";
-
- txId_ = "";
-
- eventName_ = "";
-
- payload_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.internal_static_protos_ChaincodeEvent_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent build() {
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent buildPartial() {
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent result = new org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent(this);
- result.chaincodeId_ = chaincodeId_;
- result.txId_ = txId_;
- result.eventName_ = eventName_;
- result.payload_ = payload_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent other) {
- if (other == org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance()) return this;
- if (!other.getChaincodeId().isEmpty()) {
- chaincodeId_ = other.chaincodeId_;
- onChanged();
- }
- if (!other.getTxId().isEmpty()) {
- txId_ = other.txId_;
- onChanged();
- }
- if (!other.getEventName().isEmpty()) {
- eventName_ = other.eventName_;
- onChanged();
- }
- if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
- setPayload(other.getPayload());
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object chaincodeId_ = "";
- /**
- * optional string chaincode_id = 1;
- */
- public java.lang.String getChaincodeId() {
- java.lang.Object ref = chaincodeId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- chaincodeId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string chaincode_id = 1;
- */
- public com.google.protobuf.ByteString
- getChaincodeIdBytes() {
- java.lang.Object ref = chaincodeId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- chaincodeId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string chaincode_id = 1;
- */
- public Builder setChaincodeId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- chaincodeId_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string chaincode_id = 1;
- */
- public Builder clearChaincodeId() {
-
- chaincodeId_ = getDefaultInstance().getChaincodeId();
- onChanged();
- return this;
- }
- /**
- * optional string chaincode_id = 1;
- */
- public Builder setChaincodeIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- chaincodeId_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object txId_ = "";
- /**
- * optional string tx_id = 2;
- */
- public java.lang.String getTxId() {
- java.lang.Object ref = txId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string tx_id = 2;
- */
- public com.google.protobuf.ByteString
- getTxIdBytes() {
- java.lang.Object ref = txId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string tx_id = 2;
- */
- public Builder setTxId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- txId_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string tx_id = 2;
- */
- public Builder clearTxId() {
-
- txId_ = getDefaultInstance().getTxId();
- onChanged();
- return this;
- }
- /**
- * optional string tx_id = 2;
- */
- public Builder setTxIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- txId_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object eventName_ = "";
- /**
- * optional string event_name = 3;
- */
- public java.lang.String getEventName() {
- java.lang.Object ref = eventName_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- eventName_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string event_name = 3;
- */
- public com.google.protobuf.ByteString
- getEventNameBytes() {
- java.lang.Object ref = eventName_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- eventName_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string event_name = 3;
- */
- public Builder setEventName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- eventName_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string event_name = 3;
- */
- public Builder clearEventName() {
-
- eventName_ = getDefaultInstance().getEventName();
- onChanged();
- return this;
- }
- /**
- * optional string event_name = 3;
- */
- public Builder setEventNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- eventName_ = value;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes payload = 4;
- */
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
- /**
- * optional bytes payload = 4;
- */
- public Builder setPayload(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- payload_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes payload = 4;
- */
- public Builder clearPayload() {
-
- payload_ = getDefaultInstance().getPayload();
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.ChaincodeEvent)
- }
-
- // @@protoc_insertion_point(class_scope:protos.ChaincodeEvent)
- private static final org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent();
- }
-
- public static org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChaincodeEvent parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChaincodeEvent(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_protos_ChaincodeEvent_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_protos_ChaincodeEvent_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\032peer/chaincode_event.proto\022\006protos\"Z\n\016" +
- "ChaincodeEvent\022\024\n\014chaincode_id\030\001 \001(\t\022\r\n\005" +
- "tx_id\030\002 \001(\t\022\022\n\nevent_name\030\003 \001(\t\022\017\n\007paylo" +
- "ad\030\004 \001(\014Bf\n\"org.hyperledger.fabric.proto" +
- "s.peerB\025ChaincodeEventPackageZ)github.co" +
- "m/hyperledger/fabric/protos/peerb\006proto3"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
- internal_static_protos_ChaincodeEvent_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_protos_ChaincodeEvent_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_protos_ChaincodeEvent_descriptor,
- new java.lang.String[] { "ChaincodeId", "TxId", "EventName", "Payload", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/ChaincodeShim.java b/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/ChaincodeShim.java
deleted file mode 100644
index 10e52427d..000000000
--- a/fabric-chaincode-protos/src/main/java/org/hyperledger/fabric/protos/peer/ChaincodeShim.java
+++ /dev/null
@@ -1,8244 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: peer/chaincode_shim.proto
-
-package org.hyperledger.fabric.protos.peer;
-
-public final class ChaincodeShim {
- private ChaincodeShim() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- public interface ChaincodeMessageOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.ChaincodeMessage)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- int getTypeValue();
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType();
-
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- boolean hasTimestamp();
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- com.google.protobuf.Timestamp getTimestamp();
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
-
- /**
- * optional bytes payload = 3;
- */
- com.google.protobuf.ByteString getPayload();
-
- /**
- * optional string txid = 4;
- */
- java.lang.String getTxid();
- /**
- * optional string txid = 4;
- */
- com.google.protobuf.ByteString
- getTxidBytes();
-
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- boolean hasProposal();
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getProposal();
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder getProposalOrBuilder();
-
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- boolean hasChaincodeEvent();
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getChaincodeEvent();
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder();
-
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- java.lang.String getChannelId();
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- com.google.protobuf.ByteString
- getChannelIdBytes();
- }
- /**
- * Protobuf type {@code protos.ChaincodeMessage}
- */
- public static final class ChaincodeMessage extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.ChaincodeMessage)
- ChaincodeMessageOrBuilder {
- // Use ChaincodeMessage.newBuilder() to construct.
- private ChaincodeMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChaincodeMessage() {
- type_ = 0;
- payload_ = com.google.protobuf.ByteString.EMPTY;
- txid_ = "";
- channelId_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ChaincodeMessage(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- int rawValue = input.readEnum();
-
- type_ = rawValue;
- break;
- }
- case 18: {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (timestamp_ != null) {
- subBuilder = timestamp_.toBuilder();
- }
- timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(timestamp_);
- timestamp_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26: {
-
- payload_ = input.readBytes();
- break;
- }
- case 34: {
- java.lang.String s = input.readStringRequireUtf8();
-
- txid_ = s;
- break;
- }
- case 42: {
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder subBuilder = null;
- if (proposal_ != null) {
- subBuilder = proposal_.toBuilder();
- }
- proposal_ = input.readMessage(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(proposal_);
- proposal_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 50: {
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder subBuilder = null;
- if (chaincodeEvent_ != null) {
- subBuilder = chaincodeEvent_.toBuilder();
- }
- chaincodeEvent_ = input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(chaincodeEvent_);
- chaincodeEvent_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 58: {
- java.lang.String s = input.readStringRequireUtf8();
-
- channelId_ = s;
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Builder.class);
- }
-
- /**
- * Protobuf enum {@code protos.ChaincodeMessage.Type}
- */
- public enum Type
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * UNDEFINED = 0;
- */
- UNDEFINED(0),
- /**
- * REGISTER = 1;
- */
- REGISTER(1),
- /**
- * REGISTERED = 2;
- */
- REGISTERED(2),
- /**
- * INIT = 3;
- */
- INIT(3),
- /**
- * READY = 4;
- */
- READY(4),
- /**
- * TRANSACTION = 5;
- */
- TRANSACTION(5),
- /**
- * COMPLETED = 6;
- */
- COMPLETED(6),
- /**
- * ERROR = 7;
- */
- ERROR(7),
- /**
- * GET_STATE = 8;
- */
- GET_STATE(8),
- /**
- * PUT_STATE = 9;
- */
- PUT_STATE(9),
- /**
- * DEL_STATE = 10;
- */
- DEL_STATE(10),
- /**
- * INVOKE_CHAINCODE = 11;
- */
- INVOKE_CHAINCODE(11),
- /**
- * RESPONSE = 13;
- */
- RESPONSE(13),
- /**
- * GET_STATE_BY_RANGE = 14;
- */
- GET_STATE_BY_RANGE(14),
- /**
- * GET_QUERY_RESULT = 15;
- */
- GET_QUERY_RESULT(15),
- /**
- * QUERY_STATE_NEXT = 16;
- */
- QUERY_STATE_NEXT(16),
- /**
- * QUERY_STATE_CLOSE = 17;
- */
- QUERY_STATE_CLOSE(17),
- /**
- * KEEPALIVE = 18;
- */
- KEEPALIVE(18),
- /**
- * GET_HISTORY_FOR_KEY = 19;
- */
- GET_HISTORY_FOR_KEY(19),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * UNDEFINED = 0;
- */
- public static final int UNDEFINED_VALUE = 0;
- /**
- * REGISTER = 1;
- */
- public static final int REGISTER_VALUE = 1;
- /**
- * REGISTERED = 2;
- */
- public static final int REGISTERED_VALUE = 2;
- /**
- * INIT = 3;
- */
- public static final int INIT_VALUE = 3;
- /**
- * READY = 4;
- */
- public static final int READY_VALUE = 4;
- /**
- * TRANSACTION = 5;
- */
- public static final int TRANSACTION_VALUE = 5;
- /**
- * COMPLETED = 6;
- */
- public static final int COMPLETED_VALUE = 6;
- /**
- * ERROR = 7;
- */
- public static final int ERROR_VALUE = 7;
- /**
- * GET_STATE = 8;
- */
- public static final int GET_STATE_VALUE = 8;
- /**
- * PUT_STATE = 9;
- */
- public static final int PUT_STATE_VALUE = 9;
- /**
- * DEL_STATE = 10;
- */
- public static final int DEL_STATE_VALUE = 10;
- /**
- * INVOKE_CHAINCODE = 11;
- */
- public static final int INVOKE_CHAINCODE_VALUE = 11;
- /**
- * RESPONSE = 13;
- */
- public static final int RESPONSE_VALUE = 13;
- /**
- * GET_STATE_BY_RANGE = 14;
- */
- public static final int GET_STATE_BY_RANGE_VALUE = 14;
- /**
- * GET_QUERY_RESULT = 15;
- */
- public static final int GET_QUERY_RESULT_VALUE = 15;
- /**
- * QUERY_STATE_NEXT = 16;
- */
- public static final int QUERY_STATE_NEXT_VALUE = 16;
- /**
- * QUERY_STATE_CLOSE = 17;
- */
- public static final int QUERY_STATE_CLOSE_VALUE = 17;
- /**
- * KEEPALIVE = 18;
- */
- public static final int KEEPALIVE_VALUE = 18;
- /**
- * GET_HISTORY_FOR_KEY = 19;
- */
- public static final int GET_HISTORY_FOR_KEY_VALUE = 19;
-
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static Type valueOf(int value) {
- return forNumber(value);
- }
-
- public static Type forNumber(int value) {
- switch (value) {
- case 0: return UNDEFINED;
- case 1: return REGISTER;
- case 2: return REGISTERED;
- case 3: return INIT;
- case 4: return READY;
- case 5: return TRANSACTION;
- case 6: return COMPLETED;
- case 7: return ERROR;
- case 8: return GET_STATE;
- case 9: return PUT_STATE;
- case 10: return DEL_STATE;
- case 11: return INVOKE_CHAINCODE;
- case 13: return RESPONSE;
- case 14: return GET_STATE_BY_RANGE;
- case 15: return GET_QUERY_RESULT;
- case 16: return QUERY_STATE_NEXT;
- case 17: return QUERY_STATE_CLOSE;
- case 18: return KEEPALIVE;
- case 19: return GET_HISTORY_FOR_KEY;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- Type> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public Type findValueByNumber(int number) {
- return Type.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Type[] VALUES = values();
-
- public static Type valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- if (desc.getIndex() == -1) {
- return UNRECOGNIZED;
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private Type(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:protos.ChaincodeMessage.Type)
- }
-
- public static final int TYPE_FIELD_NUMBER = 1;
- private int type_;
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- public int getTypeValue() {
- return type_;
- }
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.valueOf(type_);
- return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNRECOGNIZED : result;
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 2;
- private com.google.protobuf.Timestamp timestamp_;
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public boolean hasTimestamp() {
- return timestamp_ != null;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public com.google.protobuf.Timestamp getTimestamp() {
- return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
- return getTimestamp();
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 3;
- private com.google.protobuf.ByteString payload_;
- /**
- * optional bytes payload = 3;
- */
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
-
- public static final int TXID_FIELD_NUMBER = 4;
- private volatile java.lang.Object txid_;
- /**
- * optional string txid = 4;
- */
- public java.lang.String getTxid() {
- java.lang.Object ref = txid_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txid_ = s;
- return s;
- }
- }
- /**
- * optional string txid = 4;
- */
- public com.google.protobuf.ByteString
- getTxidBytes() {
- java.lang.Object ref = txid_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int PROPOSAL_FIELD_NUMBER = 5;
- private org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal proposal_;
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public boolean hasProposal() {
- return proposal_ != null;
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getProposal() {
- return proposal_ == null ? org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance() : proposal_;
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder getProposalOrBuilder() {
- return getProposal();
- }
-
- public static final int CHAINCODE_EVENT_FIELD_NUMBER = 6;
- private org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent chaincodeEvent_;
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public boolean hasChaincodeEvent() {
- return chaincodeEvent_ != null;
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getChaincodeEvent() {
- return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_;
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() {
- return getChaincodeEvent();
- }
-
- public static final int CHANNEL_ID_FIELD_NUMBER = 7;
- private volatile java.lang.Object channelId_;
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- public java.lang.String getChannelId() {
- java.lang.Object ref = channelId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- channelId_ = s;
- return s;
- }
- }
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- public com.google.protobuf.ByteString
- getChannelIdBytes() {
- java.lang.Object ref = channelId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- channelId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNDEFINED.getNumber()) {
- output.writeEnum(1, type_);
- }
- if (timestamp_ != null) {
- output.writeMessage(2, getTimestamp());
- }
- if (!payload_.isEmpty()) {
- output.writeBytes(3, payload_);
- }
- if (!getTxidBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, txid_);
- }
- if (proposal_ != null) {
- output.writeMessage(5, getProposal());
- }
- if (chaincodeEvent_ != null) {
- output.writeMessage(6, getChaincodeEvent());
- }
- if (!getChannelIdBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 7, channelId_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNDEFINED.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, type_);
- }
- if (timestamp_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getTimestamp());
- }
- if (!payload_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, payload_);
- }
- if (!getTxidBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, txid_);
- }
- if (proposal_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, getProposal());
- }
- if (chaincodeEvent_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(6, getChaincodeEvent());
- }
- if (!getChannelIdBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, channelId_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage) obj;
-
- boolean result = true;
- result = result && type_ == other.type_;
- result = result && (hasTimestamp() == other.hasTimestamp());
- if (hasTimestamp()) {
- result = result && getTimestamp()
- .equals(other.getTimestamp());
- }
- result = result && getPayload()
- .equals(other.getPayload());
- result = result && getTxid()
- .equals(other.getTxid());
- result = result && (hasProposal() == other.hasProposal());
- if (hasProposal()) {
- result = result && getProposal()
- .equals(other.getProposal());
- }
- result = result && (hasChaincodeEvent() == other.hasChaincodeEvent());
- if (hasChaincodeEvent()) {
- result = result && getChaincodeEvent()
- .equals(other.getChaincodeEvent());
- }
- result = result && getChannelId()
- .equals(other.getChannelId());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + type_;
- if (hasTimestamp()) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + getTimestamp().hashCode();
- }
- hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- hash = (37 * hash) + TXID_FIELD_NUMBER;
- hash = (53 * hash) + getTxid().hashCode();
- if (hasProposal()) {
- hash = (37 * hash) + PROPOSAL_FIELD_NUMBER;
- hash = (53 * hash) + getProposal().hashCode();
- }
- if (hasChaincodeEvent()) {
- hash = (37 * hash) + CHAINCODE_EVENT_FIELD_NUMBER;
- hash = (53 * hash) + getChaincodeEvent().hashCode();
- }
- hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER;
- hash = (53 * hash) + getChannelId().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code protos.ChaincodeMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.ChaincodeMessage)
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- type_ = 0;
-
- if (timestampBuilder_ == null) {
- timestamp_ = null;
- } else {
- timestamp_ = null;
- timestampBuilder_ = null;
- }
- payload_ = com.google.protobuf.ByteString.EMPTY;
-
- txid_ = "";
-
- if (proposalBuilder_ == null) {
- proposal_ = null;
- } else {
- proposal_ = null;
- proposalBuilder_ = null;
- }
- if (chaincodeEventBuilder_ == null) {
- chaincodeEvent_ = null;
- } else {
- chaincodeEvent_ = null;
- chaincodeEventBuilder_ = null;
- }
- channelId_ = "";
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_ChaincodeMessage_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage build() {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage buildPartial() {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage(this);
- result.type_ = type_;
- if (timestampBuilder_ == null) {
- result.timestamp_ = timestamp_;
- } else {
- result.timestamp_ = timestampBuilder_.build();
- }
- result.payload_ = payload_;
- result.txid_ = txid_;
- if (proposalBuilder_ == null) {
- result.proposal_ = proposal_;
- } else {
- result.proposal_ = proposalBuilder_.build();
- }
- if (chaincodeEventBuilder_ == null) {
- result.chaincodeEvent_ = chaincodeEvent_;
- } else {
- result.chaincodeEvent_ = chaincodeEventBuilder_.build();
- }
- result.channelId_ = channelId_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage other) {
- if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.getDefaultInstance()) return this;
- if (other.type_ != 0) {
- setTypeValue(other.getTypeValue());
- }
- if (other.hasTimestamp()) {
- mergeTimestamp(other.getTimestamp());
- }
- if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
- setPayload(other.getPayload());
- }
- if (!other.getTxid().isEmpty()) {
- txid_ = other.txid_;
- onChanged();
- }
- if (other.hasProposal()) {
- mergeProposal(other.getProposal());
- }
- if (other.hasChaincodeEvent()) {
- mergeChaincodeEvent(other.getChaincodeEvent());
- }
- if (!other.getChannelId().isEmpty()) {
- channelId_ = other.channelId_;
- onChanged();
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int type_ = 0;
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- public int getTypeValue() {
- return type_;
- }
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- public Builder setTypeValue(int value) {
- type_ = value;
- onChanged();
- return this;
- }
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type getType() {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type result = org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.valueOf(type_);
- return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type.UNRECOGNIZED : result;
- }
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- public Builder setType(org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage.Type value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- type_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * optional .protos.ChaincodeMessage.Type type = 1;
- */
- public Builder clearType() {
-
- type_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Timestamp timestamp_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public boolean hasTimestamp() {
- return timestampBuilder_ != null || timestamp_ != null;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public com.google.protobuf.Timestamp getTimestamp() {
- if (timestampBuilder_ == null) {
- return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- } else {
- return timestampBuilder_.getMessage();
- }
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public Builder setTimestamp(com.google.protobuf.Timestamp value) {
- if (timestampBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- timestamp_ = value;
- onChanged();
- } else {
- timestampBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public Builder setTimestamp(
- com.google.protobuf.Timestamp.Builder builderForValue) {
- if (timestampBuilder_ == null) {
- timestamp_ = builderForValue.build();
- onChanged();
- } else {
- timestampBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
- if (timestampBuilder_ == null) {
- if (timestamp_ != null) {
- timestamp_ =
- com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
- } else {
- timestamp_ = value;
- }
- onChanged();
- } else {
- timestampBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public Builder clearTimestamp() {
- if (timestampBuilder_ == null) {
- timestamp_ = null;
- onChanged();
- } else {
- timestamp_ = null;
- timestampBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
-
- onChanged();
- return getTimestampFieldBuilder().getBuilder();
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
- if (timestampBuilder_ != null) {
- return timestampBuilder_.getMessageOrBuilder();
- } else {
- return timestamp_ == null ?
- com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
- }
- }
- /**
- * optional .google.protobuf.Timestamp timestamp = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
- getTimestampFieldBuilder() {
- if (timestampBuilder_ == null) {
- timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
- getTimestamp(),
- getParentForChildren(),
- isClean());
- timestamp_ = null;
- }
- return timestampBuilder_;
- }
-
- private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes payload = 3;
- */
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
- /**
- * optional bytes payload = 3;
- */
- public Builder setPayload(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- payload_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes payload = 3;
- */
- public Builder clearPayload() {
-
- payload_ = getDefaultInstance().getPayload();
- onChanged();
- return this;
- }
-
- private java.lang.Object txid_ = "";
- /**
- * optional string txid = 4;
- */
- public java.lang.String getTxid() {
- java.lang.Object ref = txid_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- txid_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string txid = 4;
- */
- public com.google.protobuf.ByteString
- getTxidBytes() {
- java.lang.Object ref = txid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- txid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string txid = 4;
- */
- public Builder setTxid(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- txid_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string txid = 4;
- */
- public Builder clearTxid() {
-
- txid_ = getDefaultInstance().getTxid();
- onChanged();
- return this;
- }
- /**
- * optional string txid = 4;
- */
- public Builder setTxidBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- txid_ = value;
- onChanged();
- return this;
- }
-
- private org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal proposal_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder> proposalBuilder_;
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public boolean hasProposal() {
- return proposalBuilder_ != null || proposal_ != null;
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal getProposal() {
- if (proposalBuilder_ == null) {
- return proposal_ == null ? org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance() : proposal_;
- } else {
- return proposalBuilder_.getMessage();
- }
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public Builder setProposal(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal value) {
- if (proposalBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- proposal_ = value;
- onChanged();
- } else {
- proposalBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public Builder setProposal(
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder builderForValue) {
- if (proposalBuilder_ == null) {
- proposal_ = builderForValue.build();
- onChanged();
- } else {
- proposalBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public Builder mergeProposal(org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal value) {
- if (proposalBuilder_ == null) {
- if (proposal_ != null) {
- proposal_ =
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.newBuilder(proposal_).mergeFrom(value).buildPartial();
- } else {
- proposal_ = value;
- }
- onChanged();
- } else {
- proposalBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public Builder clearProposal() {
- if (proposalBuilder_ == null) {
- proposal_ = null;
- onChanged();
- } else {
- proposal_ = null;
- proposalBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder getProposalBuilder() {
-
- onChanged();
- return getProposalFieldBuilder().getBuilder();
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- public org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder getProposalOrBuilder() {
- if (proposalBuilder_ != null) {
- return proposalBuilder_.getMessageOrBuilder();
- } else {
- return proposal_ == null ?
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.getDefaultInstance() : proposal_;
- }
- }
- /**
- * optional .protos.SignedProposal proposal = 5;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder>
- getProposalFieldBuilder() {
- if (proposalBuilder_ == null) {
- proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposal.Builder, org.hyperledger.fabric.protos.peer.ProposalPackage.SignedProposalOrBuilder>(
- getProposal(),
- getParentForChildren(),
- isClean());
- proposal_ = null;
- }
- return proposalBuilder_;
- }
-
- private org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent chaincodeEvent_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder> chaincodeEventBuilder_;
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public boolean hasChaincodeEvent() {
- return chaincodeEventBuilder_ != null || chaincodeEvent_ != null;
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent getChaincodeEvent() {
- if (chaincodeEventBuilder_ == null) {
- return chaincodeEvent_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_;
- } else {
- return chaincodeEventBuilder_.getMessage();
- }
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public Builder setChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent value) {
- if (chaincodeEventBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- chaincodeEvent_ = value;
- onChanged();
- } else {
- chaincodeEventBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public Builder setChaincodeEvent(
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder builderForValue) {
- if (chaincodeEventBuilder_ == null) {
- chaincodeEvent_ = builderForValue.build();
- onChanged();
- } else {
- chaincodeEventBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public Builder mergeChaincodeEvent(org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent value) {
- if (chaincodeEventBuilder_ == null) {
- if (chaincodeEvent_ != null) {
- chaincodeEvent_ =
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.newBuilder(chaincodeEvent_).mergeFrom(value).buildPartial();
- } else {
- chaincodeEvent_ = value;
- }
- onChanged();
- } else {
- chaincodeEventBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public Builder clearChaincodeEvent() {
- if (chaincodeEventBuilder_ == null) {
- chaincodeEvent_ = null;
- onChanged();
- } else {
- chaincodeEvent_ = null;
- chaincodeEventBuilder_ = null;
- }
-
- return this;
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder getChaincodeEventBuilder() {
-
- onChanged();
- return getChaincodeEventFieldBuilder().getBuilder();
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- public org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() {
- if (chaincodeEventBuilder_ != null) {
- return chaincodeEventBuilder_.getMessageOrBuilder();
- } else {
- return chaincodeEvent_ == null ?
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.getDefaultInstance() : chaincodeEvent_;
- }
- }
- /**
- *
- *event emitted by chaincode. Used only with Init or Invoke.
- * This event is then stored (currently)
- *with Block.NonHashData.TransactionResult
- *
- *
- * optional .protos.ChaincodeEvent chaincode_event = 6;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder>
- getChaincodeEventFieldBuilder() {
- if (chaincodeEventBuilder_ == null) {
- chaincodeEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEvent.Builder, org.hyperledger.fabric.protos.peer.ChaincodeEventPackage.ChaincodeEventOrBuilder>(
- getChaincodeEvent(),
- getParentForChildren(),
- isClean());
- chaincodeEvent_ = null;
- }
- return chaincodeEventBuilder_;
- }
-
- private java.lang.Object channelId_ = "";
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- public java.lang.String getChannelId() {
- java.lang.Object ref = channelId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- channelId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- public com.google.protobuf.ByteString
- getChannelIdBytes() {
- java.lang.Object ref = channelId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- channelId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- public Builder setChannelId(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- channelId_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- public Builder clearChannelId() {
-
- channelId_ = getDefaultInstance().getChannelId();
- onChanged();
- return this;
- }
- /**
- *
- *channel id
- *
- *
- * optional string channel_id = 7;
- */
- public Builder setChannelIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- channelId_ = value;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.ChaincodeMessage)
- }
-
- // @@protoc_insertion_point(class_scope:protos.ChaincodeMessage)
- private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage();
- }
-
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public ChaincodeMessage parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChaincodeMessage(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface GetStateOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.GetState)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional string key = 1;
- */
- java.lang.String getKey();
- /**
- * optional string key = 1;
- */
- com.google.protobuf.ByteString
- getKeyBytes();
-
- /**
- * optional string collection = 2;
- */
- java.lang.String getCollection();
- /**
- * optional string collection = 2;
- */
- com.google.protobuf.ByteString
- getCollectionBytes();
- }
- /**
- * Protobuf type {@code protos.GetState}
- */
- public static final class GetState extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:protos.GetState)
- GetStateOrBuilder {
- // Use GetState.newBuilder() to construct.
- private GetState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private GetState() {
- key_ = "";
- collection_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private GetState(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- key_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- collection_ = s;
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.Builder.class);
- }
-
- public static final int KEY_FIELD_NUMBER = 1;
- private volatile java.lang.Object key_;
- /**
- * optional string key = 1;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- key_ = s;
- return s;
- }
- }
- /**
- * optional string key = 1;
- */
- public com.google.protobuf.ByteString
- getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int COLLECTION_FIELD_NUMBER = 2;
- private volatile java.lang.Object collection_;
- /**
- * optional string collection = 2;
- */
- public java.lang.String getCollection() {
- java.lang.Object ref = collection_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- collection_ = s;
- return s;
- }
- }
- /**
- * optional string collection = 2;
- */
- public com.google.protobuf.ByteString
- getCollectionBytes() {
- java.lang.Object ref = collection_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- collection_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getKeyBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
- }
- if (!getCollectionBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getKeyBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
- }
- if (!getCollectionBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState)) {
- return super.equals(obj);
- }
- org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState other = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState) obj;
-
- boolean result = true;
- result = result && getKey()
- .equals(other.getKey());
- result = result && getCollection()
- .equals(other.getCollection());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + KEY_FIELD_NUMBER;
- hash = (53 * hash) + getKey().hashCode();
- hash = (37 * hash) + COLLECTION_FIELD_NUMBER;
- hash = (53 * hash) + getCollection().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code protos.GetState}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:protos.GetState)
- org.hyperledger.fabric.protos.peer.ChaincodeShim.GetStateOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.class, org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.Builder.class);
- }
-
- // Construct using org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- public Builder clear() {
- super.clear();
- key_ = "";
-
- collection_ = "";
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.internal_static_protos_GetState_descriptor;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstanceForType() {
- return org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.getDefaultInstance();
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState build() {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState buildPartial() {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState result = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState(this);
- result.key_ = key_;
- result.collection_ = collection_;
- onBuilt();
- return result;
- }
-
- public Builder clone() {
- return (Builder) super.clone();
- }
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.setField(field, value);
- }
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
- }
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
- }
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
- }
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return (Builder) super.addRepeatedField(field, value);
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState) {
- return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState other) {
- if (other == org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState.getDefaultInstance()) return this;
- if (!other.getKey().isEmpty()) {
- key_ = other.key_;
- onChanged();
- }
- if (!other.getCollection().isEmpty()) {
- collection_ = other.collection_;
- onChanged();
- }
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object key_ = "";
- /**
- * optional string key = 1;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- key_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string key = 1;
- */
- public com.google.protobuf.ByteString
- getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string key = 1;
- */
- public Builder setKey(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- key_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string key = 1;
- */
- public Builder clearKey() {
-
- key_ = getDefaultInstance().getKey();
- onChanged();
- return this;
- }
- /**
- * optional string key = 1;
- */
- public Builder setKeyBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- key_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object collection_ = "";
- /**
- * optional string collection = 2;
- */
- public java.lang.String getCollection() {
- java.lang.Object ref = collection_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- collection_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string collection = 2;
- */
- public com.google.protobuf.ByteString
- getCollectionBytes() {
- java.lang.Object ref = collection_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- collection_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string collection = 2;
- */
- public Builder setCollection(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- collection_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string collection = 2;
- */
- public Builder clearCollection() {
-
- collection_ = getDefaultInstance().getCollection();
- onChanged();
- return this;
- }
- /**
- * optional string collection = 2;
- */
- public Builder setCollectionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- collection_ = value;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:protos.GetState)
- }
-
- // @@protoc_insertion_point(class_scope:protos.GetState)
- private static final org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState();
- }
-
- public static org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public GetState parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetState(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public org.hyperledger.fabric.protos.peer.ChaincodeShim.GetState getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface PutStateOrBuilder extends
- // @@protoc_insertion_point(interface_extends:protos.PutState)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *