// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Detail about the webhook object. */
@Fluent
public final class Webhook {
    /*
     * Unique identifier for the webhook.
     */
    @JsonProperty(value = "webhookId")
    private String webhookId;

    /*
     * URL that gets invoked by the webhook.
     */
    @JsonProperty(value = "webhookUrl")
    private String webhookUrl;

    /*
     * Time when the webhook secret was updated.
     */
    @JsonProperty(value = "webhookSecretUpdateTime")
    private String webhookSecretUpdateTime;

    /*
     * A flag to instruct the backend service to rotate webhook secret.
     */
    @JsonProperty(value = "rotateWebhookSecret")
    private Boolean rotateWebhookSecret;

    /**
     * Get the webhookId property: Unique identifier for the webhook.
     *
     * @return the webhookId value.
     */
    public String webhookId() {
        return this.webhookId;
    }

    /**
     * Set the webhookId property: Unique identifier for the webhook.
     *
     * @param webhookId the webhookId value to set.
     * @return the Webhook object itself.
     */
    public Webhook withWebhookId(String webhookId) {
        this.webhookId = webhookId;
        return this;
    }

    /**
     * Get the webhookUrl property: URL that gets invoked by the webhook.
     *
     * @return the webhookUrl value.
     */
    public String webhookUrl() {
        return this.webhookUrl;
    }

    /**
     * Set the webhookUrl property: URL that gets invoked by the webhook.
     *
     * @param webhookUrl the webhookUrl value to set.
     * @return the Webhook object itself.
     */
    public Webhook withWebhookUrl(String webhookUrl) {
        this.webhookUrl = webhookUrl;
        return this;
    }

    /**
     * Get the webhookSecretUpdateTime property: Time when the webhook secret was updated.
     *
     * @return the webhookSecretUpdateTime value.
     */
    public String webhookSecretUpdateTime() {
        return this.webhookSecretUpdateTime;
    }

    /**
     * Set the webhookSecretUpdateTime property: Time when the webhook secret was updated.
     *
     * @param webhookSecretUpdateTime the webhookSecretUpdateTime value to set.
     * @return the Webhook object itself.
     */
    public Webhook withWebhookSecretUpdateTime(String webhookSecretUpdateTime) {
        this.webhookSecretUpdateTime = webhookSecretUpdateTime;
        return this;
    }

    /**
     * Get the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret.
     *
     * @return the rotateWebhookSecret value.
     */
    public Boolean rotateWebhookSecret() {
        return this.rotateWebhookSecret;
    }

    /**
     * Set the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret.
     *
     * @param rotateWebhookSecret the rotateWebhookSecret value to set.
     * @return the Webhook object itself.
     */
    public Webhook withRotateWebhookSecret(Boolean rotateWebhookSecret) {
        this.rotateWebhookSecret = rotateWebhookSecret;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
