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

com.basistech.rosette.apimodel.batch.BatchStatusResponse Maven / Gradle / Ivy

The newest version!
// Generated by delombok at Fri Nov 15 11:56:46 CST 2024
/*
* Copyright 2016 Basis Technology Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.basistech.rosette.apimodel.batch;

import com.basistech.rosette.annotations.JacksonMixin;
import com.basistech.rosette.apimodel.Response;

@JacksonMixin
public final class BatchStatusResponse extends Response {
    // batch batchId
    private final String batchId;
    // whether the job is in progress
    private final float progress;

    @SuppressWarnings("all")
    BatchStatusResponse(final String batchId, final float progress) {
        this.batchId = batchId;
        this.progress = progress;
    }


    @SuppressWarnings("all")
    public static class BatchStatusResponseBuilder {
        @SuppressWarnings("all")
        private String batchId;
        @SuppressWarnings("all")
        private float progress;

        @SuppressWarnings("all")
        BatchStatusResponseBuilder() {
        }

        /**
         * @return {@code this}.
         */
        @SuppressWarnings("all")
        public BatchStatusResponse.BatchStatusResponseBuilder batchId(final String batchId) {
            this.batchId = batchId;
            return this;
        }

        /**
         * @return {@code this}.
         */
        @SuppressWarnings("all")
        public BatchStatusResponse.BatchStatusResponseBuilder progress(final float progress) {
            this.progress = progress;
            return this;
        }

        @SuppressWarnings("all")
        public BatchStatusResponse build() {
            return new BatchStatusResponse(this.batchId, this.progress);
        }

        @Override
        @SuppressWarnings("all")
        public String toString() {
            return "BatchStatusResponse.BatchStatusResponseBuilder(batchId=" + this.batchId + ", progress=" + this.progress + ")";
        }
    }

    @SuppressWarnings("all")
    public static BatchStatusResponse.BatchStatusResponseBuilder builder() {
        return new BatchStatusResponse.BatchStatusResponseBuilder();
    }

    @SuppressWarnings("all")
    public String getBatchId() {
        return this.batchId;
    }

    @SuppressWarnings("all")
    public float getProgress() {
        return this.progress;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof BatchStatusResponse)) return false;
        final BatchStatusResponse other = (BatchStatusResponse) o;
        if (!other.canEqual((Object) this)) return false;
        if (!super.equals(o)) return false;
        if (Float.compare(this.getProgress(), other.getProgress()) != 0) return false;
        final Object this$batchId = this.getBatchId();
        final Object other$batchId = other.getBatchId();
        if (this$batchId == null ? other$batchId != null : !this$batchId.equals(other$batchId)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof BatchStatusResponse;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        result = result * PRIME + Float.floatToIntBits(this.getProgress());
        final Object $batchId = this.getBatchId();
        result = result * PRIME + ($batchId == null ? 43 : $batchId.hashCode());
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy