package dst.ass3.messaging;

import java.util.Objects;

public class UploadRequest {

    private String id;
    private RequestType type;
    private String urn;

    public UploadRequest() {
    }

    public UploadRequest(String id, RequestType type, String urn) {
        this.id = id;
        this.type = type;
        this.urn = urn;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public RequestType getType() {
        return type;
    }

    public void setType(RequestType type) {
        this.type = type;
    }

    public String getUrn() {
        return urn;
    }

    public void setUrn(String urn) {
        this.urn = urn;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        UploadRequest that = (UploadRequest) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(type, that.type) &&
                Objects.equals(urn, that.urn);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, type, urn);
    }

    @Override
    public String toString() {
        return "UploadRequest{" +
                "id='" + id + '\'' +
                ", type='" + type + '\'' +
                ", urn='" + urn + '\'' +
                '}';
    }
}
