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

com.revinate.ship.result.GuestStayListResult Maven / Gradle / Ivy

package com.revinate.ship.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;

@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GuestStayListResult extends Result {

    @Valid
    private Summary summary;

    @Valid
    private List guestStays;

    @Valid
    @Deprecated
    private List errors;

    @Valid
    @Deprecated
    private List warnings;

    public void addGuestStay(GuestStayResult guestStay) {
        if (Objects.isNull(this.guestStays)) {
            this.guestStays = new ArrayList<>();
        }
        this.guestStays.add(guestStay);
    }

    public void addGuestStays(Collection guestStays) {
        if (Objects.isNull(this.guestStays)) {
            this.guestStays = new ArrayList<>();
        }
        this.guestStays.addAll(guestStays);
    }

    @Override
    public String toString() {
        return summary.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy