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

io.provenance.metadata.v0.DefinitionSpec Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: provenance/metadata/v0/spec.proto

package io.provenance.metadata.v0;

/**
 * Protobuf type {@code spec.DefinitionSpec}
 */
public  final class DefinitionSpec extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:spec.DefinitionSpec)
    DefinitionSpecOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DefinitionSpec.newBuilder() to construct.
  private DefinitionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private DefinitionSpec() {
    name_ = "";
    type_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private DefinitionSpec(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    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 10: {
            java.lang.String s = input.readStringRequireUtf8();

            name_ = s;
            break;
          }
          case 18: {
            io.provenance.metadata.v0.Location.Builder subBuilder = null;
            if (resourceLocation_ != null) {
              subBuilder = resourceLocation_.toBuilder();
            }
            resourceLocation_ = input.readMessage(io.provenance.metadata.v0.Location.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(resourceLocation_);
              resourceLocation_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            io.provenance.metadata.v0.Signature.Builder subBuilder = null;
            if (signature_ != null) {
              subBuilder = signature_.toBuilder();
            }
            signature_ = input.readMessage(io.provenance.metadata.v0.Signature.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(signature_);
              signature_ = subBuilder.buildPartial();
            }

            break;
          }
          case 32: {
            int rawValue = input.readEnum();

            type_ = rawValue;
            break;
          }
          default: {
            if (!parseUnknownFieldProto3(
                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 io.provenance.metadata.v0.Spec.internal_static_spec_DefinitionSpec_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.provenance.metadata.v0.Spec.internal_static_spec_DefinitionSpec_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.provenance.metadata.v0.DefinitionSpec.class, io.provenance.metadata.v0.DefinitionSpec.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * string name = 1;
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * string name = 1;
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RESOURCE_LOCATION_FIELD_NUMBER = 2;
  private io.provenance.metadata.v0.Location resourceLocation_;
  /**
   * .types.Location resource_location = 2;
   */
  public boolean hasResourceLocation() {
    return resourceLocation_ != null;
  }
  /**
   * .types.Location resource_location = 2;
   */
  public io.provenance.metadata.v0.Location getResourceLocation() {
    return resourceLocation_ == null ? io.provenance.metadata.v0.Location.getDefaultInstance() : resourceLocation_;
  }
  /**
   * .types.Location resource_location = 2;
   */
  public io.provenance.metadata.v0.LocationOrBuilder getResourceLocationOrBuilder() {
    return getResourceLocation();
  }

  public static final int SIGNATURE_FIELD_NUMBER = 3;
  private io.provenance.metadata.v0.Signature signature_;
  /**
   * .types.Signature signature = 3;
   */
  public boolean hasSignature() {
    return signature_ != null;
  }
  /**
   * .types.Signature signature = 3;
   */
  public io.provenance.metadata.v0.Signature getSignature() {
    return signature_ == null ? io.provenance.metadata.v0.Signature.getDefaultInstance() : signature_;
  }
  /**
   * .types.Signature signature = 3;
   */
  public io.provenance.metadata.v0.SignatureOrBuilder getSignatureOrBuilder() {
    return getSignature();
  }

  public static final int TYPE_FIELD_NUMBER = 4;
  private int type_;
  /**
   * .spec.DefinitionSpecType type = 4;
   */
  public int getTypeValue() {
    return type_;
  }
  /**
   * .spec.DefinitionSpecType type = 4;
   */
  public io.provenance.metadata.v0.DefinitionSpecType getType() {
    @SuppressWarnings("deprecation")
    io.provenance.metadata.v0.DefinitionSpecType result = io.provenance.metadata.v0.DefinitionSpecType.valueOf(type_);
    return result == null ? io.provenance.metadata.v0.DefinitionSpecType.UNRECOGNIZED : result;
  }

  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 (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (resourceLocation_ != null) {
      output.writeMessage(2, getResourceLocation());
    }
    if (signature_ != null) {
      output.writeMessage(3, getSignature());
    }
    if (type_ != io.provenance.metadata.v0.DefinitionSpecType.DEFINITION_SPEC_TYPE_UNKNOWN.getNumber()) {
      output.writeEnum(4, type_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (resourceLocation_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getResourceLocation());
    }
    if (signature_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getSignature());
    }
    if (type_ != io.provenance.metadata.v0.DefinitionSpecType.DEFINITION_SPEC_TYPE_UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, type_);
    }
    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 io.provenance.metadata.v0.DefinitionSpec)) {
      return super.equals(obj);
    }
    io.provenance.metadata.v0.DefinitionSpec other = (io.provenance.metadata.v0.DefinitionSpec) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && (hasResourceLocation() == other.hasResourceLocation());
    if (hasResourceLocation()) {
      result = result && getResourceLocation()
          .equals(other.getResourceLocation());
    }
    result = result && (hasSignature() == other.hasSignature());
    if (hasSignature()) {
      result = result && getSignature()
          .equals(other.getSignature());
    }
    result = result && type_ == other.type_;
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (hasResourceLocation()) {
      hash = (37 * hash) + RESOURCE_LOCATION_FIELD_NUMBER;
      hash = (53 * hash) + getResourceLocation().hashCode();
    }
    if (hasSignature()) {
      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
      hash = (53 * hash) + getSignature().hashCode();
    }
    hash = (37 * hash) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + type_;
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.provenance.metadata.v0.DefinitionSpec parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.provenance.metadata.v0.DefinitionSpec parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.provenance.metadata.v0.DefinitionSpec parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.provenance.metadata.v0.DefinitionSpec parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.provenance.metadata.v0.DefinitionSpec parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.provenance.metadata.v0.DefinitionSpec parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.provenance.metadata.v0.DefinitionSpec parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.provenance.metadata.v0.DefinitionSpec 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 io.provenance.metadata.v0.DefinitionSpec parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.provenance.metadata.v0.DefinitionSpec 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 io.provenance.metadata.v0.DefinitionSpec parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.provenance.metadata.v0.DefinitionSpec 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(io.provenance.metadata.v0.DefinitionSpec 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;
  }
  /**
   * Protobuf type {@code spec.DefinitionSpec}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:spec.DefinitionSpec)
      io.provenance.metadata.v0.DefinitionSpecOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.provenance.metadata.v0.Spec.internal_static_spec_DefinitionSpec_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.provenance.metadata.v0.Spec.internal_static_spec_DefinitionSpec_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.provenance.metadata.v0.DefinitionSpec.class, io.provenance.metadata.v0.DefinitionSpec.Builder.class);
    }

    // Construct using io.provenance.metadata.v0.DefinitionSpec.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();
      name_ = "";

      if (resourceLocationBuilder_ == null) {
        resourceLocation_ = null;
      } else {
        resourceLocation_ = null;
        resourceLocationBuilder_ = null;
      }
      if (signatureBuilder_ == null) {
        signature_ = null;
      } else {
        signature_ = null;
        signatureBuilder_ = null;
      }
      type_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.provenance.metadata.v0.Spec.internal_static_spec_DefinitionSpec_descriptor;
    }

    @java.lang.Override
    public io.provenance.metadata.v0.DefinitionSpec getDefaultInstanceForType() {
      return io.provenance.metadata.v0.DefinitionSpec.getDefaultInstance();
    }

    @java.lang.Override
    public io.provenance.metadata.v0.DefinitionSpec build() {
      io.provenance.metadata.v0.DefinitionSpec result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.provenance.metadata.v0.DefinitionSpec buildPartial() {
      io.provenance.metadata.v0.DefinitionSpec result = new io.provenance.metadata.v0.DefinitionSpec(this);
      result.name_ = name_;
      if (resourceLocationBuilder_ == null) {
        result.resourceLocation_ = resourceLocation_;
      } else {
        result.resourceLocation_ = resourceLocationBuilder_.build();
      }
      if (signatureBuilder_ == null) {
        result.signature_ = signature_;
      } else {
        result.signature_ = signatureBuilder_.build();
      }
      result.type_ = type_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return (Builder) super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof io.provenance.metadata.v0.DefinitionSpec) {
        return mergeFrom((io.provenance.metadata.v0.DefinitionSpec)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.provenance.metadata.v0.DefinitionSpec other) {
      if (other == io.provenance.metadata.v0.DefinitionSpec.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.hasResourceLocation()) {
        mergeResourceLocation(other.getResourceLocation());
      }
      if (other.hasSignature()) {
        mergeSignature(other.getSignature());
      }
      if (other.type_ != 0) {
        setTypeValue(other.getTypeValue());
      }
      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 {
      io.provenance.metadata.v0.DefinitionSpec parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.provenance.metadata.v0.DefinitionSpec) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     * string name = 1;
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string name = 1;
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string name = 1;
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * string name = 1;
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * string name = 1;
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private io.provenance.metadata.v0.Location resourceLocation_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.provenance.metadata.v0.Location, io.provenance.metadata.v0.Location.Builder, io.provenance.metadata.v0.LocationOrBuilder> resourceLocationBuilder_;
    /**
     * .types.Location resource_location = 2;
     */
    public boolean hasResourceLocation() {
      return resourceLocationBuilder_ != null || resourceLocation_ != null;
    }
    /**
     * .types.Location resource_location = 2;
     */
    public io.provenance.metadata.v0.Location getResourceLocation() {
      if (resourceLocationBuilder_ == null) {
        return resourceLocation_ == null ? io.provenance.metadata.v0.Location.getDefaultInstance() : resourceLocation_;
      } else {
        return resourceLocationBuilder_.getMessage();
      }
    }
    /**
     * .types.Location resource_location = 2;
     */
    public Builder setResourceLocation(io.provenance.metadata.v0.Location value) {
      if (resourceLocationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        resourceLocation_ = value;
        onChanged();
      } else {
        resourceLocationBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .types.Location resource_location = 2;
     */
    public Builder setResourceLocation(
        io.provenance.metadata.v0.Location.Builder builderForValue) {
      if (resourceLocationBuilder_ == null) {
        resourceLocation_ = builderForValue.build();
        onChanged();
      } else {
        resourceLocationBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .types.Location resource_location = 2;
     */
    public Builder mergeResourceLocation(io.provenance.metadata.v0.Location value) {
      if (resourceLocationBuilder_ == null) {
        if (resourceLocation_ != null) {
          resourceLocation_ =
            io.provenance.metadata.v0.Location.newBuilder(resourceLocation_).mergeFrom(value).buildPartial();
        } else {
          resourceLocation_ = value;
        }
        onChanged();
      } else {
        resourceLocationBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .types.Location resource_location = 2;
     */
    public Builder clearResourceLocation() {
      if (resourceLocationBuilder_ == null) {
        resourceLocation_ = null;
        onChanged();
      } else {
        resourceLocation_ = null;
        resourceLocationBuilder_ = null;
      }

      return this;
    }
    /**
     * .types.Location resource_location = 2;
     */
    public io.provenance.metadata.v0.Location.Builder getResourceLocationBuilder() {
      
      onChanged();
      return getResourceLocationFieldBuilder().getBuilder();
    }
    /**
     * .types.Location resource_location = 2;
     */
    public io.provenance.metadata.v0.LocationOrBuilder getResourceLocationOrBuilder() {
      if (resourceLocationBuilder_ != null) {
        return resourceLocationBuilder_.getMessageOrBuilder();
      } else {
        return resourceLocation_ == null ?
            io.provenance.metadata.v0.Location.getDefaultInstance() : resourceLocation_;
      }
    }
    /**
     * .types.Location resource_location = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.provenance.metadata.v0.Location, io.provenance.metadata.v0.Location.Builder, io.provenance.metadata.v0.LocationOrBuilder> 
        getResourceLocationFieldBuilder() {
      if (resourceLocationBuilder_ == null) {
        resourceLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.provenance.metadata.v0.Location, io.provenance.metadata.v0.Location.Builder, io.provenance.metadata.v0.LocationOrBuilder>(
                getResourceLocation(),
                getParentForChildren(),
                isClean());
        resourceLocation_ = null;
      }
      return resourceLocationBuilder_;
    }

    private io.provenance.metadata.v0.Signature signature_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.provenance.metadata.v0.Signature, io.provenance.metadata.v0.Signature.Builder, io.provenance.metadata.v0.SignatureOrBuilder> signatureBuilder_;
    /**
     * .types.Signature signature = 3;
     */
    public boolean hasSignature() {
      return signatureBuilder_ != null || signature_ != null;
    }
    /**
     * .types.Signature signature = 3;
     */
    public io.provenance.metadata.v0.Signature getSignature() {
      if (signatureBuilder_ == null) {
        return signature_ == null ? io.provenance.metadata.v0.Signature.getDefaultInstance() : signature_;
      } else {
        return signatureBuilder_.getMessage();
      }
    }
    /**
     * .types.Signature signature = 3;
     */
    public Builder setSignature(io.provenance.metadata.v0.Signature value) {
      if (signatureBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        signature_ = value;
        onChanged();
      } else {
        signatureBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .types.Signature signature = 3;
     */
    public Builder setSignature(
        io.provenance.metadata.v0.Signature.Builder builderForValue) {
      if (signatureBuilder_ == null) {
        signature_ = builderForValue.build();
        onChanged();
      } else {
        signatureBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .types.Signature signature = 3;
     */
    public Builder mergeSignature(io.provenance.metadata.v0.Signature value) {
      if (signatureBuilder_ == null) {
        if (signature_ != null) {
          signature_ =
            io.provenance.metadata.v0.Signature.newBuilder(signature_).mergeFrom(value).buildPartial();
        } else {
          signature_ = value;
        }
        onChanged();
      } else {
        signatureBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .types.Signature signature = 3;
     */
    public Builder clearSignature() {
      if (signatureBuilder_ == null) {
        signature_ = null;
        onChanged();
      } else {
        signature_ = null;
        signatureBuilder_ = null;
      }

      return this;
    }
    /**
     * .types.Signature signature = 3;
     */
    public io.provenance.metadata.v0.Signature.Builder getSignatureBuilder() {
      
      onChanged();
      return getSignatureFieldBuilder().getBuilder();
    }
    /**
     * .types.Signature signature = 3;
     */
    public io.provenance.metadata.v0.SignatureOrBuilder getSignatureOrBuilder() {
      if (signatureBuilder_ != null) {
        return signatureBuilder_.getMessageOrBuilder();
      } else {
        return signature_ == null ?
            io.provenance.metadata.v0.Signature.getDefaultInstance() : signature_;
      }
    }
    /**
     * .types.Signature signature = 3;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.provenance.metadata.v0.Signature, io.provenance.metadata.v0.Signature.Builder, io.provenance.metadata.v0.SignatureOrBuilder> 
        getSignatureFieldBuilder() {
      if (signatureBuilder_ == null) {
        signatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.provenance.metadata.v0.Signature, io.provenance.metadata.v0.Signature.Builder, io.provenance.metadata.v0.SignatureOrBuilder>(
                getSignature(),
                getParentForChildren(),
                isClean());
        signature_ = null;
      }
      return signatureBuilder_;
    }

    private int type_ = 0;
    /**
     * .spec.DefinitionSpecType type = 4;
     */
    public int getTypeValue() {
      return type_;
    }
    /**
     * .spec.DefinitionSpecType type = 4;
     */
    public Builder setTypeValue(int value) {
      type_ = value;
      onChanged();
      return this;
    }
    /**
     * .spec.DefinitionSpecType type = 4;
     */
    public io.provenance.metadata.v0.DefinitionSpecType getType() {
      @SuppressWarnings("deprecation")
      io.provenance.metadata.v0.DefinitionSpecType result = io.provenance.metadata.v0.DefinitionSpecType.valueOf(type_);
      return result == null ? io.provenance.metadata.v0.DefinitionSpecType.UNRECOGNIZED : result;
    }
    /**
     * .spec.DefinitionSpecType type = 4;
     */
    public Builder setType(io.provenance.metadata.v0.DefinitionSpecType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      type_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .spec.DefinitionSpecType type = 4;
     */
    public Builder clearType() {
      
      type_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:spec.DefinitionSpec)
  }

  // @@protoc_insertion_point(class_scope:spec.DefinitionSpec)
  private static final io.provenance.metadata.v0.DefinitionSpec DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.provenance.metadata.v0.DefinitionSpec();
  }

  public static io.provenance.metadata.v0.DefinitionSpec getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public DefinitionSpec parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new DefinitionSpec(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 io.provenance.metadata.v0.DefinitionSpec getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy