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

com.github.dreamhead.moco.parser.model.EventSetting Maven / Gradle / Ivy

Go to download

Moco is an easy setup stub framework, mainly focusing on testing and integration.

There is a newer version: 1.5.0
Show newest version
package com.github.dreamhead.moco.parser.model;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.github.dreamhead.moco.Moco;
import com.github.dreamhead.moco.MocoEventTrigger;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;

import static com.google.common.collect.ImmutableList.of;

@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public final class EventSetting {
    private CompleteEventSetting complete;

    public ImmutableList triggers() {
        if (complete != null) {
            return of(Moco.complete(complete.createTrigger()));
        }

        return of();
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .omitNullValues()
                .add("complete", complete)
                .toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy