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

package com.azure.resourcemanager.customerinsights.models;

import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.customerinsights.fluent.models.KpiResourceFormatInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of KpiResourceFormat. */
public interface KpiResourceFormat {
    /**
     * 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 entityType property: The mapping entity type.
     *
     * @return the entityType value.
     */
    EntityTypes entityType();

    /**
     * Gets the entityTypeName property: The mapping entity name.
     *
     * @return the entityTypeName value.
     */
    String entityTypeName();

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

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

    /**
     * Gets the displayName property: Localized display name for the KPI.
     *
     * @return the displayName value.
     */
    Map<String, String> displayName();

    /**
     * Gets the description property: Localized description for the KPI.
     *
     * @return the description value.
     */
    Map<String, String> description();

    /**
     * Gets the calculationWindow property: The calculation window.
     *
     * @return the calculationWindow value.
     */
    CalculationWindowTypes calculationWindow();

    /**
     * Gets the calculationWindowFieldName property: Name of calculation window field.
     *
     * @return the calculationWindowFieldName value.
     */
    String calculationWindowFieldName();

    /**
     * Gets the function property: The computation function for the KPI.
     *
     * @return the function value.
     */
    KpiFunctions function();

    /**
     * Gets the expression property: The computation expression for the KPI.
     *
     * @return the expression value.
     */
    String expression();

    /**
     * Gets the unit property: The unit of measurement for the KPI.
     *
     * @return the unit value.
     */
    String unit();

    /**
     * Gets the filter property: The filter expression for the KPI.
     *
     * @return the filter value.
     */
    String filter();

    /**
     * Gets the groupBy property: the group by properties for the KPI.
     *
     * @return the groupBy value.
     */
    List<String> groupBy();

    /**
     * Gets the groupByMetadata property: The KPI GroupByMetadata.
     *
     * @return the groupByMetadata value.
     */
    List<KpiGroupByMetadata> groupByMetadata();

    /**
     * Gets the participantProfilesMetadata property: The participant profiles.
     *
     * @return the participantProfilesMetadata value.
     */
    List<KpiParticipantProfilesMetadata> participantProfilesMetadata();

    /**
     * Gets the provisioningState property: Provisioning state.
     *
     * @return the provisioningState value.
     */
    ProvisioningStates provisioningState();

    /**
     * Gets the thresHolds property: The KPI thresholds.
     *
     * @return the thresHolds value.
     */
    KpiThresholds thresHolds();

    /**
     * Gets the aliases property: The aliases.
     *
     * @return the aliases value.
     */
    List<KpiAlias> aliases();

    /**
     * Gets the extracts property: The KPI extracts.
     *
     * @return the extracts value.
     */
    List<KpiExtract> extracts();

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

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

    /** The entirety of the KpiResourceFormat definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The KpiResourceFormat definition stages. */
    interface DefinitionStages {
        /** The first stage of the KpiResourceFormat definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the KpiResourceFormat definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, hubName.
             *
             * @param resourceGroupName The name of the resource group.
             * @param hubName The name of the hub.
             * @return the next definition stage.
             */
            WithCreate withExistingHub(String resourceGroupName, String hubName);
        }
        /**
         * The stage of the KpiResourceFormat 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.WithEntityType,
                DefinitionStages.WithEntityTypeName,
                DefinitionStages.WithDisplayName,
                DefinitionStages.WithDescription,
                DefinitionStages.WithCalculationWindow,
                DefinitionStages.WithCalculationWindowFieldName,
                DefinitionStages.WithFunction,
                DefinitionStages.WithExpression,
                DefinitionStages.WithUnit,
                DefinitionStages.WithFilter,
                DefinitionStages.WithGroupBy,
                DefinitionStages.WithThresHolds,
                DefinitionStages.WithAliases,
                DefinitionStages.WithExtracts {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            KpiResourceFormat create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            KpiResourceFormat create(Context context);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify entityType. */
        interface WithEntityType {
            /**
             * Specifies the entityType property: The mapping entity type..
             *
             * @param entityType The mapping entity type.
             * @return the next definition stage.
             */
            WithCreate withEntityType(EntityTypes entityType);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify entityTypeName. */
        interface WithEntityTypeName {
            /**
             * Specifies the entityTypeName property: The mapping entity name..
             *
             * @param entityTypeName The mapping entity name.
             * @return the next definition stage.
             */
            WithCreate withEntityTypeName(String entityTypeName);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: Localized display name for the KPI..
             *
             * @param displayName Localized display name for the KPI.
             * @return the next definition stage.
             */
            WithCreate withDisplayName(Map<String, String> displayName);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: Localized description for the KPI..
             *
             * @param description Localized description for the KPI.
             * @return the next definition stage.
             */
            WithCreate withDescription(Map<String, String> description);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify calculationWindow. */
        interface WithCalculationWindow {
            /**
             * Specifies the calculationWindow property: The calculation window..
             *
             * @param calculationWindow The calculation window.
             * @return the next definition stage.
             */
            WithCreate withCalculationWindow(CalculationWindowTypes calculationWindow);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify calculationWindowFieldName. */
        interface WithCalculationWindowFieldName {
            /**
             * Specifies the calculationWindowFieldName property: Name of calculation window field..
             *
             * @param calculationWindowFieldName Name of calculation window field.
             * @return the next definition stage.
             */
            WithCreate withCalculationWindowFieldName(String calculationWindowFieldName);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify function. */
        interface WithFunction {
            /**
             * Specifies the function property: The computation function for the KPI..
             *
             * @param function The computation function for the KPI.
             * @return the next definition stage.
             */
            WithCreate withFunction(KpiFunctions function);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify expression. */
        interface WithExpression {
            /**
             * Specifies the expression property: The computation expression for the KPI..
             *
             * @param expression The computation expression for the KPI.
             * @return the next definition stage.
             */
            WithCreate withExpression(String expression);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify unit. */
        interface WithUnit {
            /**
             * Specifies the unit property: The unit of measurement for the KPI..
             *
             * @param unit The unit of measurement for the KPI.
             * @return the next definition stage.
             */
            WithCreate withUnit(String unit);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify filter. */
        interface WithFilter {
            /**
             * Specifies the filter property: The filter expression for the KPI..
             *
             * @param filter The filter expression for the KPI.
             * @return the next definition stage.
             */
            WithCreate withFilter(String filter);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify groupBy. */
        interface WithGroupBy {
            /**
             * Specifies the groupBy property: the group by properties for the KPI..
             *
             * @param groupBy the group by properties for the KPI.
             * @return the next definition stage.
             */
            WithCreate withGroupBy(List<String> groupBy);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify thresHolds. */
        interface WithThresHolds {
            /**
             * Specifies the thresHolds property: The KPI thresholds..
             *
             * @param thresHolds The KPI thresholds.
             * @return the next definition stage.
             */
            WithCreate withThresHolds(KpiThresholds thresHolds);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify aliases. */
        interface WithAliases {
            /**
             * Specifies the aliases property: The aliases..
             *
             * @param aliases The aliases.
             * @return the next definition stage.
             */
            WithCreate withAliases(List<KpiAlias> aliases);
        }
        /** The stage of the KpiResourceFormat definition allowing to specify extracts. */
        interface WithExtracts {
            /**
             * Specifies the extracts property: The KPI extracts..
             *
             * @param extracts The KPI extracts.
             * @return the next definition stage.
             */
            WithCreate withExtracts(List<KpiExtract> extracts);
        }
    }
    /**
     * Begins update for the KpiResourceFormat resource.
     *
     * @return the stage of resource update.
     */
    KpiResourceFormat.Update update();

    /** The template for KpiResourceFormat update. */
    interface Update
        extends UpdateStages.WithEntityType,
            UpdateStages.WithEntityTypeName,
            UpdateStages.WithDisplayName,
            UpdateStages.WithDescription,
            UpdateStages.WithCalculationWindow,
            UpdateStages.WithCalculationWindowFieldName,
            UpdateStages.WithFunction,
            UpdateStages.WithExpression,
            UpdateStages.WithUnit,
            UpdateStages.WithFilter,
            UpdateStages.WithGroupBy,
            UpdateStages.WithThresHolds,
            UpdateStages.WithAliases,
            UpdateStages.WithExtracts {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        KpiResourceFormat apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        KpiResourceFormat apply(Context context);
    }
    /** The KpiResourceFormat update stages. */
    interface UpdateStages {
        /** The stage of the KpiResourceFormat update allowing to specify entityType. */
        interface WithEntityType {
            /**
             * Specifies the entityType property: The mapping entity type..
             *
             * @param entityType The mapping entity type.
             * @return the next definition stage.
             */
            Update withEntityType(EntityTypes entityType);
        }
        /** The stage of the KpiResourceFormat update allowing to specify entityTypeName. */
        interface WithEntityTypeName {
            /**
             * Specifies the entityTypeName property: The mapping entity name..
             *
             * @param entityTypeName The mapping entity name.
             * @return the next definition stage.
             */
            Update withEntityTypeName(String entityTypeName);
        }
        /** The stage of the KpiResourceFormat update allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: Localized display name for the KPI..
             *
             * @param displayName Localized display name for the KPI.
             * @return the next definition stage.
             */
            Update withDisplayName(Map<String, String> displayName);
        }
        /** The stage of the KpiResourceFormat update allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: Localized description for the KPI..
             *
             * @param description Localized description for the KPI.
             * @return the next definition stage.
             */
            Update withDescription(Map<String, String> description);
        }
        /** The stage of the KpiResourceFormat update allowing to specify calculationWindow. */
        interface WithCalculationWindow {
            /**
             * Specifies the calculationWindow property: The calculation window..
             *
             * @param calculationWindow The calculation window.
             * @return the next definition stage.
             */
            Update withCalculationWindow(CalculationWindowTypes calculationWindow);
        }
        /** The stage of the KpiResourceFormat update allowing to specify calculationWindowFieldName. */
        interface WithCalculationWindowFieldName {
            /**
             * Specifies the calculationWindowFieldName property: Name of calculation window field..
             *
             * @param calculationWindowFieldName Name of calculation window field.
             * @return the next definition stage.
             */
            Update withCalculationWindowFieldName(String calculationWindowFieldName);
        }
        /** The stage of the KpiResourceFormat update allowing to specify function. */
        interface WithFunction {
            /**
             * Specifies the function property: The computation function for the KPI..
             *
             * @param function The computation function for the KPI.
             * @return the next definition stage.
             */
            Update withFunction(KpiFunctions function);
        }
        /** The stage of the KpiResourceFormat update allowing to specify expression. */
        interface WithExpression {
            /**
             * Specifies the expression property: The computation expression for the KPI..
             *
             * @param expression The computation expression for the KPI.
             * @return the next definition stage.
             */
            Update withExpression(String expression);
        }
        /** The stage of the KpiResourceFormat update allowing to specify unit. */
        interface WithUnit {
            /**
             * Specifies the unit property: The unit of measurement for the KPI..
             *
             * @param unit The unit of measurement for the KPI.
             * @return the next definition stage.
             */
            Update withUnit(String unit);
        }
        /** The stage of the KpiResourceFormat update allowing to specify filter. */
        interface WithFilter {
            /**
             * Specifies the filter property: The filter expression for the KPI..
             *
             * @param filter The filter expression for the KPI.
             * @return the next definition stage.
             */
            Update withFilter(String filter);
        }
        /** The stage of the KpiResourceFormat update allowing to specify groupBy. */
        interface WithGroupBy {
            /**
             * Specifies the groupBy property: the group by properties for the KPI..
             *
             * @param groupBy the group by properties for the KPI.
             * @return the next definition stage.
             */
            Update withGroupBy(List<String> groupBy);
        }
        /** The stage of the KpiResourceFormat update allowing to specify thresHolds. */
        interface WithThresHolds {
            /**
             * Specifies the thresHolds property: The KPI thresholds..
             *
             * @param thresHolds The KPI thresholds.
             * @return the next definition stage.
             */
            Update withThresHolds(KpiThresholds thresHolds);
        }
        /** The stage of the KpiResourceFormat update allowing to specify aliases. */
        interface WithAliases {
            /**
             * Specifies the aliases property: The aliases..
             *
             * @param aliases The aliases.
             * @return the next definition stage.
             */
            Update withAliases(List<KpiAlias> aliases);
        }
        /** The stage of the KpiResourceFormat update allowing to specify extracts. */
        interface WithExtracts {
            /**
             * Specifies the extracts property: The KPI extracts..
             *
             * @param extracts The KPI extracts.
             * @return the next definition stage.
             */
            Update withExtracts(List<KpiExtract> extracts);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    KpiResourceFormat refresh();

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

    /**
     * Reprocesses the Kpi values of the specified KPI.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    Response<Void> reprocessWithResponse(Context context);

    /**
     * Reprocesses the Kpi values of the specified KPI.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void reprocess();
}
