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

pl.allegro.tech.hermes.api.SubscriptionConstraints Maven / Gradle / Ivy

There is a newer version: 2.6.22
Show newest version
package pl.allegro.tech.hermes.api;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.Valid;

public class SubscriptionConstraints {

    private final SubscriptionName subscriptionName;
    @Valid
    private final Constraints constraints;

    @JsonCreator
    public SubscriptionConstraints(@JsonProperty("subscriptionName") String subscriptionName,
                                   @JsonProperty("constraints") Constraints constraints) {
        this.subscriptionName = SubscriptionName.fromString(subscriptionName);
        this.constraints = constraints;
    }

    public SubscriptionName getSubscriptionName() {
        return subscriptionName;
    }

    public Constraints getConstraints() {
        return constraints;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy