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

org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource Maven / Gradle / Ivy

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

package org.hyperledger.fabric.protos.peer.lifecycle;

/**
 * Protobuf type {@code lifecycle.ChaincodeSource}
 */
public final class ChaincodeSource extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:lifecycle.ChaincodeSource)
    ChaincodeSourceOrBuilder {
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= */ "",
      ChaincodeSource.class.getName());
  }
  // Use ChaincodeSource.newBuilder() to construct.
  private ChaincodeSource(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private ChaincodeSource() {
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.class, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Builder.class);
  }

  public interface UnavailableOrBuilder extends
      // @@protoc_insertion_point(interface_extends:lifecycle.ChaincodeSource.Unavailable)
      com.google.protobuf.MessageOrBuilder {
  }
  /**
   * Protobuf type {@code lifecycle.ChaincodeSource.Unavailable}
   */
  public static final class Unavailable extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:lifecycle.ChaincodeSource.Unavailable)
      UnavailableOrBuilder {
  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= */ "",
        Unavailable.class.getName());
    }
    // Use Unavailable.newBuilder() to construct.
    private Unavailable(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
    }
    private Unavailable() {
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Unavailable_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Unavailable_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.class, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.Builder.class);
    }

    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 {
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      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.peer.lifecycle.ChaincodeSource.Unavailable)) {
        return super.equals(obj);
      }
      org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable other = (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) obj;

      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();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable 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.peer.lifecycle.ChaincodeSource.Unavailable parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable 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.lifecycle.ChaincodeSource.Unavailable parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable 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.lifecycle.ChaincodeSource.Unavailable parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable 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.peer.lifecycle.ChaincodeSource.Unavailable parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable 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.peer.lifecycle.ChaincodeSource.Unavailable parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable 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.peer.lifecycle.ChaincodeSource.Unavailable 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 lifecycle.ChaincodeSource.Unavailable}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder implements
        // @@protoc_insertion_point(builder_implements:lifecycle.ChaincodeSource.Unavailable)
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.UnavailableOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Unavailable_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Unavailable_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.class, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.Builder.class);
      }

      // Construct using org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.newBuilder()
      private Builder() {

      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);

      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Unavailable_descriptor;
      }

      @java.lang.Override
      public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable getDefaultInstanceForType() {
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance();
      }

      @java.lang.Override
      public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable build() {
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable buildPartial() {
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable result = new org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable(this);
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) {
          return mergeFrom((org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable other) {
        if (other == org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance()) return this;
        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;
              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;
      }

      // @@protoc_insertion_point(builder_scope:lifecycle.ChaincodeSource.Unavailable)
    }

    // @@protoc_insertion_point(class_scope:lifecycle.ChaincodeSource.Unavailable)
    private static final org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable();
    }

    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser
        PARSER = new com.google.protobuf.AbstractParser() {
      @java.lang.Override
      public Unavailable 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.peer.lifecycle.ChaincodeSource.Unavailable getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LocalOrBuilder extends
      // @@protoc_insertion_point(interface_extends:lifecycle.ChaincodeSource.Local)
      com.google.protobuf.MessageOrBuilder {

    /**
     * string package_id = 1 [json_name = "packageId"];
     * @return The packageId.
     */
    java.lang.String getPackageId();
    /**
     * string package_id = 1 [json_name = "packageId"];
     * @return The bytes for packageId.
     */
    com.google.protobuf.ByteString
        getPackageIdBytes();
  }
  /**
   * Protobuf type {@code lifecycle.ChaincodeSource.Local}
   */
  public static final class Local extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:lifecycle.ChaincodeSource.Local)
      LocalOrBuilder {
  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= */ "",
        Local.class.getName());
    }
    // Use Local.newBuilder() to construct.
    private Local(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
    }
    private Local() {
      packageId_ = "";
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Local_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Local_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.class, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.Builder.class);
    }

    public static final int PACKAGE_ID_FIELD_NUMBER = 1;
    @SuppressWarnings("serial")
    private volatile java.lang.Object packageId_ = "";
    /**
     * string package_id = 1 [json_name = "packageId"];
     * @return The packageId.
     */
    @java.lang.Override
    public java.lang.String getPackageId() {
      java.lang.Object ref = packageId_;
      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();
        packageId_ = s;
        return s;
      }
    }
    /**
     * string package_id = 1 [json_name = "packageId"];
     * @return The bytes for packageId.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getPackageIdBytes() {
      java.lang.Object ref = packageId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        packageId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(packageId_)) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, packageId_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(packageId_)) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, packageId_);
      }
      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.peer.lifecycle.ChaincodeSource.Local)) {
        return super.equals(obj);
      }
      org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local other = (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) obj;

      if (!getPackageId()
          .equals(other.getPackageId())) 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();
      hash = (37 * hash) + PACKAGE_ID_FIELD_NUMBER;
      hash = (53 * hash) + getPackageId().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local 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.peer.lifecycle.ChaincodeSource.Local parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local 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.lifecycle.ChaincodeSource.Local parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local 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.lifecycle.ChaincodeSource.Local parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local 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.peer.lifecycle.ChaincodeSource.Local parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local 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.peer.lifecycle.ChaincodeSource.Local parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local 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.peer.lifecycle.ChaincodeSource.Local 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 lifecycle.ChaincodeSource.Local}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder implements
        // @@protoc_insertion_point(builder_implements:lifecycle.ChaincodeSource.Local)
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.LocalOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Local_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Local_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.class, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.Builder.class);
      }

      // Construct using org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.newBuilder()
      private Builder() {

      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);

      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        packageId_ = "";
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_Local_descriptor;
      }

      @java.lang.Override
      public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local getDefaultInstanceForType() {
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance();
      }

      @java.lang.Override
      public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local build() {
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local buildPartial() {
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local result = new org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local(this);
        if (bitField0_ != 0) { buildPartial0(result); }
        onBuilt();
        return result;
      }

      private void buildPartial0(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.packageId_ = packageId_;
        }
      }

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) {
          return mergeFrom((org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local other) {
        if (other == org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance()) return this;
        if (!other.getPackageId().isEmpty()) {
          packageId_ = other.packageId_;
          bitField0_ |= 0x00000001;
          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: {
                packageId_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
              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 java.lang.Object packageId_ = "";
      /**
       * string package_id = 1 [json_name = "packageId"];
       * @return The packageId.
       */
      public java.lang.String getPackageId() {
        java.lang.Object ref = packageId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          packageId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * string package_id = 1 [json_name = "packageId"];
       * @return The bytes for packageId.
       */
      public com.google.protobuf.ByteString
          getPackageIdBytes() {
        java.lang.Object ref = packageId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          packageId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * string package_id = 1 [json_name = "packageId"];
       * @param value The packageId to set.
       * @return This builder for chaining.
       */
      public Builder setPackageId(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        packageId_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       * string package_id = 1 [json_name = "packageId"];
       * @return This builder for chaining.
       */
      public Builder clearPackageId() {
        packageId_ = getDefaultInstance().getPackageId();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       * string package_id = 1 [json_name = "packageId"];
       * @param value The bytes for packageId to set.
       * @return This builder for chaining.
       */
      public Builder setPackageIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        packageId_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:lifecycle.ChaincodeSource.Local)
    }

    // @@protoc_insertion_point(class_scope:lifecycle.ChaincodeSource.Local)
    private static final org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local();
    }

    public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser
        PARSER = new com.google.protobuf.AbstractParser() {
      @java.lang.Override
      public Local 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.peer.lifecycle.ChaincodeSource.Local getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int typeCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object type_;
  public enum TypeCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    UNAVAILABLE(1),
    LOCAL_PACKAGE(2),
    TYPE_NOT_SET(0);
    private final int value;
    private TypeCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static TypeCase valueOf(int value) {
      return forNumber(value);
    }

    public static TypeCase forNumber(int value) {
      switch (value) {
        case 1: return UNAVAILABLE;
        case 2: return LOCAL_PACKAGE;
        case 0: return TYPE_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public TypeCase
  getTypeCase() {
    return TypeCase.forNumber(
        typeCase_);
  }

  public static final int UNAVAILABLE_FIELD_NUMBER = 1;
  /**
   * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
   * @return Whether the unavailable field is set.
   */
  @java.lang.Override
  public boolean hasUnavailable() {
    return typeCase_ == 1;
  }
  /**
   * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
   * @return The unavailable.
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable getUnavailable() {
    if (typeCase_ == 1) {
       return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_;
    }
    return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance();
  }
  /**
   * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.UnavailableOrBuilder getUnavailableOrBuilder() {
    if (typeCase_ == 1) {
       return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_;
    }
    return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance();
  }

  public static final int LOCAL_PACKAGE_FIELD_NUMBER = 2;
  /**
   * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
   * @return Whether the localPackage field is set.
   */
  @java.lang.Override
  public boolean hasLocalPackage() {
    return typeCase_ == 2;
  }
  /**
   * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
   * @return The localPackage.
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local getLocalPackage() {
    if (typeCase_ == 2) {
       return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_;
    }
    return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance();
  }
  /**
   * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
   */
  @java.lang.Override
  public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.LocalOrBuilder getLocalPackageOrBuilder() {
    if (typeCase_ == 2) {
       return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_;
    }
    return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance();
  }

  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 (typeCase_ == 1) {
      output.writeMessage(1, (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_);
    }
    if (typeCase_ == 2) {
      output.writeMessage(2, (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (typeCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_);
    }
    if (typeCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_);
    }
    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.peer.lifecycle.ChaincodeSource)) {
      return super.equals(obj);
    }
    org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource other = (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource) obj;

    if (!getTypeCase().equals(other.getTypeCase())) return false;
    switch (typeCase_) {
      case 1:
        if (!getUnavailable()
            .equals(other.getUnavailable())) return false;
        break;
      case 2:
        if (!getLocalPackage()
            .equals(other.getLocalPackage())) return false;
        break;
      case 0:
      default:
    }
    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();
    switch (typeCase_) {
      case 1:
        hash = (37 * hash) + UNAVAILABLE_FIELD_NUMBER;
        hash = (53 * hash) + getUnavailable().hashCode();
        break;
      case 2:
        hash = (37 * hash) + LOCAL_PACKAGE_FIELD_NUMBER;
        hash = (53 * hash) + getLocalPackage().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource 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.peer.lifecycle.ChaincodeSource parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource 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.lifecycle.ChaincodeSource parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource 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.lifecycle.ChaincodeSource parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource 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.peer.lifecycle.ChaincodeSource parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource 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.peer.lifecycle.ChaincodeSource parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource 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.peer.lifecycle.ChaincodeSource 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 lifecycle.ChaincodeSource}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder implements
      // @@protoc_insertion_point(builder_implements:lifecycle.ChaincodeSource)
      org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSourceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.class, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Builder.class);
    }

    // Construct using org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (unavailableBuilder_ != null) {
        unavailableBuilder_.clear();
      }
      if (localPackageBuilder_ != null) {
        localPackageBuilder_.clear();
      }
      typeCase_ = 0;
      type_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_ChaincodeSource_descriptor;
    }

    @java.lang.Override
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource getDefaultInstanceForType() {
      return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.getDefaultInstance();
    }

    @java.lang.Override
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource build() {
      org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource buildPartial() {
      org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource result = new org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartial0(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource result) {
      result.typeCase_ = typeCase_;
      result.type_ = this.type_;
      if (typeCase_ == 1 &&
          unavailableBuilder_ != null) {
        result.type_ = unavailableBuilder_.build();
      }
      if (typeCase_ == 2 &&
          localPackageBuilder_ != null) {
        result.type_ = localPackageBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource) {
        return mergeFrom((org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource other) {
      if (other == org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.getDefaultInstance()) return this;
      switch (other.getTypeCase()) {
        case UNAVAILABLE: {
          mergeUnavailable(other.getUnavailable());
          break;
        }
        case LOCAL_PACKAGE: {
          mergeLocalPackage(other.getLocalPackage());
          break;
        }
        case TYPE_NOT_SET: {
          break;
        }
      }
      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(
                  getUnavailableFieldBuilder().getBuilder(),
                  extensionRegistry);
              typeCase_ = 1;
              break;
            } // case 10
            case 18: {
              input.readMessage(
                  getLocalPackageFieldBuilder().getBuilder(),
                  extensionRegistry);
              typeCase_ = 2;
              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 typeCase_ = 0;
    private java.lang.Object type_;
    public TypeCase
        getTypeCase() {
      return TypeCase.forNumber(
          typeCase_);
    }

    public Builder clearType() {
      typeCase_ = 0;
      type_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.SingleFieldBuilder<
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.Builder, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.UnavailableOrBuilder> unavailableBuilder_;
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     * @return Whether the unavailable field is set.
     */
    @java.lang.Override
    public boolean hasUnavailable() {
      return typeCase_ == 1;
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     * @return The unavailable.
     */
    @java.lang.Override
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable getUnavailable() {
      if (unavailableBuilder_ == null) {
        if (typeCase_ == 1) {
          return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_;
        }
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance();
      } else {
        if (typeCase_ == 1) {
          return unavailableBuilder_.getMessage();
        }
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance();
      }
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     */
    public Builder setUnavailable(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable value) {
      if (unavailableBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        onChanged();
      } else {
        unavailableBuilder_.setMessage(value);
      }
      typeCase_ = 1;
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     */
    public Builder setUnavailable(
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.Builder builderForValue) {
      if (unavailableBuilder_ == null) {
        type_ = builderForValue.build();
        onChanged();
      } else {
        unavailableBuilder_.setMessage(builderForValue.build());
      }
      typeCase_ = 1;
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     */
    public Builder mergeUnavailable(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable value) {
      if (unavailableBuilder_ == null) {
        if (typeCase_ == 1 &&
            type_ != org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance()) {
          type_ = org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.newBuilder((org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_)
              .mergeFrom(value).buildPartial();
        } else {
          type_ = value;
        }
        onChanged();
      } else {
        if (typeCase_ == 1) {
          unavailableBuilder_.mergeFrom(value);
        } else {
          unavailableBuilder_.setMessage(value);
        }
      }
      typeCase_ = 1;
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     */
    public Builder clearUnavailable() {
      if (unavailableBuilder_ == null) {
        if (typeCase_ == 1) {
          typeCase_ = 0;
          type_ = null;
          onChanged();
        }
      } else {
        if (typeCase_ == 1) {
          typeCase_ = 0;
          type_ = null;
        }
        unavailableBuilder_.clear();
      }
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     */
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.Builder getUnavailableBuilder() {
      return getUnavailableFieldBuilder().getBuilder();
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     */
    @java.lang.Override
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.UnavailableOrBuilder getUnavailableOrBuilder() {
      if ((typeCase_ == 1) && (unavailableBuilder_ != null)) {
        return unavailableBuilder_.getMessageOrBuilder();
      } else {
        if (typeCase_ == 1) {
          return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_;
        }
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance();
      }
    }
    /**
     * .lifecycle.ChaincodeSource.Unavailable unavailable = 1 [json_name = "unavailable"];
     */
    private com.google.protobuf.SingleFieldBuilder<
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.Builder, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.UnavailableOrBuilder> 
        getUnavailableFieldBuilder() {
      if (unavailableBuilder_ == null) {
        if (!(typeCase_ == 1)) {
          type_ = org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.getDefaultInstance();
        }
        unavailableBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable.Builder, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.UnavailableOrBuilder>(
                (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Unavailable) type_,
                getParentForChildren(),
                isClean());
        type_ = null;
      }
      typeCase_ = 1;
      onChanged();
      return unavailableBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilder<
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.Builder, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.LocalOrBuilder> localPackageBuilder_;
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     * @return Whether the localPackage field is set.
     */
    @java.lang.Override
    public boolean hasLocalPackage() {
      return typeCase_ == 2;
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     * @return The localPackage.
     */
    @java.lang.Override
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local getLocalPackage() {
      if (localPackageBuilder_ == null) {
        if (typeCase_ == 2) {
          return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_;
        }
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance();
      } else {
        if (typeCase_ == 2) {
          return localPackageBuilder_.getMessage();
        }
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance();
      }
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     */
    public Builder setLocalPackage(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local value) {
      if (localPackageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        onChanged();
      } else {
        localPackageBuilder_.setMessage(value);
      }
      typeCase_ = 2;
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     */
    public Builder setLocalPackage(
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.Builder builderForValue) {
      if (localPackageBuilder_ == null) {
        type_ = builderForValue.build();
        onChanged();
      } else {
        localPackageBuilder_.setMessage(builderForValue.build());
      }
      typeCase_ = 2;
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     */
    public Builder mergeLocalPackage(org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local value) {
      if (localPackageBuilder_ == null) {
        if (typeCase_ == 2 &&
            type_ != org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance()) {
          type_ = org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.newBuilder((org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_)
              .mergeFrom(value).buildPartial();
        } else {
          type_ = value;
        }
        onChanged();
      } else {
        if (typeCase_ == 2) {
          localPackageBuilder_.mergeFrom(value);
        } else {
          localPackageBuilder_.setMessage(value);
        }
      }
      typeCase_ = 2;
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     */
    public Builder clearLocalPackage() {
      if (localPackageBuilder_ == null) {
        if (typeCase_ == 2) {
          typeCase_ = 0;
          type_ = null;
          onChanged();
        }
      } else {
        if (typeCase_ == 2) {
          typeCase_ = 0;
          type_ = null;
        }
        localPackageBuilder_.clear();
      }
      return this;
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     */
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.Builder getLocalPackageBuilder() {
      return getLocalPackageFieldBuilder().getBuilder();
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     */
    @java.lang.Override
    public org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.LocalOrBuilder getLocalPackageOrBuilder() {
      if ((typeCase_ == 2) && (localPackageBuilder_ != null)) {
        return localPackageBuilder_.getMessageOrBuilder();
      } else {
        if (typeCase_ == 2) {
          return (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_;
        }
        return org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance();
      }
    }
    /**
     * .lifecycle.ChaincodeSource.Local local_package = 2 [json_name = "localPackage"];
     */
    private com.google.protobuf.SingleFieldBuilder<
        org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.Builder, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.LocalOrBuilder> 
        getLocalPackageFieldBuilder() {
      if (localPackageBuilder_ == null) {
        if (!(typeCase_ == 2)) {
          type_ = org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.getDefaultInstance();
        }
        localPackageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local.Builder, org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.LocalOrBuilder>(
                (org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource.Local) type_,
                getParentForChildren(),
                isClean());
        type_ = null;
      }
      typeCase_ = 2;
      onChanged();
      return localPackageBuilder_;
    }

    // @@protoc_insertion_point(builder_scope:lifecycle.ChaincodeSource)
  }

  // @@protoc_insertion_point(class_scope:lifecycle.ChaincodeSource)
  private static final org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource();
  }

  public static org.hyperledger.fabric.protos.peer.lifecycle.ChaincodeSource getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public ChaincodeSource 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.peer.lifecycle.ChaincodeSource getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy