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

com.aventstack.chaintest.http.WrappedResponse Maven / Gradle / Ivy

The newest version!
package com.aventstack.chaintest.http;

import com.aventstack.chaintest.domain.ChainTestEntity;
import lombok.Getter;
import lombok.Setter;

import java.net.http.HttpResponse;

@Setter
@Getter
public class WrappedResponse extends BaseResponse {

    private HttpResponse response;

    public WrappedResponse(final T entity, final HttpResponse response) {
        super(entity);
        this.response = response;
    }

    public WrappedResponse(final T entity) {
        super(entity);
    }

    public WrappedResponse(final ErrorResponse error) {
        super(error);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        WrappedResponse that = (WrappedResponse) obj;
        return response.equals(that.response);
    }

    @Override
    public int hashCode() {
        return response.hashCode();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy