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

fr.mmarie.api.jira.input.TransitionInput Maven / Gradle / Ivy

package fr.mmarie.api.jira.input;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
import fr.mmarie.api.jira.Comment;
import fr.mmarie.api.jira.Transition;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

@NoArgsConstructor
@EqualsAndHashCode(of = "update")
@ToString(of = "transition")
@Getter
public class TransitionInput {

    @EqualsAndHashCode(of = "comments")
    @NoArgsConstructor
    @Getter
    public static class Update {
        @JsonProperty("comment")
        private List comments;

        @VisibleForTesting
        public Update(List comments) {
            this.comments = comments;
        }
    }

    @EqualsAndHashCode(of = "comment")
    @NoArgsConstructor
    @Getter
    public static class CommentWrapper {
        @JsonProperty("add")
        private Comment comment;

        @VisibleForTesting
        public CommentWrapper(Comment comment) {
            this.comment = comment;
        }
    }

    @JsonProperty("update")
    private Update update;

    @JsonProperty("transition")
    private Transition transition;

    @VisibleForTesting
    public TransitionInput(Update update, Transition transition) {
        this.update = update;
        this.transition = transition;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy