All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.protos.common.ChannelHeader Maven / Gradle / Ivy

There is a newer version: 0.3.3
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: common/common.proto

package org.hyperledger.fabric.protos.common;

/**
 * 
 * Header is a generic replay prevention and identity message to include in a signed payload
 * 
* * Protobuf type {@code common.ChannelHeader} */ public final class ChannelHeader extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.ChannelHeader) ChannelHeaderOrBuilder { private static final long serialVersionUID = 0L; // Use ChannelHeader.newBuilder() to construct. private ChannelHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ChannelHeader() { channelId_ = ""; txId_ = ""; extension_ = com.google.protobuf.ByteString.EMPTY; tlsCertHash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ChannelHeader(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ChannelHeader( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: 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; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.common.CommonProto.internal_static_common_ChannelHeader_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.common.CommonProto.internal_static_common_ChannelHeader_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.common.ChannelHeader.class, org.hyperledger.fabric.protos.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
   * 
* * int32 type = 1 [json_name = "type"]; * @return The type. */ @java.lang.Override public int getType() { return type_; } public static final int VERSION_FIELD_NUMBER = 2; private int version_; /** *
   * Version indicates message protocol version
   * 
* * int32 version = 2 [json_name = "version"]; * @return The version. */ @java.lang.Override 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
   * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; * @return Whether the timestamp field is set. */ @java.lang.Override public boolean hasTimestamp() { return timestamp_ != null; } /** *
   * Timestamp is the local time when the message was created
   * by the sender
   * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; * @return The timestamp. */ @java.lang.Override 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
   * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ @java.lang.Override 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
   * 
* * string channel_id = 4 [json_name = "channelId"]; * @return The channelId. */ @java.lang.Override 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
   * 
* * string channel_id = 4 [json_name = "channelId"]; * @return The bytes for channelId. */ @java.lang.Override 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
   * 
* * string tx_id = 5 [json_name = "txId"]; * @return The txId. */ @java.lang.Override 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
   * 
* * string tx_id = 5 [json_name = "txId"]; * @return The bytes for txId. */ @java.lang.Override 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)
   * 
* * uint64 epoch = 6 [json_name = "epoch"]; * @return The epoch. */ @java.lang.Override 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
   * 
* * bytes extension = 7 [json_name = "extension"]; * @return The extension. */ @java.lang.Override 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
   * 
* * bytes tls_cert_hash = 8 [json_name = "tlsCertHash"]; * @return The tlsCertHash. */ @java.lang.Override public com.google.protobuf.ByteString getTlsCertHash() { return tlsCertHash_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, channelId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(txId_)) { 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_); } unknownFields.writeTo(output); } @java.lang.Override 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, channelId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(txId_)) { 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_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.common.ChannelHeader)) { return super.equals(obj); } org.hyperledger.fabric.protos.common.ChannelHeader other = (org.hyperledger.fabric.protos.common.ChannelHeader) obj; if (getType() != other.getType()) return false; if (getVersion() != other.getVersion()) return false; if (hasTimestamp() != other.hasTimestamp()) return false; if (hasTimestamp()) { if (!getTimestamp() .equals(other.getTimestamp())) return false; } if (!getChannelId() .equals(other.getChannelId())) return false; if (!getTxId() .equals(other.getTxId())) return false; if (getEpoch() != other.getEpoch()) return false; if (!getExtension() .equals(other.getExtension())) return false; if (!getTlsCertHash() .equals(other.getTlsCertHash())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().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.ChannelHeader parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.common.ChannelHeader parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.common.ChannelHeader parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.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.ChannelHeader parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.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.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.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.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.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.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.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); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.common.ChannelHeader prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override 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.ChannelHeaderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.common.CommonProto.internal_static_common_ChannelHeader_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.common.CommonProto.internal_static_common_ChannelHeader_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.common.ChannelHeader.class, org.hyperledger.fabric.protos.common.ChannelHeader.Builder.class); } // Construct using org.hyperledger.fabric.protos.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) { } } @java.lang.Override 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; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.common.CommonProto.internal_static_common_ChannelHeader_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.common.ChannelHeader getDefaultInstanceForType() { return org.hyperledger.fabric.protos.common.ChannelHeader.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.common.ChannelHeader build() { org.hyperledger.fabric.protos.common.ChannelHeader result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.common.ChannelHeader buildPartial() { org.hyperledger.fabric.protos.common.ChannelHeader result = new org.hyperledger.fabric.protos.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; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.common.ChannelHeader) { return mergeFrom((org.hyperledger.fabric.protos.common.ChannelHeader)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.common.ChannelHeader other) { if (other == org.hyperledger.fabric.protos.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()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.common.ChannelHeader parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.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
     * 
* * int32 type = 1 [json_name = "type"]; * @return The type. */ @java.lang.Override public int getType() { return type_; } /** *
     * Header types 0-10000 are reserved and defined by HeaderType
     * 
* * int32 type = 1 [json_name = "type"]; * @param value The type to set. * @return This builder for chaining. */ public Builder setType(int value) { type_ = value; onChanged(); return this; } /** *
     * Header types 0-10000 are reserved and defined by HeaderType
     * 
* * int32 type = 1 [json_name = "type"]; * @return This builder for chaining. */ public Builder clearType() { type_ = 0; onChanged(); return this; } private int version_ ; /** *
     * Version indicates message protocol version
     * 
* * int32 version = 2 [json_name = "version"]; * @return The version. */ @java.lang.Override public int getVersion() { return version_; } /** *
     * Version indicates message protocol version
     * 
* * int32 version = 2 [json_name = "version"]; * @param value The version to set. * @return This builder for chaining. */ public Builder setVersion(int value) { version_ = value; onChanged(); return this; } /** *
     * Version indicates message protocol version
     * 
* * int32 version = 2 [json_name = "version"]; * @return This builder for chaining. */ public Builder clearVersion() { version_ = 0; onChanged(); return this; } private com.google.protobuf.Timestamp timestamp_; 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
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { return timestampBuilder_ != null || timestamp_ != null; } /** *
     * Timestamp is the local time when the message was created
     * by the sender
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; * @return The timestamp. */ 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
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ 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
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ 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
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ 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
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ 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
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { onChanged(); return getTimestampFieldBuilder().getBuilder(); } /** *
     * Timestamp is the local time when the message was created
     * by the sender
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ 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
     * 
* * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; */ 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
     * 
* * string channel_id = 4 [json_name = "channelId"]; * @return The channelId. */ 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
     * 
* * string channel_id = 4 [json_name = "channelId"]; * @return The bytes for channelId. */ 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
     * 
* * string channel_id = 4 [json_name = "channelId"]; * @param value The channelId to set. * @return This builder for chaining. */ 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
     * 
* * string channel_id = 4 [json_name = "channelId"]; * @return This builder for chaining. */ public Builder clearChannelId() { channelId_ = getDefaultInstance().getChannelId(); onChanged(); return this; } /** *
     * Identifier of the channel this message is bound for
     * 
* * string channel_id = 4 [json_name = "channelId"]; * @param value The bytes for channelId to set. * @return This builder for chaining. */ 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
     * 
* * string tx_id = 5 [json_name = "txId"]; * @return The txId. */ 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
     * 
* * string tx_id = 5 [json_name = "txId"]; * @return The bytes for txId. */ 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
     * 
* * string tx_id = 5 [json_name = "txId"]; * @param value The txId to set. * @return This builder for chaining. */ 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
     * 
* * string tx_id = 5 [json_name = "txId"]; * @return This builder for chaining. */ 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
     * 
* * string tx_id = 5 [json_name = "txId"]; * @param value The bytes for txId to set. * @return This builder for chaining. */ 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)
     * 
* * uint64 epoch = 6 [json_name = "epoch"]; * @return The epoch. */ @java.lang.Override 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)
     * 
* * uint64 epoch = 6 [json_name = "epoch"]; * @param value The epoch to set. * @return This builder for chaining. */ 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)
     * 
* * uint64 epoch = 6 [json_name = "epoch"]; * @return This builder for chaining. */ 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
     * 
* * bytes extension = 7 [json_name = "extension"]; * @return The extension. */ @java.lang.Override public com.google.protobuf.ByteString getExtension() { return extension_; } /** *
     * Extension that may be attached based on the header type
     * 
* * bytes extension = 7 [json_name = "extension"]; * @param value The extension to set. * @return This builder for chaining. */ 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
     * 
* * bytes extension = 7 [json_name = "extension"]; * @return This builder for chaining. */ 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
     * 
* * bytes tls_cert_hash = 8 [json_name = "tlsCertHash"]; * @return The tlsCertHash. */ @java.lang.Override public com.google.protobuf.ByteString getTlsCertHash() { return tlsCertHash_; } /** *
     * If mutual TLS is employed, this represents
     * the hash of the client's TLS certificate
     * 
* * bytes tls_cert_hash = 8 [json_name = "tlsCertHash"]; * @param value The tlsCertHash to set. * @return This builder for chaining. */ 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
     * 
* * bytes tls_cert_hash = 8 [json_name = "tlsCertHash"]; * @return This builder for chaining. */ public Builder clearTlsCertHash() { tlsCertHash_ = getDefaultInstance().getTlsCertHash(); onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.ChannelHeader) } // @@protoc_insertion_point(class_scope:common.ChannelHeader) private static final org.hyperledger.fabric.protos.common.ChannelHeader DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.ChannelHeader(); } public static org.hyperledger.fabric.protos.common.ChannelHeader getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override 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; } @java.lang.Override public org.hyperledger.fabric.protos.common.ChannelHeader getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy