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

com.netflix.genie.proto.ClaimJobResponse Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: genie.proto

package com.netflix.genie.proto;

/**
 * Protobuf type {@code com.netflix.genie.proto.ClaimJobResponse}
 */
public final class ClaimJobResponse extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.netflix.genie.proto.ClaimJobResponse)
    ClaimJobResponseOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ClaimJobResponse.newBuilder() to construct.
  private ClaimJobResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private ClaimJobResponse() {
  }

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

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

            successful_ = input.readBool();
            break;
          }
          case 18: {
            com.netflix.genie.proto.ClaimJobError.Builder subBuilder = null;
            if (error_ != null) {
              subBuilder = error_.toBuilder();
            }
            error_ = input.readMessage(com.netflix.genie.proto.ClaimJobError.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(error_);
              error_ = subBuilder.buildPartial();
            }

            break;
          }
          default: {
            if (!parseUnknownField(
                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 com.netflix.genie.proto.GenieProto.internal_static_com_netflix_genie_proto_ClaimJobResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.netflix.genie.proto.GenieProto.internal_static_com_netflix_genie_proto_ClaimJobResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.netflix.genie.proto.ClaimJobResponse.class, com.netflix.genie.proto.ClaimJobResponse.Builder.class);
  }

  public static final int SUCCESSFUL_FIELD_NUMBER = 1;
  private boolean successful_;
  /**
   * bool successful = 1;
   * @return The successful.
   */
  @java.lang.Override
  public boolean getSuccessful() {
    return successful_;
  }

  public static final int ERROR_FIELD_NUMBER = 2;
  private com.netflix.genie.proto.ClaimJobError error_;
  /**
   * .com.netflix.genie.proto.ClaimJobError error = 2;
   * @return Whether the error field is set.
   */
  @java.lang.Override
  public boolean hasError() {
    return error_ != null;
  }
  /**
   * .com.netflix.genie.proto.ClaimJobError error = 2;
   * @return The error.
   */
  @java.lang.Override
  public com.netflix.genie.proto.ClaimJobError getError() {
    return error_ == null ? com.netflix.genie.proto.ClaimJobError.getDefaultInstance() : error_;
  }
  /**
   * .com.netflix.genie.proto.ClaimJobError error = 2;
   */
  @java.lang.Override
  public com.netflix.genie.proto.ClaimJobErrorOrBuilder getErrorOrBuilder() {
    return getError();
  }

  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 (successful_ != false) {
      output.writeBool(1, successful_);
    }
    if (error_ != null) {
      output.writeMessage(2, getError());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (successful_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(1, successful_);
    }
    if (error_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getError());
    }
    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.netflix.genie.proto.ClaimJobResponse)) {
      return super.equals(obj);
    }
    com.netflix.genie.proto.ClaimJobResponse other = (com.netflix.genie.proto.ClaimJobResponse) obj;

    if (getSuccessful()
        != other.getSuccessful()) return false;
    if (hasError() != other.hasError()) return false;
    if (hasError()) {
      if (!getError()
          .equals(other.getError())) 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) + SUCCESSFUL_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getSuccessful());
    if (hasError()) {
      hash = (37 * hash) + ERROR_FIELD_NUMBER;
      hash = (53 * hash) + getError().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.netflix.genie.proto.ClaimJobResponse parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.netflix.genie.proto.ClaimJobResponse parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.netflix.genie.proto.ClaimJobResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.netflix.genie.proto.ClaimJobResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.netflix.genie.proto.ClaimJobResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.netflix.genie.proto.ClaimJobResponse parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.netflix.genie.proto.ClaimJobResponse parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.netflix.genie.proto.ClaimJobResponse 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.netflix.genie.proto.ClaimJobResponse parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.netflix.genie.proto.ClaimJobResponse 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.netflix.genie.proto.ClaimJobResponse parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.netflix.genie.proto.ClaimJobResponse 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.netflix.genie.proto.ClaimJobResponse 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 com.netflix.genie.proto.ClaimJobResponse}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:com.netflix.genie.proto.ClaimJobResponse)
      com.netflix.genie.proto.ClaimJobResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.netflix.genie.proto.GenieProto.internal_static_com_netflix_genie_proto_ClaimJobResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.netflix.genie.proto.GenieProto.internal_static_com_netflix_genie_proto_ClaimJobResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.netflix.genie.proto.ClaimJobResponse.class, com.netflix.genie.proto.ClaimJobResponse.Builder.class);
    }

    // Construct using com.netflix.genie.proto.ClaimJobResponse.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();
      successful_ = false;

      if (errorBuilder_ == null) {
        error_ = null;
      } else {
        error_ = null;
        errorBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.netflix.genie.proto.GenieProto.internal_static_com_netflix_genie_proto_ClaimJobResponse_descriptor;
    }

    @java.lang.Override
    public com.netflix.genie.proto.ClaimJobResponse getDefaultInstanceForType() {
      return com.netflix.genie.proto.ClaimJobResponse.getDefaultInstance();
    }

    @java.lang.Override
    public com.netflix.genie.proto.ClaimJobResponse build() {
      com.netflix.genie.proto.ClaimJobResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.netflix.genie.proto.ClaimJobResponse buildPartial() {
      com.netflix.genie.proto.ClaimJobResponse result = new com.netflix.genie.proto.ClaimJobResponse(this);
      result.successful_ = successful_;
      if (errorBuilder_ == null) {
        result.error_ = error_;
      } else {
        result.error_ = errorBuilder_.build();
      }
      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.netflix.genie.proto.ClaimJobResponse) {
        return mergeFrom((com.netflix.genie.proto.ClaimJobResponse)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.netflix.genie.proto.ClaimJobResponse other) {
      if (other == com.netflix.genie.proto.ClaimJobResponse.getDefaultInstance()) return this;
      if (other.getSuccessful() != false) {
        setSuccessful(other.getSuccessful());
      }
      if (other.hasError()) {
        mergeError(other.getError());
      }
      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.netflix.genie.proto.ClaimJobResponse parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.netflix.genie.proto.ClaimJobResponse) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private boolean successful_ ;
    /**
     * bool successful = 1;
     * @return The successful.
     */
    @java.lang.Override
    public boolean getSuccessful() {
      return successful_;
    }
    /**
     * bool successful = 1;
     * @param value The successful to set.
     * @return This builder for chaining.
     */
    public Builder setSuccessful(boolean value) {
      
      successful_ = value;
      onChanged();
      return this;
    }
    /**
     * bool successful = 1;
     * @return This builder for chaining.
     */
    public Builder clearSuccessful() {
      
      successful_ = false;
      onChanged();
      return this;
    }

    private com.netflix.genie.proto.ClaimJobError error_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.netflix.genie.proto.ClaimJobError, com.netflix.genie.proto.ClaimJobError.Builder, com.netflix.genie.proto.ClaimJobErrorOrBuilder> errorBuilder_;
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     * @return Whether the error field is set.
     */
    public boolean hasError() {
      return errorBuilder_ != null || error_ != null;
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     * @return The error.
     */
    public com.netflix.genie.proto.ClaimJobError getError() {
      if (errorBuilder_ == null) {
        return error_ == null ? com.netflix.genie.proto.ClaimJobError.getDefaultInstance() : error_;
      } else {
        return errorBuilder_.getMessage();
      }
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     */
    public Builder setError(com.netflix.genie.proto.ClaimJobError value) {
      if (errorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        error_ = value;
        onChanged();
      } else {
        errorBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     */
    public Builder setError(
        com.netflix.genie.proto.ClaimJobError.Builder builderForValue) {
      if (errorBuilder_ == null) {
        error_ = builderForValue.build();
        onChanged();
      } else {
        errorBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     */
    public Builder mergeError(com.netflix.genie.proto.ClaimJobError value) {
      if (errorBuilder_ == null) {
        if (error_ != null) {
          error_ =
            com.netflix.genie.proto.ClaimJobError.newBuilder(error_).mergeFrom(value).buildPartial();
        } else {
          error_ = value;
        }
        onChanged();
      } else {
        errorBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     */
    public Builder clearError() {
      if (errorBuilder_ == null) {
        error_ = null;
        onChanged();
      } else {
        error_ = null;
        errorBuilder_ = null;
      }

      return this;
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     */
    public com.netflix.genie.proto.ClaimJobError.Builder getErrorBuilder() {
      
      onChanged();
      return getErrorFieldBuilder().getBuilder();
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     */
    public com.netflix.genie.proto.ClaimJobErrorOrBuilder getErrorOrBuilder() {
      if (errorBuilder_ != null) {
        return errorBuilder_.getMessageOrBuilder();
      } else {
        return error_ == null ?
            com.netflix.genie.proto.ClaimJobError.getDefaultInstance() : error_;
      }
    }
    /**
     * .com.netflix.genie.proto.ClaimJobError error = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.netflix.genie.proto.ClaimJobError, com.netflix.genie.proto.ClaimJobError.Builder, com.netflix.genie.proto.ClaimJobErrorOrBuilder> 
        getErrorFieldBuilder() {
      if (errorBuilder_ == null) {
        errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.netflix.genie.proto.ClaimJobError, com.netflix.genie.proto.ClaimJobError.Builder, com.netflix.genie.proto.ClaimJobErrorOrBuilder>(
                getError(),
                getParentForChildren(),
                isClean());
        error_ = null;
      }
      return errorBuilder_;
    }
    @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:com.netflix.genie.proto.ClaimJobResponse)
  }

  // @@protoc_insertion_point(class_scope:com.netflix.genie.proto.ClaimJobResponse)
  private static final com.netflix.genie.proto.ClaimJobResponse DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.netflix.genie.proto.ClaimJobResponse();
  }

  public static com.netflix.genie.proto.ClaimJobResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy