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

com.azure.resourcemanager.automation.models.Webhook Maven / Gradle / Ivy

// 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.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.automation.fluent.models.WebhookInner;
import java.time.OffsetDateTime;
import java.util.Map;

/**
 * An immutable client-side representation of Webhook.
 */
public interface Webhook {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     * 
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     * 
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     * 
     * @return the type value.
     */
    String type();

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

    /**
     * Gets the uri property: Gets or sets the webhook uri.
     * 
     * @return the uri value.
     */
    String uri();

    /**
     * Gets the expiryTime property: Gets or sets the expiry time.
     * 
     * @return the expiryTime value.
     */
    OffsetDateTime expiryTime();

    /**
     * Gets the lastInvokedTime property: Gets or sets the last invoked time.
     * 
     * @return the lastInvokedTime value.
     */
    OffsetDateTime lastInvokedTime();

    /**
     * Gets the parameters property: Gets or sets the parameters of the job that is created when the webhook calls the
     * runbook it is associated with.
     * 
     * @return the parameters value.
     */
    Map parameters();

    /**
     * Gets the runbook property: Gets or sets the runbook the webhook is associated with.
     * 
     * @return the runbook value.
     */
    RunbookAssociationProperty runbook();

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

    /**
     * Gets the creationTime property: Gets or sets the creation time.
     * 
     * @return the creationTime value.
     */
    OffsetDateTime creationTime();

    /**
     * Gets the lastModifiedTime property: Gets or sets the last modified time.
     * 
     * @return the lastModifiedTime value.
     */
    OffsetDateTime lastModifiedTime();

    /**
     * Gets the lastModifiedBy property: Details of the user who last modified the Webhook.
     * 
     * @return the lastModifiedBy value.
     */
    String lastModifiedBy();

    /**
     * Gets the description property: Gets or sets the description.
     * 
     * @return the description value.
     */
    String description();

    /**
     * Gets the name of the resource group.
     * 
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.automation.fluent.models.WebhookInner object.
     * 
     * @return the inner object.
     */
    WebhookInner innerModel();

    /**
     * The entirety of the Webhook definition.
     */
    interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithName,
        DefinitionStages.WithCreate {
    }

    /**
     * The Webhook definition stages.
     */
    interface DefinitionStages {
        /**
         * The first stage of the Webhook definition.
         */
        interface Blank extends WithParentResource {
        }

        /**
         * The stage of the Webhook definition allowing to specify parent resource.
         */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, automationAccountName.
             * 
             * @param resourceGroupName Name of an Azure Resource group.
             * @param automationAccountName The name of the automation account.
             * @return the next definition stage.
             */
            WithName withExistingAutomationAccount(String resourceGroupName, String automationAccountName);
        }

        /**
         * The stage of the Webhook definition allowing to specify name.
         */
        interface WithName {
            /**
             * Specifies the name property: Gets or sets the name of the webhook..
             * 
             * @param name Gets or sets the name of the webhook.
             * @return the next definition stage.
             */
            WithCreate withName(String name);
        }

        /**
         * The stage of the Webhook definition which contains all the minimum required properties for the resource to be
         * created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithIsEnabled, DefinitionStages.WithUri, DefinitionStages.WithExpiryTime,
            DefinitionStages.WithParameters, DefinitionStages.WithRunbook, DefinitionStages.WithRunOn {
            /**
             * Executes the create request.
             * 
             * @return the created resource.
             */
            Webhook create();

            /**
             * Executes the create request.
             * 
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Webhook create(Context context);
        }

        /**
         * The stage of the Webhook definition allowing to specify isEnabled.
         */
        interface WithIsEnabled {
            /**
             * Specifies the isEnabled property: Gets or sets the value of the enabled flag of webhook..
             * 
             * @param isEnabled Gets or sets the value of the enabled flag of webhook.
             * @return the next definition stage.
             */
            WithCreate withIsEnabled(Boolean isEnabled);
        }

        /**
         * The stage of the Webhook definition allowing to specify uri.
         */
        interface WithUri {
            /**
             * Specifies the uri property: Gets or sets the uri..
             * 
             * @param uri Gets or sets the uri.
             * @return the next definition stage.
             */
            WithCreate withUri(String uri);
        }

        /**
         * The stage of the Webhook definition allowing to specify expiryTime.
         */
        interface WithExpiryTime {
            /**
             * Specifies the expiryTime property: Gets or sets the expiry time..
             * 
             * @param expiryTime Gets or sets the expiry time.
             * @return the next definition stage.
             */
            WithCreate withExpiryTime(OffsetDateTime expiryTime);
        }

        /**
         * The stage of the Webhook definition allowing to specify parameters.
         */
        interface WithParameters {
            /**
             * Specifies the parameters property: Gets or sets the parameters of the job..
             * 
             * @param parameters Gets or sets the parameters of the job.
             * @return the next definition stage.
             */
            WithCreate withParameters(Map parameters);
        }

        /**
         * The stage of the Webhook definition allowing to specify runbook.
         */
        interface WithRunbook {
            /**
             * Specifies the runbook property: Gets or sets the runbook..
             * 
             * @param runbook Gets or sets the runbook.
             * @return the next definition stage.
             */
            WithCreate withRunbook(RunbookAssociationProperty runbook);
        }

        /**
         * The stage of the Webhook definition allowing to specify runOn.
         */
        interface WithRunOn {
            /**
             * Specifies the runOn property: Gets or sets the name of the hybrid worker group the webhook job will run
             * on..
             * 
             * @param runOn Gets or sets the name of the hybrid worker group the webhook job will run on.
             * @return the next definition stage.
             */
            WithCreate withRunOn(String runOn);
        }
    }

    /**
     * Begins update for the Webhook resource.
     * 
     * @return the stage of resource update.
     */
    Webhook.Update update();

    /**
     * The template for Webhook update.
     */
    interface Update extends UpdateStages.WithName, UpdateStages.WithIsEnabled, UpdateStages.WithRunOn,
        UpdateStages.WithParameters, UpdateStages.WithDescription {
        /**
         * Executes the update request.
         * 
         * @return the updated resource.
         */
        Webhook apply();

        /**
         * Executes the update request.
         * 
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Webhook apply(Context context);
    }

    /**
     * The Webhook update stages.
     */
    interface UpdateStages {
        /**
         * The stage of the Webhook update allowing to specify name.
         */
        interface WithName {
            /**
             * Specifies the name property: Gets or sets the name of the webhook..
             * 
             * @param name Gets or sets the name of the webhook.
             * @return the next definition stage.
             */
            Update withName(String name);
        }

        /**
         * The stage of the Webhook update allowing to specify isEnabled.
         */
        interface WithIsEnabled {
            /**
             * Specifies the isEnabled property: Gets or sets the value of the enabled flag of webhook..
             * 
             * @param isEnabled Gets or sets the value of the enabled flag of webhook.
             * @return the next definition stage.
             */
            Update withIsEnabled(Boolean isEnabled);
        }

        /**
         * The stage of the Webhook update allowing to specify runOn.
         */
        interface WithRunOn {
            /**
             * Specifies the runOn property: Gets or sets the name of the hybrid worker group the webhook job will run
             * on..
             * 
             * @param runOn Gets or sets the name of the hybrid worker group the webhook job will run on.
             * @return the next definition stage.
             */
            Update withRunOn(String runOn);
        }

        /**
         * The stage of the Webhook update allowing to specify parameters.
         */
        interface WithParameters {
            /**
             * Specifies the parameters property: Gets or sets the parameters of the job..
             * 
             * @param parameters Gets or sets the parameters of the job.
             * @return the next definition stage.
             */
            Update withParameters(Map parameters);
        }

        /**
         * The stage of the Webhook update allowing to specify description.
         */
        interface WithDescription {
            /**
             * Specifies the description property: Gets or sets the description of the webhook..
             * 
             * @param description Gets or sets the description of the webhook.
             * @return the next definition stage.
             */
            Update withDescription(String description);
        }
    }

    /**
     * Refreshes the resource to sync with Azure.
     * 
     * @return the refreshed resource.
     */
    Webhook refresh();

    /**
     * Refreshes the resource to sync with Azure.
     * 
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    Webhook refresh(Context context);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy