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

org.hyperledger.fabric.protos.gossip.PvtDataElement Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: gossip/message.proto
// Protobuf Java Version: 4.28.2

package org.hyperledger.fabric.protos.gossip;

/**
 * Protobuf type {@code gossip.PvtDataElement}
 */
public final class PvtDataElement extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:gossip.PvtDataElement)
    PvtDataElementOrBuilder {
private static final long serialVersionUID = 0L;
  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 28,
      /* patch= */ 2,
      /* suffix= */ "",
      PvtDataElement.class.getName());
  }
  // Use PvtDataElement.newBuilder() to construct.
  private PvtDataElement(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private PvtDataElement() {
    payload_ = emptyList(com.google.protobuf.ByteString.class);
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_PvtDataElement_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_PvtDataElement_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.hyperledger.fabric.protos.gossip.PvtDataElement.class, org.hyperledger.fabric.protos.gossip.PvtDataElement.Builder.class);
  }

  private int bitField0_;
  public static final int DIGEST_FIELD_NUMBER = 1;
  private org.hyperledger.fabric.protos.gossip.PvtDataDigest digest_;
  /**
   * .gossip.PvtDataDigest digest = 1 [json_name = "digest"];
   * @return Whether the digest field is set.
   */
  @java.lang.Override
  public boolean hasDigest() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * .gossip.PvtDataDigest digest = 1 [json_name = "digest"];
   * @return The digest.
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.gossip.PvtDataDigest getDigest() {
    return digest_ == null ? org.hyperledger.fabric.protos.gossip.PvtDataDigest.getDefaultInstance() : digest_;
  }
  /**
   * .gossip.PvtDataDigest digest = 1 [json_name = "digest"];
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.gossip.PvtDataDigestOrBuilder getDigestOrBuilder() {
    return digest_ == null ? org.hyperledger.fabric.protos.gossip.PvtDataDigest.getDefaultInstance() : digest_;
  }

  public static final int PAYLOAD_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private com.google.protobuf.Internal.ProtobufList payload_ =
      emptyList(com.google.protobuf.ByteString.class);
  /**
   * 
   * the payload is a marshaled kvrwset.KVRWSet
   * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @return A list containing the payload. */ @java.lang.Override public java.util.List getPayloadList() { return payload_; } /** *
   * the payload is a marshaled kvrwset.KVRWSet
   * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @return The count of payload. */ public int getPayloadCount() { return payload_.size(); } /** *
   * the payload is a marshaled kvrwset.KVRWSet
   * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @param index The index of the element to return. * @return The payload at the given index. */ public com.google.protobuf.ByteString getPayload(int index) { return payload_.get(index); } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getDigest()); } for (int i = 0; i < payload_.size(); i++) { output.writeBytes(2, payload_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getDigest()); } { int dataSize = 0; for (int i = 0; i < payload_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(payload_.get(i)); } size += dataSize; size += 1 * getPayloadList().size(); } size += getUnknownFields().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.gossip.PvtDataElement)) { return super.equals(obj); } org.hyperledger.fabric.protos.gossip.PvtDataElement other = (org.hyperledger.fabric.protos.gossip.PvtDataElement) obj; if (hasDigest() != other.hasDigest()) return false; if (hasDigest()) { if (!getDigest() .equals(other.getDigest())) return false; } if (!getPayloadList() .equals(other.getPayloadList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasDigest()) { hash = (37 * hash) + DIGEST_FIELD_NUMBER; hash = (53 * hash) + getDigest().hashCode(); } if (getPayloadCount() > 0) { hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayloadList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement 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.gossip.PvtDataElement parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement 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.gossip.PvtDataElement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .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.gossip.PvtDataElement 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.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code gossip.PvtDataElement} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:gossip.PvtDataElement) org.hyperledger.fabric.protos.gossip.PvtDataElementOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_PvtDataElement_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_PvtDataElement_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.gossip.PvtDataElement.class, org.hyperledger.fabric.protos.gossip.PvtDataElement.Builder.class); } // Construct using org.hyperledger.fabric.protos.gossip.PvtDataElement.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getDigestFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; digest_ = null; if (digestBuilder_ != null) { digestBuilder_.dispose(); digestBuilder_ = null; } payload_ = emptyList(com.google.protobuf.ByteString.class); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_PvtDataElement_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.gossip.PvtDataElement getDefaultInstanceForType() { return org.hyperledger.fabric.protos.gossip.PvtDataElement.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.gossip.PvtDataElement build() { org.hyperledger.fabric.protos.gossip.PvtDataElement result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.gossip.PvtDataElement buildPartial() { org.hyperledger.fabric.protos.gossip.PvtDataElement result = new org.hyperledger.fabric.protos.gossip.PvtDataElement(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.hyperledger.fabric.protos.gossip.PvtDataElement result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.digest_ = digestBuilder_ == null ? digest_ : digestBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { payload_.makeImmutable(); result.payload_ = payload_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.gossip.PvtDataElement) { return mergeFrom((org.hyperledger.fabric.protos.gossip.PvtDataElement)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.PvtDataElement other) { if (other == org.hyperledger.fabric.protos.gossip.PvtDataElement.getDefaultInstance()) return this; if (other.hasDigest()) { mergeDigest(other.getDigest()); } if (!other.payload_.isEmpty()) { if (payload_.isEmpty()) { payload_ = other.payload_; payload_.makeImmutable(); bitField0_ |= 0x00000002; } else { ensurePayloadIsMutable(); payload_.addAll(other.payload_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getDigestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { com.google.protobuf.ByteString v = input.readBytes(); ensurePayloadIsMutable(); payload_.add(v); break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private org.hyperledger.fabric.protos.gossip.PvtDataDigest digest_; private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.gossip.PvtDataDigest, org.hyperledger.fabric.protos.gossip.PvtDataDigest.Builder, org.hyperledger.fabric.protos.gossip.PvtDataDigestOrBuilder> digestBuilder_; /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; * @return Whether the digest field is set. */ public boolean hasDigest() { return ((bitField0_ & 0x00000001) != 0); } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; * @return The digest. */ public org.hyperledger.fabric.protos.gossip.PvtDataDigest getDigest() { if (digestBuilder_ == null) { return digest_ == null ? org.hyperledger.fabric.protos.gossip.PvtDataDigest.getDefaultInstance() : digest_; } else { return digestBuilder_.getMessage(); } } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; */ public Builder setDigest(org.hyperledger.fabric.protos.gossip.PvtDataDigest value) { if (digestBuilder_ == null) { if (value == null) { throw new NullPointerException(); } digest_ = value; } else { digestBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; */ public Builder setDigest( org.hyperledger.fabric.protos.gossip.PvtDataDigest.Builder builderForValue) { if (digestBuilder_ == null) { digest_ = builderForValue.build(); } else { digestBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; */ public Builder mergeDigest(org.hyperledger.fabric.protos.gossip.PvtDataDigest value) { if (digestBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && digest_ != null && digest_ != org.hyperledger.fabric.protos.gossip.PvtDataDigest.getDefaultInstance()) { getDigestBuilder().mergeFrom(value); } else { digest_ = value; } } else { digestBuilder_.mergeFrom(value); } if (digest_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; */ public Builder clearDigest() { bitField0_ = (bitField0_ & ~0x00000001); digest_ = null; if (digestBuilder_ != null) { digestBuilder_.dispose(); digestBuilder_ = null; } onChanged(); return this; } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; */ public org.hyperledger.fabric.protos.gossip.PvtDataDigest.Builder getDigestBuilder() { bitField0_ |= 0x00000001; onChanged(); return getDigestFieldBuilder().getBuilder(); } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; */ public org.hyperledger.fabric.protos.gossip.PvtDataDigestOrBuilder getDigestOrBuilder() { if (digestBuilder_ != null) { return digestBuilder_.getMessageOrBuilder(); } else { return digest_ == null ? org.hyperledger.fabric.protos.gossip.PvtDataDigest.getDefaultInstance() : digest_; } } /** * .gossip.PvtDataDigest digest = 1 [json_name = "digest"]; */ private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.gossip.PvtDataDigest, org.hyperledger.fabric.protos.gossip.PvtDataDigest.Builder, org.hyperledger.fabric.protos.gossip.PvtDataDigestOrBuilder> getDigestFieldBuilder() { if (digestBuilder_ == null) { digestBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.gossip.PvtDataDigest, org.hyperledger.fabric.protos.gossip.PvtDataDigest.Builder, org.hyperledger.fabric.protos.gossip.PvtDataDigestOrBuilder>( getDigest(), getParentForChildren(), isClean()); digest_ = null; } return digestBuilder_; } private com.google.protobuf.Internal.ProtobufList payload_ = emptyList(com.google.protobuf.ByteString.class); private void ensurePayloadIsMutable() { if (!payload_.isModifiable()) { payload_ = makeMutableCopy(payload_); } bitField0_ |= 0x00000002; } /** *
     * the payload is a marshaled kvrwset.KVRWSet
     * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @return A list containing the payload. */ public java.util.List getPayloadList() { payload_.makeImmutable(); return payload_; } /** *
     * the payload is a marshaled kvrwset.KVRWSet
     * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @return The count of payload. */ public int getPayloadCount() { return payload_.size(); } /** *
     * the payload is a marshaled kvrwset.KVRWSet
     * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @param index The index of the element to return. * @return The payload at the given index. */ public com.google.protobuf.ByteString getPayload(int index) { return payload_.get(index); } /** *
     * the payload is a marshaled kvrwset.KVRWSet
     * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @param index The index to set the value at. * @param value The payload to set. * @return This builder for chaining. */ public Builder setPayload( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensurePayloadIsMutable(); payload_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * the payload is a marshaled kvrwset.KVRWSet
     * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @param value The payload to add. * @return This builder for chaining. */ public Builder addPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensurePayloadIsMutable(); payload_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * the payload is a marshaled kvrwset.KVRWSet
     * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @param values The payload to add. * @return This builder for chaining. */ public Builder addAllPayload( java.lang.Iterable values) { ensurePayloadIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, payload_); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * the payload is a marshaled kvrwset.KVRWSet
     * 
* * repeated bytes payload = 2 [json_name = "payload"]; * @return This builder for chaining. */ public Builder clearPayload() { payload_ = emptyList(com.google.protobuf.ByteString.class); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:gossip.PvtDataElement) } // @@protoc_insertion_point(class_scope:gossip.PvtDataElement) private static final org.hyperledger.fabric.protos.gossip.PvtDataElement DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.PvtDataElement(); } public static org.hyperledger.fabric.protos.gossip.PvtDataElement getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PvtDataElement parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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.gossip.PvtDataElement getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy