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

package com.azure.resourcemanager.automation.fluent.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The properties of the update webhook. */
@Fluent
public final class WebhookUpdateProperties {
    /*
     * Gets or sets the value of the enabled flag of webhook.
     */
    @JsonProperty(value = "isEnabled")
    private Boolean isEnabled;

    /*
     * Gets or sets the name of the hybrid worker group the webhook job will run on.
     */
    @JsonProperty(value = "runOn")
    private String runOn;

    /*
     * Gets or sets the parameters of the job.
     */
    @JsonProperty(value = "parameters")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> parameters;

    /*
     * Gets or sets the description of the webhook.
     */
    @JsonProperty(value = "description")
    private String description;

    /**
     * Get the isEnabled property: Gets or sets the value of the enabled flag of webhook.
     *
     * @return the isEnabled value.
     */
    public Boolean isEnabled() {
        return this.isEnabled;
    }

    /**
     * Set the isEnabled property: Gets or sets the value of the enabled flag of webhook.
     *
     * @param isEnabled the isEnabled value to set.
     * @return the WebhookUpdateProperties object itself.
     */
    public WebhookUpdateProperties withIsEnabled(Boolean isEnabled) {
        this.isEnabled = isEnabled;
        return this;
    }

    /**
     * Get the runOn property: Gets or sets the name of the hybrid worker group the webhook job will run on.
     *
     * @return the runOn value.
     */
    public String runOn() {
        return this.runOn;
    }

    /**
     * Set the runOn property: Gets or sets the name of the hybrid worker group the webhook job will run on.
     *
     * @param runOn the runOn value to set.
     * @return the WebhookUpdateProperties object itself.
     */
    public WebhookUpdateProperties withRunOn(String runOn) {
        this.runOn = runOn;
        return this;
    }

    /**
     * Get the parameters property: Gets or sets the parameters of the job.
     *
     * @return the parameters value.
     */
    public Map<String, String> parameters() {
        return this.parameters;
    }

    /**
     * Set the parameters property: Gets or sets the parameters of the job.
     *
     * @param parameters the parameters value to set.
     * @return the WebhookUpdateProperties object itself.
     */
    public WebhookUpdateProperties withParameters(Map<String, String> parameters) {
        this.parameters = parameters;
        return this;
    }

    /**
     * Get the description property: Gets or sets the description of the webhook.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: Gets or sets the description of the webhook.
     *
     * @param description the description value to set.
     * @return the WebhookUpdateProperties object itself.
     */
    public WebhookUpdateProperties withDescription(String description) {
        this.description = description;
        return this;
    }

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