// 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.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner;
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.List;

/** An immutable client-side representation of Watchlist. */
public interface Watchlist {
    /**
     * 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 etag property: Etag of the azure resource.
     *
     * @return the etag value.
     */
    String etag();

    /**
     * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the watchlistId property: The id (a Guid) of the watchlist.
     *
     * @return the watchlistId value.
     */
    String watchlistId();

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

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

    /**
     * Gets the source property: The filename of the watchlist, called 'source'.
     *
     * @return the source value.
     */
    String source();

    /**
     * Gets the sourceType property: The sourceType of the watchlist.
     *
     * @return the sourceType value.
     */
    SourceType sourceType();

    /**
     * Gets the created property: The time the watchlist was created.
     *
     * @return the created value.
     */
    OffsetDateTime created();

    /**
     * Gets the updated property: The last time the watchlist was updated.
     *
     * @return the updated value.
     */
    OffsetDateTime updated();

    /**
     * Gets the createdBy property: Describes a user that created the watchlist.
     *
     * @return the createdBy value.
     */
    UserInfo createdBy();

    /**
     * Gets the updatedBy property: Describes a user that updated the watchlist.
     *
     * @return the updatedBy value.
     */
    UserInfo updatedBy();

    /**
     * Gets the description property: A description of the watchlist.
     *
     * @return the description value.
     */
    String description();

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

    /**
     * Gets the watchlistAlias property: The alias of the watchlist.
     *
     * @return the watchlistAlias value.
     */
    String watchlistAlias();

    /**
     * Gets the isDeleted property: A flag that indicates if the watchlist is deleted or not.
     *
     * @return the isDeleted value.
     */
    Boolean isDeleted();

    /**
     * Gets the labels property: List of labels relevant to this watchlist.
     *
     * @return the labels value.
     */
    List<String> labels();

    /**
     * Gets the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration format).
     *
     * @return the defaultDuration value.
     */
    Duration defaultDuration();

    /**
     * Gets the tenantId property: The tenantId where the watchlist belongs to.
     *
     * @return the tenantId value.
     */
    String tenantId();

    /**
     * Gets the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header.
     *
     * @return the numberOfLinesToSkip value.
     */
    Integer numberOfLinesToSkip();

    /**
     * Gets the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv
     * content type, it's the content of the file that will parsed by the endpoint.
     *
     * @return the rawContent value.
     */
    String rawContent();

    /**
     * Gets the itemsSearchKey property: The search key is used to optimize query performance when using watchlists for
     * joins with other data. For example, enable a column with IP addresses to be the designated SearchKey field, then
     * use this field as the key field when joining to other event data by IP address.
     *
     * @return the itemsSearchKey value.
     */
    String itemsSearchKey();

    /**
     * Gets the contentType property: The content type of the raw content. Example : text/csv or text/tsv.
     *
     * @return the contentType value.
     */
    String contentType();

    /**
     * Gets the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When
     * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted.
     *
     * @return the uploadStatus value.
     */
    String uploadStatus();

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

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

    /** The entirety of the Watchlist definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The Watchlist definition stages. */
    interface DefinitionStages {
        /** The first stage of the Watchlist definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the Watchlist definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, workspaceName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param workspaceName The name of the workspace.
             * @return the next definition stage.
             */
            WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName);
        }
        /**
         * The stage of the Watchlist 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.WithEtag,
                DefinitionStages.WithWatchlistId,
                DefinitionStages.WithDisplayName,
                DefinitionStages.WithProvider,
                DefinitionStages.WithSource,
                DefinitionStages.WithSourceType,
                DefinitionStages.WithCreated,
                DefinitionStages.WithUpdated,
                DefinitionStages.WithCreatedBy,
                DefinitionStages.WithUpdatedBy,
                DefinitionStages.WithDescription,
                DefinitionStages.WithWatchlistType,
                DefinitionStages.WithWatchlistAlias,
                DefinitionStages.WithIsDeleted,
                DefinitionStages.WithLabels,
                DefinitionStages.WithDefaultDuration,
                DefinitionStages.WithTenantId,
                DefinitionStages.WithNumberOfLinesToSkip,
                DefinitionStages.WithRawContent,
                DefinitionStages.WithItemsSearchKey,
                DefinitionStages.WithContentType,
                DefinitionStages.WithUploadStatus {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Watchlist create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Watchlist create(Context context);
        }
        /** The stage of the Watchlist definition allowing to specify etag. */
        interface WithEtag {
            /**
             * Specifies the etag property: Etag of the azure resource.
             *
             * @param etag Etag of the azure resource.
             * @return the next definition stage.
             */
            WithCreate withEtag(String etag);
        }
        /** The stage of the Watchlist definition allowing to specify watchlistId. */
        interface WithWatchlistId {
            /**
             * Specifies the watchlistId property: The id (a Guid) of the watchlist.
             *
             * @param watchlistId The id (a Guid) of the watchlist.
             * @return the next definition stage.
             */
            WithCreate withWatchlistId(String watchlistId);
        }
        /** The stage of the Watchlist definition allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: The display name of the watchlist.
             *
             * @param displayName The display name of the watchlist.
             * @return the next definition stage.
             */
            WithCreate withDisplayName(String displayName);
        }
        /** The stage of the Watchlist definition allowing to specify provider. */
        interface WithProvider {
            /**
             * Specifies the provider property: The provider of the watchlist.
             *
             * @param provider The provider of the watchlist.
             * @return the next definition stage.
             */
            WithCreate withProvider(String provider);
        }
        /** The stage of the Watchlist definition allowing to specify source. */
        interface WithSource {
            /**
             * Specifies the source property: The filename of the watchlist, called 'source'.
             *
             * @param source The filename of the watchlist, called 'source'.
             * @return the next definition stage.
             */
            WithCreate withSource(String source);
        }
        /** The stage of the Watchlist definition allowing to specify sourceType. */
        interface WithSourceType {
            /**
             * Specifies the sourceType property: The sourceType of the watchlist.
             *
             * @param sourceType The sourceType of the watchlist.
             * @return the next definition stage.
             */
            WithCreate withSourceType(SourceType sourceType);
        }
        /** The stage of the Watchlist definition allowing to specify created. */
        interface WithCreated {
            /**
             * Specifies the created property: The time the watchlist was created.
             *
             * @param created The time the watchlist was created.
             * @return the next definition stage.
             */
            WithCreate withCreated(OffsetDateTime created);
        }
        /** The stage of the Watchlist definition allowing to specify updated. */
        interface WithUpdated {
            /**
             * Specifies the updated property: The last time the watchlist was updated.
             *
             * @param updated The last time the watchlist was updated.
             * @return the next definition stage.
             */
            WithCreate withUpdated(OffsetDateTime updated);
        }
        /** The stage of the Watchlist definition allowing to specify createdBy. */
        interface WithCreatedBy {
            /**
             * Specifies the createdBy property: Describes a user that created the watchlist.
             *
             * @param createdBy Describes a user that created the watchlist.
             * @return the next definition stage.
             */
            WithCreate withCreatedBy(UserInfo createdBy);
        }
        /** The stage of the Watchlist definition allowing to specify updatedBy. */
        interface WithUpdatedBy {
            /**
             * Specifies the updatedBy property: Describes a user that updated the watchlist.
             *
             * @param updatedBy Describes a user that updated the watchlist.
             * @return the next definition stage.
             */
            WithCreate withUpdatedBy(UserInfo updatedBy);
        }
        /** The stage of the Watchlist definition allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: A description of the watchlist.
             *
             * @param description A description of the watchlist.
             * @return the next definition stage.
             */
            WithCreate withDescription(String description);
        }
        /** The stage of the Watchlist definition allowing to specify watchlistType. */
        interface WithWatchlistType {
            /**
             * Specifies the watchlistType property: The type of the watchlist.
             *
             * @param watchlistType The type of the watchlist.
             * @return the next definition stage.
             */
            WithCreate withWatchlistType(String watchlistType);
        }
        /** The stage of the Watchlist definition allowing to specify watchlistAlias. */
        interface WithWatchlistAlias {
            /**
             * Specifies the watchlistAlias property: The alias of the watchlist.
             *
             * @param watchlistAlias The alias of the watchlist.
             * @return the next definition stage.
             */
            WithCreate withWatchlistAlias(String watchlistAlias);
        }
        /** The stage of the Watchlist definition allowing to specify isDeleted. */
        interface WithIsDeleted {
            /**
             * Specifies the isDeleted property: A flag that indicates if the watchlist is deleted or not.
             *
             * @param isDeleted A flag that indicates if the watchlist is deleted or not.
             * @return the next definition stage.
             */
            WithCreate withIsDeleted(Boolean isDeleted);
        }
        /** The stage of the Watchlist definition allowing to specify labels. */
        interface WithLabels {
            /**
             * Specifies the labels property: List of labels relevant to this watchlist.
             *
             * @param labels List of labels relevant to this watchlist.
             * @return the next definition stage.
             */
            WithCreate withLabels(List<String> labels);
        }
        /** The stage of the Watchlist definition allowing to specify defaultDuration. */
        interface WithDefaultDuration {
            /**
             * Specifies the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration
             * format).
             *
             * @param defaultDuration The default duration of a watchlist (in ISO 8601 duration format).
             * @return the next definition stage.
             */
            WithCreate withDefaultDuration(Duration defaultDuration);
        }
        /** The stage of the Watchlist definition allowing to specify tenantId. */
        interface WithTenantId {
            /**
             * Specifies the tenantId property: The tenantId where the watchlist belongs to.
             *
             * @param tenantId The tenantId where the watchlist belongs to.
             * @return the next definition stage.
             */
            WithCreate withTenantId(String tenantId);
        }
        /** The stage of the Watchlist definition allowing to specify numberOfLinesToSkip. */
        interface WithNumberOfLinesToSkip {
            /**
             * Specifies the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the
             * header.
             *
             * @param numberOfLinesToSkip The number of lines in a csv/tsv content to skip before the header.
             * @return the next definition stage.
             */
            WithCreate withNumberOfLinesToSkip(Integer numberOfLinesToSkip);
        }
        /** The stage of the Watchlist definition allowing to specify rawContent. */
        interface WithRawContent {
            /**
             * Specifies the rawContent property: The raw content that represents to watchlist items to create. In case
             * of csv/tsv content type, it's the content of the file that will parsed by the endpoint.
             *
             * @param rawContent The raw content that represents to watchlist items to create. In case of csv/tsv
             *     content type, it's the content of the file that will parsed by the endpoint.
             * @return the next definition stage.
             */
            WithCreate withRawContent(String rawContent);
        }
        /** The stage of the Watchlist definition allowing to specify itemsSearchKey. */
        interface WithItemsSearchKey {
            /**
             * Specifies the itemsSearchKey property: The search key is used to optimize query performance when using
             * watchlists for joins with other data. For example, enable a column with IP addresses to be the designated
             * SearchKey field, then use this field as the key field when joining to other event data by IP address..
             *
             * @param itemsSearchKey The search key is used to optimize query performance when using watchlists for
             *     joins with other data. For example, enable a column with IP addresses to be the designated SearchKey
             *     field, then use this field as the key field when joining to other event data by IP address.
             * @return the next definition stage.
             */
            WithCreate withItemsSearchKey(String itemsSearchKey);
        }
        /** The stage of the Watchlist definition allowing to specify contentType. */
        interface WithContentType {
            /**
             * Specifies the contentType property: The content type of the raw content. Example : text/csv or text/tsv .
             *
             * @param contentType The content type of the raw content. Example : text/csv or text/tsv.
             * @return the next definition stage.
             */
            WithCreate withContentType(String contentType);
        }
        /** The stage of the Watchlist definition allowing to specify uploadStatus. */
        interface WithUploadStatus {
            /**
             * Specifies the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete.
             * Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted.
             *
             * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a
             *     Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted.
             * @return the next definition stage.
             */
            WithCreate withUploadStatus(String uploadStatus);
        }
    }
    /**
     * Begins update for the Watchlist resource.
     *
     * @return the stage of resource update.
     */
    Watchlist.Update update();

    /** The template for Watchlist update. */
    interface Update
        extends UpdateStages.WithEtag,
            UpdateStages.WithWatchlistId,
            UpdateStages.WithDisplayName,
            UpdateStages.WithProvider,
            UpdateStages.WithSource,
            UpdateStages.WithSourceType,
            UpdateStages.WithCreated,
            UpdateStages.WithUpdated,
            UpdateStages.WithCreatedBy,
            UpdateStages.WithUpdatedBy,
            UpdateStages.WithDescription,
            UpdateStages.WithWatchlistType,
            UpdateStages.WithWatchlistAlias,
            UpdateStages.WithIsDeleted,
            UpdateStages.WithLabels,
            UpdateStages.WithDefaultDuration,
            UpdateStages.WithTenantId,
            UpdateStages.WithNumberOfLinesToSkip,
            UpdateStages.WithRawContent,
            UpdateStages.WithItemsSearchKey,
            UpdateStages.WithContentType,
            UpdateStages.WithUploadStatus {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        Watchlist apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Watchlist apply(Context context);
    }
    /** The Watchlist update stages. */
    interface UpdateStages {
        /** The stage of the Watchlist update allowing to specify etag. */
        interface WithEtag {
            /**
             * Specifies the etag property: Etag of the azure resource.
             *
             * @param etag Etag of the azure resource.
             * @return the next definition stage.
             */
            Update withEtag(String etag);
        }
        /** The stage of the Watchlist update allowing to specify watchlistId. */
        interface WithWatchlistId {
            /**
             * Specifies the watchlistId property: The id (a Guid) of the watchlist.
             *
             * @param watchlistId The id (a Guid) of the watchlist.
             * @return the next definition stage.
             */
            Update withWatchlistId(String watchlistId);
        }
        /** The stage of the Watchlist update allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: The display name of the watchlist.
             *
             * @param displayName The display name of the watchlist.
             * @return the next definition stage.
             */
            Update withDisplayName(String displayName);
        }
        /** The stage of the Watchlist update allowing to specify provider. */
        interface WithProvider {
            /**
             * Specifies the provider property: The provider of the watchlist.
             *
             * @param provider The provider of the watchlist.
             * @return the next definition stage.
             */
            Update withProvider(String provider);
        }
        /** The stage of the Watchlist update allowing to specify source. */
        interface WithSource {
            /**
             * Specifies the source property: The filename of the watchlist, called 'source'.
             *
             * @param source The filename of the watchlist, called 'source'.
             * @return the next definition stage.
             */
            Update withSource(String source);
        }
        /** The stage of the Watchlist update allowing to specify sourceType. */
        interface WithSourceType {
            /**
             * Specifies the sourceType property: The sourceType of the watchlist.
             *
             * @param sourceType The sourceType of the watchlist.
             * @return the next definition stage.
             */
            Update withSourceType(SourceType sourceType);
        }
        /** The stage of the Watchlist update allowing to specify created. */
        interface WithCreated {
            /**
             * Specifies the created property: The time the watchlist was created.
             *
             * @param created The time the watchlist was created.
             * @return the next definition stage.
             */
            Update withCreated(OffsetDateTime created);
        }
        /** The stage of the Watchlist update allowing to specify updated. */
        interface WithUpdated {
            /**
             * Specifies the updated property: The last time the watchlist was updated.
             *
             * @param updated The last time the watchlist was updated.
             * @return the next definition stage.
             */
            Update withUpdated(OffsetDateTime updated);
        }
        /** The stage of the Watchlist update allowing to specify createdBy. */
        interface WithCreatedBy {
            /**
             * Specifies the createdBy property: Describes a user that created the watchlist.
             *
             * @param createdBy Describes a user that created the watchlist.
             * @return the next definition stage.
             */
            Update withCreatedBy(UserInfo createdBy);
        }
        /** The stage of the Watchlist update allowing to specify updatedBy. */
        interface WithUpdatedBy {
            /**
             * Specifies the updatedBy property: Describes a user that updated the watchlist.
             *
             * @param updatedBy Describes a user that updated the watchlist.
             * @return the next definition stage.
             */
            Update withUpdatedBy(UserInfo updatedBy);
        }
        /** The stage of the Watchlist update allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: A description of the watchlist.
             *
             * @param description A description of the watchlist.
             * @return the next definition stage.
             */
            Update withDescription(String description);
        }
        /** The stage of the Watchlist update allowing to specify watchlistType. */
        interface WithWatchlistType {
            /**
             * Specifies the watchlistType property: The type of the watchlist.
             *
             * @param watchlistType The type of the watchlist.
             * @return the next definition stage.
             */
            Update withWatchlistType(String watchlistType);
        }
        /** The stage of the Watchlist update allowing to specify watchlistAlias. */
        interface WithWatchlistAlias {
            /**
             * Specifies the watchlistAlias property: The alias of the watchlist.
             *
             * @param watchlistAlias The alias of the watchlist.
             * @return the next definition stage.
             */
            Update withWatchlistAlias(String watchlistAlias);
        }
        /** The stage of the Watchlist update allowing to specify isDeleted. */
        interface WithIsDeleted {
            /**
             * Specifies the isDeleted property: A flag that indicates if the watchlist is deleted or not.
             *
             * @param isDeleted A flag that indicates if the watchlist is deleted or not.
             * @return the next definition stage.
             */
            Update withIsDeleted(Boolean isDeleted);
        }
        /** The stage of the Watchlist update allowing to specify labels. */
        interface WithLabels {
            /**
             * Specifies the labels property: List of labels relevant to this watchlist.
             *
             * @param labels List of labels relevant to this watchlist.
             * @return the next definition stage.
             */
            Update withLabels(List<String> labels);
        }
        /** The stage of the Watchlist update allowing to specify defaultDuration. */
        interface WithDefaultDuration {
            /**
             * Specifies the defaultDuration property: The default duration of a watchlist (in ISO 8601 duration
             * format).
             *
             * @param defaultDuration The default duration of a watchlist (in ISO 8601 duration format).
             * @return the next definition stage.
             */
            Update withDefaultDuration(Duration defaultDuration);
        }
        /** The stage of the Watchlist update allowing to specify tenantId. */
        interface WithTenantId {
            /**
             * Specifies the tenantId property: The tenantId where the watchlist belongs to.
             *
             * @param tenantId The tenantId where the watchlist belongs to.
             * @return the next definition stage.
             */
            Update withTenantId(String tenantId);
        }
        /** The stage of the Watchlist update allowing to specify numberOfLinesToSkip. */
        interface WithNumberOfLinesToSkip {
            /**
             * Specifies the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the
             * header.
             *
             * @param numberOfLinesToSkip The number of lines in a csv/tsv content to skip before the header.
             * @return the next definition stage.
             */
            Update withNumberOfLinesToSkip(Integer numberOfLinesToSkip);
        }
        /** The stage of the Watchlist update allowing to specify rawContent. */
        interface WithRawContent {
            /**
             * Specifies the rawContent property: The raw content that represents to watchlist items to create. In case
             * of csv/tsv content type, it's the content of the file that will parsed by the endpoint.
             *
             * @param rawContent The raw content that represents to watchlist items to create. In case of csv/tsv
             *     content type, it's the content of the file that will parsed by the endpoint.
             * @return the next definition stage.
             */
            Update withRawContent(String rawContent);
        }
        /** The stage of the Watchlist update allowing to specify itemsSearchKey. */
        interface WithItemsSearchKey {
            /**
             * Specifies the itemsSearchKey property: The search key is used to optimize query performance when using
             * watchlists for joins with other data. For example, enable a column with IP addresses to be the designated
             * SearchKey field, then use this field as the key field when joining to other event data by IP address..
             *
             * @param itemsSearchKey The search key is used to optimize query performance when using watchlists for
             *     joins with other data. For example, enable a column with IP addresses to be the designated SearchKey
             *     field, then use this field as the key field when joining to other event data by IP address.
             * @return the next definition stage.
             */
            Update withItemsSearchKey(String itemsSearchKey);
        }
        /** The stage of the Watchlist update allowing to specify contentType. */
        interface WithContentType {
            /**
             * Specifies the contentType property: The content type of the raw content. Example : text/csv or text/tsv .
             *
             * @param contentType The content type of the raw content. Example : text/csv or text/tsv.
             * @return the next definition stage.
             */
            Update withContentType(String contentType);
        }
        /** The stage of the Watchlist update allowing to specify uploadStatus. */
        interface WithUploadStatus {
            /**
             * Specifies the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete.
             * Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted.
             *
             * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a
             *     Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted.
             * @return the next definition stage.
             */
            Update withUploadStatus(String uploadStatus);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Watchlist refresh();

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