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

com.exactpro.th2.act.grpc.hand.RhBatchResponse Maven / Gradle / Ivy

There is a newer version: 3.0.0-dev
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: th2_grpc_hand/rhbatch.proto

package com.exactpro.th2.act.grpc.hand;

/**
 * Protobuf type {@code RhBatchResponse}
 */
public final class RhBatchResponse extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:RhBatchResponse)
    RhBatchResponseOrBuilder {
private static final long serialVersionUID = 0L;
  // Use RhBatchResponse.newBuilder() to construct.
  private RhBatchResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private RhBatchResponse() {
    scriptStatus_ = 0;
    errorMessage_ = "";
    result_ = java.util.Collections.emptyList();
    sessionId_ = "";
    executionId_ = "";
    messageType_ = 0;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new RhBatchResponse();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private RhBatchResponse(
      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 8: {
            int rawValue = input.readEnum();

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

            errorMessage_ = s;
            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              result_ = new java.util.ArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            result_.add(
                input.readMessage(com.exactpro.th2.act.grpc.hand.ResultDetails.parser(), extensionRegistry));
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

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

            executionId_ = s;
            break;
          }
          case 48: {
            int rawValue = input.readEnum();

            messageType_ = rawValue;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        result_ = java.util.Collections.unmodifiableList(result_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.exactpro.th2.act.grpc.hand.Rhbatch.internal_static_RhBatchResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.exactpro.th2.act.grpc.hand.Rhbatch.internal_static_RhBatchResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.exactpro.th2.act.grpc.hand.RhBatchResponse.class, com.exactpro.th2.act.grpc.hand.RhBatchResponse.Builder.class);
  }

  /**
   * Protobuf enum {@code RhBatchResponse.ScriptExecutionStatus}
   */
  public enum ScriptExecutionStatus
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * SUCCESS = 0;
     */
    SUCCESS(0),
    /**
     * COMPILE_ERROR = 1;
     */
    COMPILE_ERROR(1),
    /**
     * EXECUTION_ERROR = 2;
     */
    EXECUTION_ERROR(2),
    /**
     * HAND_INTERNAL_ERROR = 3;
     */
    HAND_INTERNAL_ERROR(3),
    UNRECOGNIZED(-1),
    ;

    /**
     * SUCCESS = 0;
     */
    public static final int SUCCESS_VALUE = 0;
    /**
     * COMPILE_ERROR = 1;
     */
    public static final int COMPILE_ERROR_VALUE = 1;
    /**
     * EXECUTION_ERROR = 2;
     */
    public static final int EXECUTION_ERROR_VALUE = 2;
    /**
     * HAND_INTERNAL_ERROR = 3;
     */
    public static final int HAND_INTERNAL_ERROR_VALUE = 3;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ScriptExecutionStatus valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static ScriptExecutionStatus forNumber(int value) {
      switch (value) {
        case 0: return SUCCESS;
        case 1: return COMPILE_ERROR;
        case 2: return EXECUTION_ERROR;
        case 3: return HAND_INTERNAL_ERROR;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        ScriptExecutionStatus> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public ScriptExecutionStatus findValueByNumber(int number) {
              return ScriptExecutionStatus.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return com.exactpro.th2.act.grpc.hand.RhBatchResponse.getDescriptor().getEnumTypes().get(0);
    }

    private static final ScriptExecutionStatus[] VALUES = values();

    public static ScriptExecutionStatus valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private ScriptExecutionStatus(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:RhBatchResponse.ScriptExecutionStatus)
  }

  public static final int SCRIPTSTATUS_FIELD_NUMBER = 1;
  private int scriptStatus_;
  /**
   * .RhBatchResponse.ScriptExecutionStatus scriptStatus = 1;
   * @return The enum numeric value on the wire for scriptStatus.
   */
  @java.lang.Override public int getScriptStatusValue() {
    return scriptStatus_;
  }
  /**
   * .RhBatchResponse.ScriptExecutionStatus scriptStatus = 1;
   * @return The scriptStatus.
   */
  @java.lang.Override public com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus getScriptStatus() {
    @SuppressWarnings("deprecation")
    com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus result = com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus.valueOf(scriptStatus_);
    return result == null ? com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus.UNRECOGNIZED : result;
  }

  public static final int ERRORMESSAGE_FIELD_NUMBER = 2;
  private volatile java.lang.Object errorMessage_;
  /**
   * string errorMessage = 2;
   * @return The errorMessage.
   */
  @java.lang.Override
  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 errorMessage = 2;
   * @return The bytes for errorMessage.
   */
  @java.lang.Override
  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;
    }
  }

  public static final int RESULT_FIELD_NUMBER = 3;
  private java.util.List result_;
  /**
   * repeated .ResultDetails result = 3;
   */
  @java.lang.Override
  public java.util.List getResultList() {
    return result_;
  }
  /**
   * repeated .ResultDetails result = 3;
   */
  @java.lang.Override
  public java.util.List 
      getResultOrBuilderList() {
    return result_;
  }
  /**
   * repeated .ResultDetails result = 3;
   */
  @java.lang.Override
  public int getResultCount() {
    return result_.size();
  }
  /**
   * repeated .ResultDetails result = 3;
   */
  @java.lang.Override
  public com.exactpro.th2.act.grpc.hand.ResultDetails getResult(int index) {
    return result_.get(index);
  }
  /**
   * repeated .ResultDetails result = 3;
   */
  @java.lang.Override
  public com.exactpro.th2.act.grpc.hand.ResultDetailsOrBuilder getResultOrBuilder(
      int index) {
    return result_.get(index);
  }

  public static final int SESSIONID_FIELD_NUMBER = 4;
  private volatile java.lang.Object sessionId_;
  /**
   * string sessionId = 4;
   * @return The sessionId.
   */
  @java.lang.Override
  public java.lang.String getSessionId() {
    java.lang.Object ref = sessionId_;
    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();
      sessionId_ = s;
      return s;
    }
  }
  /**
   * string sessionId = 4;
   * @return The bytes for sessionId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getSessionIdBytes() {
    java.lang.Object ref = sessionId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      sessionId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int EXECUTION_ID_FIELD_NUMBER = 5;
  private volatile java.lang.Object executionId_;
  /**
   * string execution_id = 5;
   * @return The executionId.
   */
  @java.lang.Override
  public java.lang.String getExecutionId() {
    java.lang.Object ref = executionId_;
    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();
      executionId_ = s;
      return s;
    }
  }
  /**
   * string execution_id = 5;
   * @return The bytes for executionId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getExecutionIdBytes() {
    java.lang.Object ref = executionId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      executionId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MESSAGE_TYPE_FIELD_NUMBER = 6;
  private int messageType_;
  /**
   * .MessageType message_type = 6;
   * @return The enum numeric value on the wire for messageType.
   */
  @java.lang.Override public int getMessageTypeValue() {
    return messageType_;
  }
  /**
   * .MessageType message_type = 6;
   * @return The messageType.
   */
  @java.lang.Override public com.exactpro.th2.act.grpc.hand.MessageType getMessageType() {
    @SuppressWarnings("deprecation")
    com.exactpro.th2.act.grpc.hand.MessageType result = com.exactpro.th2.act.grpc.hand.MessageType.valueOf(messageType_);
    return result == null ? com.exactpro.th2.act.grpc.hand.MessageType.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 (scriptStatus_ != com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus.SUCCESS.getNumber()) {
      output.writeEnum(1, scriptStatus_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_);
    }
    for (int i = 0; i < result_.size(); i++) {
      output.writeMessage(3, result_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sessionId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, executionId_);
    }
    if (messageType_ != com.exactpro.th2.act.grpc.hand.MessageType.PLAIN_STRING.getNumber()) {
      output.writeEnum(6, messageType_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (scriptStatus_ != com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus.SUCCESS.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(1, scriptStatus_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_);
    }
    for (int i = 0; i < result_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, result_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sessionId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, executionId_);
    }
    if (messageType_ != com.exactpro.th2.act.grpc.hand.MessageType.PLAIN_STRING.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(6, messageType_);
    }
    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 com.exactpro.th2.act.grpc.hand.RhBatchResponse)) {
      return super.equals(obj);
    }
    com.exactpro.th2.act.grpc.hand.RhBatchResponse other = (com.exactpro.th2.act.grpc.hand.RhBatchResponse) obj;

    if (scriptStatus_ != other.scriptStatus_) return false;
    if (!getErrorMessage()
        .equals(other.getErrorMessage())) return false;
    if (!getResultList()
        .equals(other.getResultList())) return false;
    if (!getSessionId()
        .equals(other.getSessionId())) return false;
    if (!getExecutionId()
        .equals(other.getExecutionId())) return false;
    if (messageType_ != other.messageType_) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + SCRIPTSTATUS_FIELD_NUMBER;
    hash = (53 * hash) + scriptStatus_;
    hash = (37 * hash) + ERRORMESSAGE_FIELD_NUMBER;
    hash = (53 * hash) + getErrorMessage().hashCode();
    if (getResultCount() > 0) {
      hash = (37 * hash) + RESULT_FIELD_NUMBER;
      hash = (53 * hash) + getResultList().hashCode();
    }
    hash = (37 * hash) + SESSIONID_FIELD_NUMBER;
    hash = (53 * hash) + getSessionId().hashCode();
    hash = (37 * hash) + EXECUTION_ID_FIELD_NUMBER;
    hash = (53 * hash) + getExecutionId().hashCode();
    hash = (37 * hash) + MESSAGE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + messageType_;
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse 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 com.exactpro.th2.act.grpc.hand.RhBatchResponse parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse 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 com.exactpro.th2.act.grpc.hand.RhBatchResponse parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse 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(com.exactpro.th2.act.grpc.hand.RhBatchResponse 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 RhBatchResponse}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:RhBatchResponse)
      com.exactpro.th2.act.grpc.hand.RhBatchResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.exactpro.th2.act.grpc.hand.Rhbatch.internal_static_RhBatchResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.exactpro.th2.act.grpc.hand.Rhbatch.internal_static_RhBatchResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.exactpro.th2.act.grpc.hand.RhBatchResponse.class, com.exactpro.th2.act.grpc.hand.RhBatchResponse.Builder.class);
    }

    // Construct using com.exactpro.th2.act.grpc.hand.RhBatchResponse.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getResultFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      scriptStatus_ = 0;

      errorMessage_ = "";

      if (resultBuilder_ == null) {
        result_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        resultBuilder_.clear();
      }
      sessionId_ = "";

      executionId_ = "";

      messageType_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.exactpro.th2.act.grpc.hand.Rhbatch.internal_static_RhBatchResponse_descriptor;
    }

    @java.lang.Override
    public com.exactpro.th2.act.grpc.hand.RhBatchResponse getDefaultInstanceForType() {
      return com.exactpro.th2.act.grpc.hand.RhBatchResponse.getDefaultInstance();
    }

    @java.lang.Override
    public com.exactpro.th2.act.grpc.hand.RhBatchResponse build() {
      com.exactpro.th2.act.grpc.hand.RhBatchResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.exactpro.th2.act.grpc.hand.RhBatchResponse buildPartial() {
      com.exactpro.th2.act.grpc.hand.RhBatchResponse result = new com.exactpro.th2.act.grpc.hand.RhBatchResponse(this);
      int from_bitField0_ = bitField0_;
      result.scriptStatus_ = scriptStatus_;
      result.errorMessage_ = errorMessage_;
      if (resultBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          result_ = java.util.Collections.unmodifiableList(result_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.result_ = result_;
      } else {
        result.result_ = resultBuilder_.build();
      }
      result.sessionId_ = sessionId_;
      result.executionId_ = executionId_;
      result.messageType_ = messageType_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.exactpro.th2.act.grpc.hand.RhBatchResponse) {
        return mergeFrom((com.exactpro.th2.act.grpc.hand.RhBatchResponse)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.exactpro.th2.act.grpc.hand.RhBatchResponse other) {
      if (other == com.exactpro.th2.act.grpc.hand.RhBatchResponse.getDefaultInstance()) return this;
      if (other.scriptStatus_ != 0) {
        setScriptStatusValue(other.getScriptStatusValue());
      }
      if (!other.getErrorMessage().isEmpty()) {
        errorMessage_ = other.errorMessage_;
        onChanged();
      }
      if (resultBuilder_ == null) {
        if (!other.result_.isEmpty()) {
          if (result_.isEmpty()) {
            result_ = other.result_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureResultIsMutable();
            result_.addAll(other.result_);
          }
          onChanged();
        }
      } else {
        if (!other.result_.isEmpty()) {
          if (resultBuilder_.isEmpty()) {
            resultBuilder_.dispose();
            resultBuilder_ = null;
            result_ = other.result_;
            bitField0_ = (bitField0_ & ~0x00000001);
            resultBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getResultFieldBuilder() : null;
          } else {
            resultBuilder_.addAllMessages(other.result_);
          }
        }
      }
      if (!other.getSessionId().isEmpty()) {
        sessionId_ = other.sessionId_;
        onChanged();
      }
      if (!other.getExecutionId().isEmpty()) {
        executionId_ = other.executionId_;
        onChanged();
      }
      if (other.messageType_ != 0) {
        setMessageTypeValue(other.getMessageTypeValue());
      }
      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 {
      com.exactpro.th2.act.grpc.hand.RhBatchResponse parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.exactpro.th2.act.grpc.hand.RhBatchResponse) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private int scriptStatus_ = 0;
    /**
     * .RhBatchResponse.ScriptExecutionStatus scriptStatus = 1;
     * @return The enum numeric value on the wire for scriptStatus.
     */
    @java.lang.Override public int getScriptStatusValue() {
      return scriptStatus_;
    }
    /**
     * .RhBatchResponse.ScriptExecutionStatus scriptStatus = 1;
     * @param value The enum numeric value on the wire for scriptStatus to set.
     * @return This builder for chaining.
     */
    public Builder setScriptStatusValue(int value) {
      
      scriptStatus_ = value;
      onChanged();
      return this;
    }
    /**
     * .RhBatchResponse.ScriptExecutionStatus scriptStatus = 1;
     * @return The scriptStatus.
     */
    @java.lang.Override
    public com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus getScriptStatus() {
      @SuppressWarnings("deprecation")
      com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus result = com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus.valueOf(scriptStatus_);
      return result == null ? com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus.UNRECOGNIZED : result;
    }
    /**
     * .RhBatchResponse.ScriptExecutionStatus scriptStatus = 1;
     * @param value The scriptStatus to set.
     * @return This builder for chaining.
     */
    public Builder setScriptStatus(com.exactpro.th2.act.grpc.hand.RhBatchResponse.ScriptExecutionStatus value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      scriptStatus_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .RhBatchResponse.ScriptExecutionStatus scriptStatus = 1;
     * @return This builder for chaining.
     */
    public Builder clearScriptStatus() {
      
      scriptStatus_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object errorMessage_ = "";
    /**
     * string errorMessage = 2;
     * @return The errorMessage.
     */
    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 errorMessage = 2;
     * @return The bytes for errorMessage.
     */
    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 errorMessage = 2;
     * @param value The errorMessage to set.
     * @return This builder for chaining.
     */
    public Builder setErrorMessage(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      errorMessage_ = value;
      onChanged();
      return this;
    }
    /**
     * string errorMessage = 2;
     * @return This builder for chaining.
     */
    public Builder clearErrorMessage() {
      
      errorMessage_ = getDefaultInstance().getErrorMessage();
      onChanged();
      return this;
    }
    /**
     * string errorMessage = 2;
     * @param value The bytes for errorMessage to set.
     * @return This builder for chaining.
     */
    public Builder setErrorMessageBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      errorMessage_ = value;
      onChanged();
      return this;
    }

    private java.util.List result_ =
      java.util.Collections.emptyList();
    private void ensureResultIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        result_ = new java.util.ArrayList(result_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.exactpro.th2.act.grpc.hand.ResultDetails, com.exactpro.th2.act.grpc.hand.ResultDetails.Builder, com.exactpro.th2.act.grpc.hand.ResultDetailsOrBuilder> resultBuilder_;

    /**
     * repeated .ResultDetails result = 3;
     */
    public java.util.List getResultList() {
      if (resultBuilder_ == null) {
        return java.util.Collections.unmodifiableList(result_);
      } else {
        return resultBuilder_.getMessageList();
      }
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public int getResultCount() {
      if (resultBuilder_ == null) {
        return result_.size();
      } else {
        return resultBuilder_.getCount();
      }
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public com.exactpro.th2.act.grpc.hand.ResultDetails getResult(int index) {
      if (resultBuilder_ == null) {
        return result_.get(index);
      } else {
        return resultBuilder_.getMessage(index);
      }
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder setResult(
        int index, com.exactpro.th2.act.grpc.hand.ResultDetails value) {
      if (resultBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureResultIsMutable();
        result_.set(index, value);
        onChanged();
      } else {
        resultBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder setResult(
        int index, com.exactpro.th2.act.grpc.hand.ResultDetails.Builder builderForValue) {
      if (resultBuilder_ == null) {
        ensureResultIsMutable();
        result_.set(index, builderForValue.build());
        onChanged();
      } else {
        resultBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder addResult(com.exactpro.th2.act.grpc.hand.ResultDetails value) {
      if (resultBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureResultIsMutable();
        result_.add(value);
        onChanged();
      } else {
        resultBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder addResult(
        int index, com.exactpro.th2.act.grpc.hand.ResultDetails value) {
      if (resultBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureResultIsMutable();
        result_.add(index, value);
        onChanged();
      } else {
        resultBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder addResult(
        com.exactpro.th2.act.grpc.hand.ResultDetails.Builder builderForValue) {
      if (resultBuilder_ == null) {
        ensureResultIsMutable();
        result_.add(builderForValue.build());
        onChanged();
      } else {
        resultBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder addResult(
        int index, com.exactpro.th2.act.grpc.hand.ResultDetails.Builder builderForValue) {
      if (resultBuilder_ == null) {
        ensureResultIsMutable();
        result_.add(index, builderForValue.build());
        onChanged();
      } else {
        resultBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder addAllResult(
        java.lang.Iterable values) {
      if (resultBuilder_ == null) {
        ensureResultIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, result_);
        onChanged();
      } else {
        resultBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder clearResult() {
      if (resultBuilder_ == null) {
        result_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        resultBuilder_.clear();
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public Builder removeResult(int index) {
      if (resultBuilder_ == null) {
        ensureResultIsMutable();
        result_.remove(index);
        onChanged();
      } else {
        resultBuilder_.remove(index);
      }
      return this;
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public com.exactpro.th2.act.grpc.hand.ResultDetails.Builder getResultBuilder(
        int index) {
      return getResultFieldBuilder().getBuilder(index);
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public com.exactpro.th2.act.grpc.hand.ResultDetailsOrBuilder getResultOrBuilder(
        int index) {
      if (resultBuilder_ == null) {
        return result_.get(index);  } else {
        return resultBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public java.util.List 
         getResultOrBuilderList() {
      if (resultBuilder_ != null) {
        return resultBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(result_);
      }
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public com.exactpro.th2.act.grpc.hand.ResultDetails.Builder addResultBuilder() {
      return getResultFieldBuilder().addBuilder(
          com.exactpro.th2.act.grpc.hand.ResultDetails.getDefaultInstance());
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public com.exactpro.th2.act.grpc.hand.ResultDetails.Builder addResultBuilder(
        int index) {
      return getResultFieldBuilder().addBuilder(
          index, com.exactpro.th2.act.grpc.hand.ResultDetails.getDefaultInstance());
    }
    /**
     * repeated .ResultDetails result = 3;
     */
    public java.util.List 
         getResultBuilderList() {
      return getResultFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.exactpro.th2.act.grpc.hand.ResultDetails, com.exactpro.th2.act.grpc.hand.ResultDetails.Builder, com.exactpro.th2.act.grpc.hand.ResultDetailsOrBuilder> 
        getResultFieldBuilder() {
      if (resultBuilder_ == null) {
        resultBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.exactpro.th2.act.grpc.hand.ResultDetails, com.exactpro.th2.act.grpc.hand.ResultDetails.Builder, com.exactpro.th2.act.grpc.hand.ResultDetailsOrBuilder>(
                result_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        result_ = null;
      }
      return resultBuilder_;
    }

    private java.lang.Object sessionId_ = "";
    /**
     * string sessionId = 4;
     * @return The sessionId.
     */
    public java.lang.String getSessionId() {
      java.lang.Object ref = sessionId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sessionId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string sessionId = 4;
     * @return The bytes for sessionId.
     */
    public com.google.protobuf.ByteString
        getSessionIdBytes() {
      java.lang.Object ref = sessionId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        sessionId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string sessionId = 4;
     * @param value The sessionId to set.
     * @return This builder for chaining.
     */
    public Builder setSessionId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      sessionId_ = value;
      onChanged();
      return this;
    }
    /**
     * string sessionId = 4;
     * @return This builder for chaining.
     */
    public Builder clearSessionId() {
      
      sessionId_ = getDefaultInstance().getSessionId();
      onChanged();
      return this;
    }
    /**
     * string sessionId = 4;
     * @param value The bytes for sessionId to set.
     * @return This builder for chaining.
     */
    public Builder setSessionIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      sessionId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object executionId_ = "";
    /**
     * string execution_id = 5;
     * @return The executionId.
     */
    public java.lang.String getExecutionId() {
      java.lang.Object ref = executionId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        executionId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string execution_id = 5;
     * @return The bytes for executionId.
     */
    public com.google.protobuf.ByteString
        getExecutionIdBytes() {
      java.lang.Object ref = executionId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        executionId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string execution_id = 5;
     * @param value The executionId to set.
     * @return This builder for chaining.
     */
    public Builder setExecutionId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      executionId_ = value;
      onChanged();
      return this;
    }
    /**
     * string execution_id = 5;
     * @return This builder for chaining.
     */
    public Builder clearExecutionId() {
      
      executionId_ = getDefaultInstance().getExecutionId();
      onChanged();
      return this;
    }
    /**
     * string execution_id = 5;
     * @param value The bytes for executionId to set.
     * @return This builder for chaining.
     */
    public Builder setExecutionIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      executionId_ = value;
      onChanged();
      return this;
    }

    private int messageType_ = 0;
    /**
     * .MessageType message_type = 6;
     * @return The enum numeric value on the wire for messageType.
     */
    @java.lang.Override public int getMessageTypeValue() {
      return messageType_;
    }
    /**
     * .MessageType message_type = 6;
     * @param value The enum numeric value on the wire for messageType to set.
     * @return This builder for chaining.
     */
    public Builder setMessageTypeValue(int value) {
      
      messageType_ = value;
      onChanged();
      return this;
    }
    /**
     * .MessageType message_type = 6;
     * @return The messageType.
     */
    @java.lang.Override
    public com.exactpro.th2.act.grpc.hand.MessageType getMessageType() {
      @SuppressWarnings("deprecation")
      com.exactpro.th2.act.grpc.hand.MessageType result = com.exactpro.th2.act.grpc.hand.MessageType.valueOf(messageType_);
      return result == null ? com.exactpro.th2.act.grpc.hand.MessageType.UNRECOGNIZED : result;
    }
    /**
     * .MessageType message_type = 6;
     * @param value The messageType to set.
     * @return This builder for chaining.
     */
    public Builder setMessageType(com.exactpro.th2.act.grpc.hand.MessageType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      messageType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .MessageType message_type = 6;
     * @return This builder for chaining.
     */
    public Builder clearMessageType() {
      
      messageType_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:RhBatchResponse)
  }

  // @@protoc_insertion_point(class_scope:RhBatchResponse)
  private static final com.exactpro.th2.act.grpc.hand.RhBatchResponse DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.exactpro.th2.act.grpc.hand.RhBatchResponse();
  }

  public static com.exactpro.th2.act.grpc.hand.RhBatchResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy