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

com.atlassian.bamboo.specs.builders.notification.WebhookRecipient Maven / Gradle / Ivy

There is a newer version: 10.1.0
Show newest version
package com.atlassian.bamboo.specs.builders.notification;

import com.atlassian.bamboo.specs.api.builders.notification.NotificationRecipient;
import com.atlassian.bamboo.specs.api.validators.common.ImporterUtils;
import com.atlassian.bamboo.specs.model.notification.WebhookRecipientProperties;
import org.jetbrains.annotations.NotNull;

/**
 * Represents a webhook which should be called.
 */
public class WebhookRecipient  extends NotificationRecipient {

    private final String webhookName;
    private final String url;

    public WebhookRecipient(String webhookName, String url) {
        ImporterUtils.checkNotBlank("webhookName", webhookName);
        ImporterUtils.checkNotBlank("url", url);
        this.webhookName = webhookName;
        this.url = url;
    }

    @NotNull
    @Override
    protected WebhookRecipientProperties build() {
        return new WebhookRecipientProperties(webhookName, url);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy