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

infobip.api.model.sms.mt.send.preview.PreviewResponse Maven / Gradle / Ivy

There is a newer version: 4.4.0
Show newest version
package infobip.api.model.sms.mt.send.preview;

import infobip.api.model.sms.mt.send.preview.Preview;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;

/**
 * This is a generated class and is not intended for modification!
 */
public class PreviewResponse {
    private String originalText;
    private List previews = new ArrayList();

    public PreviewResponse() {
    }

    public String getOriginalText() {
        return this.originalText;
    }

    public PreviewResponse setOriginalText(String originalText) {
        this.originalText = originalText;
        return this;
    }

    public List getPreviews() {
        return this.previews;
    }

    public PreviewResponse setPreviews(List previews) {
        this.previews = previews;
        return this;
    }

    public PreviewResponse addPreviews(Preview... previews) {
        this.previews.addAll(Arrays.asList(previews));
        return this;
    }

    public PreviewResponse removePreviews(Preview... previews) {
        this.previews.removeAll(Arrays.asList(previews));
        return this;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }

        PreviewResponse o = (PreviewResponse)obj;
        if (this.originalText == null) {
            if (o.originalText != null){
                return false;
            }
        } else if (!this.originalText.equals(o.originalText)) {
            return false;
        }
        if (this.previews == null) {
            if (o.previews != null){
                return false;
            }
        } else if (!this.previews.equals(o.previews)) {
            return false;
        }

        return true;
    }

    @Override
    public String toString() {
        return "PreviewResponse{" +
            "originalText='" + originalText + "'" +
            ", previews=" + (previews == null?"null":Arrays.toString(previews.toArray())) +
            '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy