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

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

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

package io.provenance.metadata.v0;

/**
 * Protobuf type {@code contract.ExecutionResult}
 */
public  final class ExecutionResult extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:contract.ExecutionResult)
    ExecutionResultOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ExecutionResult.newBuilder() to construct.
  private ExecutionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private ExecutionResult() {
    result_ = 0;
    errorMessage_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ExecutionResult(
      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: {
            io.provenance.metadata.v0.ProposedFact.Builder subBuilder = null;
            if (output_ != null) {
              subBuilder = output_.toBuilder();
            }
            output_ = input.readMessage(io.provenance.metadata.v0.ProposedFact.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(output_);
              output_ = subBuilder.buildPartial();
            }

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

            result_ = rawValue;
            break;
          }
          case 26: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (recordedAt_ != null) {
              subBuilder = recordedAt_.toBuilder();
            }
            recordedAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(recordedAt_);
              recordedAt_ = subBuilder.buildPartial();
            }

            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            errorMessage_ = s;
            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.ContractOuterClass.internal_static_contract_ExecutionResult_descriptor;
  }

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

  public static final int OUTPUT_FIELD_NUMBER = 1;
  private io.provenance.metadata.v0.ProposedFact output_;
  /**
   * .contract.ProposedFact output = 1;
   */
  public boolean hasOutput() {
    return output_ != null;
  }
  /**
   * .contract.ProposedFact output = 1;
   */
  public io.provenance.metadata.v0.ProposedFact getOutput() {
    return output_ == null ? io.provenance.metadata.v0.ProposedFact.getDefaultInstance() : output_;
  }
  /**
   * .contract.ProposedFact output = 1;
   */
  public io.provenance.metadata.v0.ProposedFactOrBuilder getOutputOrBuilder() {
    return getOutput();
  }

  public static final int RESULT_FIELD_NUMBER = 2;
  private int result_;
  /**
   * .contract.ExecutionResultType result = 2;
   */
  public int getResultValue() {
    return result_;
  }
  /**
   * .contract.ExecutionResultType result = 2;
   */
  public io.provenance.metadata.v0.ExecutionResultType getResult() {
    @SuppressWarnings("deprecation")
    io.provenance.metadata.v0.ExecutionResultType result = io.provenance.metadata.v0.ExecutionResultType.valueOf(result_);
    return result == null ? io.provenance.metadata.v0.ExecutionResultType.UNRECOGNIZED : result;
  }

  public static final int RECORDED_AT_FIELD_NUMBER = 3;
  private com.google.protobuf.Timestamp recordedAt_;
  /**
   * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
   */
  public boolean hasRecordedAt() {
    return recordedAt_ != null;
  }
  /**
   * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
   */
  public com.google.protobuf.Timestamp getRecordedAt() {
    return recordedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : recordedAt_;
  }
  /**
   * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
   */
  public com.google.protobuf.TimestampOrBuilder getRecordedAtOrBuilder() {
    return getRecordedAt();
  }

  public static final int ERROR_MESSAGE_FIELD_NUMBER = 4;
  private volatile java.lang.Object errorMessage_;
  /**
   * string error_message = 4;
   */
  public java.lang.String getErrorMessage() {
    java.lang.Object ref = errorMessage_;
    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();
      errorMessage_ = s;
      return s;
    }
  }
  /**
   * string error_message = 4;
   */
  public com.google.protobuf.ByteString
      getErrorMessageBytes() {
    java.lang.Object ref = errorMessage_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      errorMessage_ = 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 (output_ != null) {
      output.writeMessage(1, getOutput());
    }
    if (result_ != io.provenance.metadata.v0.ExecutionResultType.RESULT_TYPE_UNKNOWN.getNumber()) {
      output.writeEnum(2, result_);
    }
    if (recordedAt_ != null) {
      output.writeMessage(3, getRecordedAt());
    }
    if (!getErrorMessageBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, errorMessage_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (output_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getOutput());
    }
    if (result_ != io.provenance.metadata.v0.ExecutionResultType.RESULT_TYPE_UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(2, result_);
    }
    if (recordedAt_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getRecordedAt());
    }
    if (!getErrorMessageBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, errorMessage_);
    }
    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.ExecutionResult)) {
      return super.equals(obj);
    }
    io.provenance.metadata.v0.ExecutionResult other = (io.provenance.metadata.v0.ExecutionResult) obj;

    boolean result = true;
    result = result && (hasOutput() == other.hasOutput());
    if (hasOutput()) {
      result = result && getOutput()
          .equals(other.getOutput());
    }
    result = result && result_ == other.result_;
    result = result && (hasRecordedAt() == other.hasRecordedAt());
    if (hasRecordedAt()) {
      result = result && getRecordedAt()
          .equals(other.getRecordedAt());
    }
    result = result && getErrorMessage()
        .equals(other.getErrorMessage());
    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();
    if (hasOutput()) {
      hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
      hash = (53 * hash) + getOutput().hashCode();
    }
    hash = (37 * hash) + RESULT_FIELD_NUMBER;
    hash = (53 * hash) + result_;
    if (hasRecordedAt()) {
      hash = (37 * hash) + RECORDED_AT_FIELD_NUMBER;
      hash = (53 * hash) + getRecordedAt().hashCode();
    }
    hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER;
    hash = (53 * hash) + getErrorMessage().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

    // Construct using io.provenance.metadata.v0.ExecutionResult.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();
      if (outputBuilder_ == null) {
        output_ = null;
      } else {
        output_ = null;
        outputBuilder_ = null;
      }
      result_ = 0;

      if (recordedAtBuilder_ == null) {
        recordedAt_ = null;
      } else {
        recordedAt_ = null;
        recordedAtBuilder_ = null;
      }
      errorMessage_ = "";

      return this;
    }

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

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

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

    @java.lang.Override
    public io.provenance.metadata.v0.ExecutionResult buildPartial() {
      io.provenance.metadata.v0.ExecutionResult result = new io.provenance.metadata.v0.ExecutionResult(this);
      if (outputBuilder_ == null) {
        result.output_ = output_;
      } else {
        result.output_ = outputBuilder_.build();
      }
      result.result_ = result_;
      if (recordedAtBuilder_ == null) {
        result.recordedAt_ = recordedAt_;
      } else {
        result.recordedAt_ = recordedAtBuilder_.build();
      }
      result.errorMessage_ = errorMessage_;
      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.ExecutionResult) {
        return mergeFrom((io.provenance.metadata.v0.ExecutionResult)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.provenance.metadata.v0.ExecutionResult other) {
      if (other == io.provenance.metadata.v0.ExecutionResult.getDefaultInstance()) return this;
      if (other.hasOutput()) {
        mergeOutput(other.getOutput());
      }
      if (other.result_ != 0) {
        setResultValue(other.getResultValue());
      }
      if (other.hasRecordedAt()) {
        mergeRecordedAt(other.getRecordedAt());
      }
      if (!other.getErrorMessage().isEmpty()) {
        errorMessage_ = other.errorMessage_;
        onChanged();
      }
      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.ExecutionResult parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.provenance.metadata.v0.ExecutionResult) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private io.provenance.metadata.v0.ProposedFact output_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.provenance.metadata.v0.ProposedFact, io.provenance.metadata.v0.ProposedFact.Builder, io.provenance.metadata.v0.ProposedFactOrBuilder> outputBuilder_;
    /**
     * .contract.ProposedFact output = 1;
     */
    public boolean hasOutput() {
      return outputBuilder_ != null || output_ != null;
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    public io.provenance.metadata.v0.ProposedFact getOutput() {
      if (outputBuilder_ == null) {
        return output_ == null ? io.provenance.metadata.v0.ProposedFact.getDefaultInstance() : output_;
      } else {
        return outputBuilder_.getMessage();
      }
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    public Builder setOutput(io.provenance.metadata.v0.ProposedFact value) {
      if (outputBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        output_ = value;
        onChanged();
      } else {
        outputBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    public Builder setOutput(
        io.provenance.metadata.v0.ProposedFact.Builder builderForValue) {
      if (outputBuilder_ == null) {
        output_ = builderForValue.build();
        onChanged();
      } else {
        outputBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    public Builder mergeOutput(io.provenance.metadata.v0.ProposedFact value) {
      if (outputBuilder_ == null) {
        if (output_ != null) {
          output_ =
            io.provenance.metadata.v0.ProposedFact.newBuilder(output_).mergeFrom(value).buildPartial();
        } else {
          output_ = value;
        }
        onChanged();
      } else {
        outputBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    public Builder clearOutput() {
      if (outputBuilder_ == null) {
        output_ = null;
        onChanged();
      } else {
        output_ = null;
        outputBuilder_ = null;
      }

      return this;
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    public io.provenance.metadata.v0.ProposedFact.Builder getOutputBuilder() {
      
      onChanged();
      return getOutputFieldBuilder().getBuilder();
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    public io.provenance.metadata.v0.ProposedFactOrBuilder getOutputOrBuilder() {
      if (outputBuilder_ != null) {
        return outputBuilder_.getMessageOrBuilder();
      } else {
        return output_ == null ?
            io.provenance.metadata.v0.ProposedFact.getDefaultInstance() : output_;
      }
    }
    /**
     * .contract.ProposedFact output = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.provenance.metadata.v0.ProposedFact, io.provenance.metadata.v0.ProposedFact.Builder, io.provenance.metadata.v0.ProposedFactOrBuilder> 
        getOutputFieldBuilder() {
      if (outputBuilder_ == null) {
        outputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.provenance.metadata.v0.ProposedFact, io.provenance.metadata.v0.ProposedFact.Builder, io.provenance.metadata.v0.ProposedFactOrBuilder>(
                getOutput(),
                getParentForChildren(),
                isClean());
        output_ = null;
      }
      return outputBuilder_;
    }

    private int result_ = 0;
    /**
     * .contract.ExecutionResultType result = 2;
     */
    public int getResultValue() {
      return result_;
    }
    /**
     * .contract.ExecutionResultType result = 2;
     */
    public Builder setResultValue(int value) {
      result_ = value;
      onChanged();
      return this;
    }
    /**
     * .contract.ExecutionResultType result = 2;
     */
    public io.provenance.metadata.v0.ExecutionResultType getResult() {
      @SuppressWarnings("deprecation")
      io.provenance.metadata.v0.ExecutionResultType result = io.provenance.metadata.v0.ExecutionResultType.valueOf(result_);
      return result == null ? io.provenance.metadata.v0.ExecutionResultType.UNRECOGNIZED : result;
    }
    /**
     * .contract.ExecutionResultType result = 2;
     */
    public Builder setResult(io.provenance.metadata.v0.ExecutionResultType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      result_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .contract.ExecutionResultType result = 2;
     */
    public Builder clearResult() {
      
      result_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp recordedAt_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> recordedAtBuilder_;
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public boolean hasRecordedAt() {
      return recordedAtBuilder_ != null || recordedAt_ != null;
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public com.google.protobuf.Timestamp getRecordedAt() {
      if (recordedAtBuilder_ == null) {
        return recordedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : recordedAt_;
      } else {
        return recordedAtBuilder_.getMessage();
      }
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public Builder setRecordedAt(com.google.protobuf.Timestamp value) {
      if (recordedAtBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        recordedAt_ = value;
        onChanged();
      } else {
        recordedAtBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public Builder setRecordedAt(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (recordedAtBuilder_ == null) {
        recordedAt_ = builderForValue.build();
        onChanged();
      } else {
        recordedAtBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public Builder mergeRecordedAt(com.google.protobuf.Timestamp value) {
      if (recordedAtBuilder_ == null) {
        if (recordedAt_ != null) {
          recordedAt_ =
            com.google.protobuf.Timestamp.newBuilder(recordedAt_).mergeFrom(value).buildPartial();
        } else {
          recordedAt_ = value;
        }
        onChanged();
      } else {
        recordedAtBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public Builder clearRecordedAt() {
      if (recordedAtBuilder_ == null) {
        recordedAt_ = null;
        onChanged();
      } else {
        recordedAt_ = null;
        recordedAtBuilder_ = null;
      }

      return this;
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public com.google.protobuf.Timestamp.Builder getRecordedAtBuilder() {
      
      onChanged();
      return getRecordedAtFieldBuilder().getBuilder();
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    public com.google.protobuf.TimestampOrBuilder getRecordedAtOrBuilder() {
      if (recordedAtBuilder_ != null) {
        return recordedAtBuilder_.getMessageOrBuilder();
      } else {
        return recordedAt_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : recordedAt_;
      }
    }
    /**
     * .google.protobuf.Timestamp recorded_at = 3 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"recorded_at\"", (.gogoproto.stdtime) = true];
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getRecordedAtFieldBuilder() {
      if (recordedAtBuilder_ == null) {
        recordedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getRecordedAt(),
                getParentForChildren(),
                isClean());
        recordedAt_ = null;
      }
      return recordedAtBuilder_;
    }

    private java.lang.Object errorMessage_ = "";
    /**
     * string error_message = 4;
     */
    public java.lang.String getErrorMessage() {
      java.lang.Object ref = errorMessage_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        errorMessage_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string error_message = 4;
     */
    public com.google.protobuf.ByteString
        getErrorMessageBytes() {
      java.lang.Object ref = errorMessage_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        errorMessage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string error_message = 4;
     */
    public Builder setErrorMessage(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      errorMessage_ = value;
      onChanged();
      return this;
    }
    /**
     * string error_message = 4;
     */
    public Builder clearErrorMessage() {
      
      errorMessage_ = getDefaultInstance().getErrorMessage();
      onChanged();
      return this;
    }
    /**
     * string error_message = 4;
     */
    public Builder setErrorMessageBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      errorMessage_ = value;
      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:contract.ExecutionResult)
  }

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

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

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy