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

com.basistech.rosette.apimodel.GenericResponse Maven / Gradle / Ivy

The newest version!
// Generated by delombok at Fri Nov 15 11:56:46 CST 2024
/*
 * Copyright 2021 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;

import com.basistech.rosette.annotations.JacksonMixin;

@JacksonMixin
public class GenericResponse extends Response {
    private Object data;

    @SuppressWarnings("all")
    GenericResponse(final Object data) {
        this.data = data;
    }


    @SuppressWarnings("all")
    public static class GenericResponseBuilder {
        @SuppressWarnings("all")
        private Object data;

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

        /**
         * @return {@code this}.
         */
        @SuppressWarnings("all")
        public GenericResponse.GenericResponseBuilder data(final Object data) {
            this.data = data;
            return this;
        }

        @SuppressWarnings("all")
        public GenericResponse build() {
            return new GenericResponse(this.data);
        }

        @Override
        @SuppressWarnings("all")
        public String toString() {
            return "GenericResponse.GenericResponseBuilder(data=" + this.data + ")";
        }
    }

    @SuppressWarnings("all")
    public static GenericResponse.GenericResponseBuilder builder() {
        return new GenericResponse.GenericResponseBuilder();
    }

    @SuppressWarnings("all")
    public Object getData() {
        return this.data;
    }

    @SuppressWarnings("all")
    public void setData(final Object data) {
        this.data = data;
    }

    @Override
    @SuppressWarnings("all")
    public String toString() {
        return "GenericResponse(data=" + this.getData() + ")";
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof GenericResponse)) return false;
        final GenericResponse other = (GenericResponse) o;
        if (!other.canEqual((Object) this)) return false;
        if (!super.equals(o)) return false;
        final Object this$data = this.getData();
        final Object other$data = other.getData();
        if (this$data == null ? other$data != null : !this$data.equals(other$data)) return false;
        return true;
    }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy