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

com.tradeshift.sdk.linelinker.domain.Input Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2018 Tradeshift Inc. and/or its affiliates. All rights reserved.
 */
package com.tradeshift.sdk.linelinker.domain;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;

import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.tradeshift.sdk.core.domain.ContextMsg;
import com.tradeshift.sdk.core.domain.Document;
import com.tradeshift.sdk.core.domain.ID;
import com.tradeshift.sdk.core.domain.UserContext;

@JsonAutoDetect(
        getterVisibility = Visibility.NONE,
        isGetterVisibility = Visibility.NONE,
        setterVisibility = Visibility.NONE,
        creatorVisibility = Visibility.NONE,
        fieldVisibility = Visibility.NONE
)public class Input extends ContextMsg {

    private final List> sourceDocs;
    private final List> targetDocs;

    public Input(UserContext ctx, List> sourceDocs, List> targetDocs) {
        super(ctx);
        this.sourceDocs = sourceDocs;
        this.targetDocs = targetDocs;
    }

    @JsonProperty("targetDocs")
    public List> getTargetDocs() {
        return targetDocs;
    }

    @JsonProperty("sourceDocs")
    public List> getSourceDocs() {
        return sourceDocs;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        Input input = (Input) o;
        return Objects.equals(sourceDocs, input.sourceDocs) &&
                Objects.equals(targetDocs, input.targetDocs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), sourceDocs, targetDocs);
    }

    @Override
    public String toString() {
        return "Input{" +
                "sourceDocs=" + sourceDocs +
                ", targetDocs=" + targetDocs +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy