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

package com.azure.resourcemanager.streamanalytics.models;

import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.streamanalytics.fluent.models.FunctionInner;
import com.azure.resourcemanager.streamanalytics.fluent.models.InputInner;
import com.azure.resourcemanager.streamanalytics.fluent.models.OutputInner;
import com.azure.resourcemanager.streamanalytics.fluent.models.StreamingJobInner;
import com.azure.resourcemanager.streamanalytics.fluent.models.TransformationInner;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of StreamingJob. */
public interface StreamingJob {
    /**
     * 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 location property: The geo-location where the resource lives.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the tags property: Resource tags.
     *
     * @return the tags value.
     */
    Map<String, String> tags();

    /**
     * Gets the identity property: Describes the system-assigned managed identity assigned to this job that can be used
     * to authenticate with inputs and outputs.
     *
     * @return the identity value.
     */
    Identity identity();

    /**
     * Gets the sku property: Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests.
     *
     * @return the sku value.
     */
    Sku sku();

    /**
     * Gets the jobId property: A GUID uniquely identifying the streaming job. This GUID is generated upon creation of
     * the streaming job.
     *
     * @return the jobId value.
     */
    String jobId();

    /**
     * Gets the provisioningState property: Describes the provisioning status of the streaming job.
     *
     * @return the provisioningState value.
     */
    String provisioningState();

    /**
     * Gets the jobState property: Describes the state of the streaming job.
     *
     * @return the jobState value.
     */
    String jobState();

    /**
     * Gets the jobType property: Describes the type of the job. Valid modes are `Cloud` and 'Edge'.
     *
     * @return the jobType value.
     */
    JobType jobType();

    /**
     * Gets the outputStartMode property: This property should only be utilized when it is desired that the job be
     * started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate
     * whether the starting point of the output event stream should start whenever the job is started, start at a custom
     * user time stamp specified via the outputStartTime property, or start from the last event output time.
     *
     * @return the outputStartMode value.
     */
    OutputStartMode outputStartMode();

    /**
     * Gets the outputStartTime property: Value is either an ISO-8601 formatted time stamp that indicates the starting
     * point of the output event stream, or null to indicate that the output event stream will start whenever the
     * streaming job is started. This property must have a value if outputStartMode is set to CustomTime.
     *
     * @return the outputStartTime value.
     */
    OffsetDateTime outputStartTime();

    /**
     * Gets the lastOutputEventTime property: Value is either an ISO-8601 formatted timestamp indicating the last output
     * event time of the streaming job or null indicating that output has not yet been produced. In case of multiple
     * outputs or multiple streams, this shows the latest value in that set.
     *
     * @return the lastOutputEventTime value.
     */
    OffsetDateTime lastOutputEventTime();

    /**
     * Gets the eventsOutOfOrderPolicy property: Indicates the policy to apply to events that arrive out of order in the
     * input event stream.
     *
     * @return the eventsOutOfOrderPolicy value.
     */
    EventsOutOfOrderPolicy eventsOutOfOrderPolicy();

    /**
     * Gets the outputErrorPolicy property: Indicates the policy to apply to events that arrive at the output and cannot
     * be written to the external storage due to being malformed (missing column values, column values of wrong type or
     * size).
     *
     * @return the outputErrorPolicy value.
     */
    OutputErrorPolicy outputErrorPolicy();

    /**
     * Gets the eventsOutOfOrderMaxDelayInSeconds property: The maximum tolerable delay in seconds where out-of-order
     * events can be adjusted to be back in order.
     *
     * @return the eventsOutOfOrderMaxDelayInSeconds value.
     */
    Integer eventsOutOfOrderMaxDelayInSeconds();

    /**
     * Gets the eventsLateArrivalMaxDelayInSeconds property: The maximum tolerable delay in seconds where events
     * arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify
     * wait indefinitely. If the property is absent, it is interpreted to have a value of -1.
     *
     * @return the eventsLateArrivalMaxDelayInSeconds value.
     */
    Integer eventsLateArrivalMaxDelayInSeconds();

    /**
     * Gets the dataLocale property: The data locale of the stream analytics job. Value should be the name of a
     * supported .NET Culture from the set
     * https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if
     * none specified.
     *
     * @return the dataLocale value.
     */
    String dataLocale();

    /**
     * Gets the compatibilityLevel property: Controls certain runtime behaviors of the streaming job.
     *
     * @return the compatibilityLevel value.
     */
    CompatibilityLevel compatibilityLevel();

    /**
     * Gets the createdDate property: Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was
     * created.
     *
     * @return the createdDate value.
     */
    OffsetDateTime createdDate();

    /**
     * Gets the inputs property: A list of one or more inputs to the streaming job. The name property for each input is
     * required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation.
     * You must use the PATCH API available for the individual input.
     *
     * @return the inputs value.
     */
    List<Input> inputs();

    /**
     * Gets the transformation property: Indicates the query and the number of streaming units to use for the streaming
     * job. The name property of the transformation is required when specifying this property in a PUT request. This
     * property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual
     * transformation.
     *
     * @return the transformation value.
     */
    Transformation transformation();

    /**
     * Gets the outputs property: A list of one or more outputs for the streaming job. The name property for each output
     * is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation.
     * You must use the PATCH API available for the individual output.
     *
     * @return the outputs value.
     */
    List<Output> outputs();

    /**
     * Gets the functions property: A list of one or more functions for the streaming job. The name property for each
     * function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH
     * operation. You must use the PATCH API available for the individual transformation.
     *
     * @return the functions value.
     */
    List<Function> functions();

    /**
     * Gets the etag property: The current entity tag for the streaming job. This is an opaque string. You can use it to
     * detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match
     * headers for write operations for optimistic concurrency.
     *
     * @return the etag value.
     */
    String etag();

    /**
     * Gets the jobStorageAccount property: The properties that are associated with an Azure Storage account with MSI.
     *
     * @return the jobStorageAccount value.
     */
    JobStorageAccount jobStorageAccount();

    /**
     * Gets the contentStoragePolicy property: Valid values are JobStorageAccount and SystemAccount. If set to
     * JobStorageAccount, this requires the user to also specify jobStorageAccount property. .
     *
     * @return the contentStoragePolicy value.
     */
    ContentStoragePolicy contentStoragePolicy();

    /**
     * Gets the cluster property: The cluster which streaming jobs will run on.
     *
     * @return the cluster value.
     */
    ClusterInfo cluster();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

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

    /** The entirety of the StreamingJob definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithCreate {
    }
    /** The StreamingJob definition stages. */
    interface DefinitionStages {
        /** The first stage of the StreamingJob definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the StreamingJob definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(String location);
        }
        /** The stage of the StreamingJob definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * The stage of the StreamingJob 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.WithTags,
                DefinitionStages.WithIdentity,
                DefinitionStages.WithSku,
                DefinitionStages.WithJobType,
                DefinitionStages.WithOutputStartMode,
                DefinitionStages.WithOutputStartTime,
                DefinitionStages.WithEventsOutOfOrderPolicy,
                DefinitionStages.WithOutputErrorPolicy,
                DefinitionStages.WithEventsOutOfOrderMaxDelayInSeconds,
                DefinitionStages.WithEventsLateArrivalMaxDelayInSeconds,
                DefinitionStages.WithDataLocale,
                DefinitionStages.WithCompatibilityLevel,
                DefinitionStages.WithInputs,
                DefinitionStages.WithTransformation,
                DefinitionStages.WithOutputs,
                DefinitionStages.WithFunctions,
                DefinitionStages.WithJobStorageAccount,
                DefinitionStages.WithContentStoragePolicy,
                DefinitionStages.WithCluster,
                DefinitionStages.WithIfMatch,
                DefinitionStages.WithIfNoneMatch {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            StreamingJob create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            StreamingJob create(Context context);
        }
        /** The stage of the StreamingJob definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the StreamingJob definition allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: Describes the system-assigned managed identity assigned to this job that
             * can be used to authenticate with inputs and outputs..
             *
             * @param identity Describes the system-assigned managed identity assigned to this job that can be used to
             *     authenticate with inputs and outputs.
             * @return the next definition stage.
             */
            WithCreate withIdentity(Identity identity);
        }
        /** The stage of the StreamingJob definition allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: Describes the SKU of the streaming job. Required on PUT (CreateOrReplace)
             * requests..
             *
             * @param sku Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests.
             * @return the next definition stage.
             */
            WithCreate withSku(Sku sku);
        }
        /** The stage of the StreamingJob definition allowing to specify jobType. */
        interface WithJobType {
            /**
             * Specifies the jobType property: Describes the type of the job. Valid modes are `Cloud` and 'Edge'..
             *
             * @param jobType Describes the type of the job. Valid modes are `Cloud` and 'Edge'.
             * @return the next definition stage.
             */
            WithCreate withJobType(JobType jobType);
        }
        /** The stage of the StreamingJob definition allowing to specify outputStartMode. */
        interface WithOutputStartMode {
            /**
             * Specifies the outputStartMode property: This property should only be utilized when it is desired that the
             * job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime
             * to indicate whether the starting point of the output event stream should start whenever the job is
             * started, start at a custom user time stamp specified via the outputStartTime property, or start from the
             * last event output time..
             *
             * @param outputStartMode This property should only be utilized when it is desired that the job be started
             *     immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate
             *     whether the starting point of the output event stream should start whenever the job is started, start
             *     at a custom user time stamp specified via the outputStartTime property, or start from the last event
             *     output time.
             * @return the next definition stage.
             */
            WithCreate withOutputStartMode(OutputStartMode outputStartMode);
        }
        /** The stage of the StreamingJob definition allowing to specify outputStartTime. */
        interface WithOutputStartTime {
            /**
             * Specifies the outputStartTime property: Value is either an ISO-8601 formatted time stamp that indicates
             * the starting point of the output event stream, or null to indicate that the output event stream will
             * start whenever the streaming job is started. This property must have a value if outputStartMode is set to
             * CustomTime..
             *
             * @param outputStartTime Value is either an ISO-8601 formatted time stamp that indicates the starting point
             *     of the output event stream, or null to indicate that the output event stream will start whenever the
             *     streaming job is started. This property must have a value if outputStartMode is set to CustomTime.
             * @return the next definition stage.
             */
            WithCreate withOutputStartTime(OffsetDateTime outputStartTime);
        }
        /** The stage of the StreamingJob definition allowing to specify eventsOutOfOrderPolicy. */
        interface WithEventsOutOfOrderPolicy {
            /**
             * Specifies the eventsOutOfOrderPolicy property: Indicates the policy to apply to events that arrive out of
             * order in the input event stream..
             *
             * @param eventsOutOfOrderPolicy Indicates the policy to apply to events that arrive out of order in the
             *     input event stream.
             * @return the next definition stage.
             */
            WithCreate withEventsOutOfOrderPolicy(EventsOutOfOrderPolicy eventsOutOfOrderPolicy);
        }
        /** The stage of the StreamingJob definition allowing to specify outputErrorPolicy. */
        interface WithOutputErrorPolicy {
            /**
             * Specifies the outputErrorPolicy property: Indicates the policy to apply to events that arrive at the
             * output and cannot be written to the external storage due to being malformed (missing column values,
             * column values of wrong type or size)..
             *
             * @param outputErrorPolicy Indicates the policy to apply to events that arrive at the output and cannot be
             *     written to the external storage due to being malformed (missing column values, column values of wrong
             *     type or size).
             * @return the next definition stage.
             */
            WithCreate withOutputErrorPolicy(OutputErrorPolicy outputErrorPolicy);
        }
        /** The stage of the StreamingJob definition allowing to specify eventsOutOfOrderMaxDelayInSeconds. */
        interface WithEventsOutOfOrderMaxDelayInSeconds {
            /**
             * Specifies the eventsOutOfOrderMaxDelayInSeconds property: The maximum tolerable delay in seconds where
             * out-of-order events can be adjusted to be back in order..
             *
             * @param eventsOutOfOrderMaxDelayInSeconds The maximum tolerable delay in seconds where out-of-order events
             *     can be adjusted to be back in order.
             * @return the next definition stage.
             */
            WithCreate withEventsOutOfOrderMaxDelayInSeconds(Integer eventsOutOfOrderMaxDelayInSeconds);
        }
        /** The stage of the StreamingJob definition allowing to specify eventsLateArrivalMaxDelayInSeconds. */
        interface WithEventsLateArrivalMaxDelayInSeconds {
            /**
             * Specifies the eventsLateArrivalMaxDelayInSeconds property: The maximum tolerable delay in seconds where
             * events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is
             * used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1..
             *
             * @param eventsLateArrivalMaxDelayInSeconds The maximum tolerable delay in seconds where events arriving
             *     late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify
             *     wait indefinitely. If the property is absent, it is interpreted to have a value of -1.
             * @return the next definition stage.
             */
            WithCreate withEventsLateArrivalMaxDelayInSeconds(Integer eventsLateArrivalMaxDelayInSeconds);
        }
        /** The stage of the StreamingJob definition allowing to specify dataLocale. */
        interface WithDataLocale {
            /**
             * Specifies the dataLocale property: The data locale of the stream analytics job. Value should be the name
             * of a supported .NET Culture from the set
             * https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to
             * 'en-US' if none specified..
             *
             * @param dataLocale The data locale of the stream analytics job. Value should be the name of a supported
             *     .NET Culture from the set
             *     https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults
             *     to 'en-US' if none specified.
             * @return the next definition stage.
             */
            WithCreate withDataLocale(String dataLocale);
        }
        /** The stage of the StreamingJob definition allowing to specify compatibilityLevel. */
        interface WithCompatibilityLevel {
            /**
             * Specifies the compatibilityLevel property: Controls certain runtime behaviors of the streaming job..
             *
             * @param compatibilityLevel Controls certain runtime behaviors of the streaming job.
             * @return the next definition stage.
             */
            WithCreate withCompatibilityLevel(CompatibilityLevel compatibilityLevel);
        }
        /** The stage of the StreamingJob definition allowing to specify inputs. */
        interface WithInputs {
            /**
             * Specifies the inputs property: A list of one or more inputs to the streaming job. The name property for
             * each input is required when specifying this property in a PUT request. This property cannot be modify via
             * a PATCH operation. You must use the PATCH API available for the individual input..
             *
             * @param inputs A list of one or more inputs to the streaming job. The name property for each input is
             *     required when specifying this property in a PUT request. This property cannot be modify via a PATCH
             *     operation. You must use the PATCH API available for the individual input.
             * @return the next definition stage.
             */
            WithCreate withInputs(List<InputInner> inputs);
        }
        /** The stage of the StreamingJob definition allowing to specify transformation. */
        interface WithTransformation {
            /**
             * Specifies the transformation property: Indicates the query and the number of streaming units to use for
             * the streaming job. The name property of the transformation is required when specifying this property in a
             * PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available
             * for the individual transformation..
             *
             * @param transformation Indicates the query and the number of streaming units to use for the streaming job.
             *     The name property of the transformation is required when specifying this property in a PUT request.
             *     This property cannot be modify via a PATCH operation. You must use the PATCH API available for the
             *     individual transformation.
             * @return the next definition stage.
             */
            WithCreate withTransformation(TransformationInner transformation);
        }
        /** The stage of the StreamingJob definition allowing to specify outputs. */
        interface WithOutputs {
            /**
             * Specifies the outputs property: A list of one or more outputs for the streaming job. The name property
             * for each output is required when specifying this property in a PUT request. This property cannot be
             * modify via a PATCH operation. You must use the PATCH API available for the individual output..
             *
             * @param outputs A list of one or more outputs for the streaming job. The name property for each output is
             *     required when specifying this property in a PUT request. This property cannot be modify via a PATCH
             *     operation. You must use the PATCH API available for the individual output.
             * @return the next definition stage.
             */
            WithCreate withOutputs(List<OutputInner> outputs);
        }
        /** The stage of the StreamingJob definition allowing to specify functions. */
        interface WithFunctions {
            /**
             * Specifies the functions property: A list of one or more functions for the streaming job. The name
             * property for each function is required when specifying this property in a PUT request. This property
             * cannot be modify via a PATCH operation. You must use the PATCH API available for the individual
             * transformation..
             *
             * @param functions A list of one or more functions for the streaming job. The name property for each
             *     function is required when specifying this property in a PUT request. This property cannot be modify
             *     via a PATCH operation. You must use the PATCH API available for the individual transformation.
             * @return the next definition stage.
             */
            WithCreate withFunctions(List<FunctionInner> functions);
        }
        /** The stage of the StreamingJob definition allowing to specify jobStorageAccount. */
        interface WithJobStorageAccount {
            /**
             * Specifies the jobStorageAccount property: The properties that are associated with an Azure Storage
             * account with MSI.
             *
             * @param jobStorageAccount The properties that are associated with an Azure Storage account with MSI.
             * @return the next definition stage.
             */
            WithCreate withJobStorageAccount(JobStorageAccount jobStorageAccount);
        }
        /** The stage of the StreamingJob definition allowing to specify contentStoragePolicy. */
        interface WithContentStoragePolicy {
            /**
             * Specifies the contentStoragePolicy property: Valid values are JobStorageAccount and SystemAccount. If set
             * to JobStorageAccount, this requires the user to also specify jobStorageAccount property. ..
             *
             * @param contentStoragePolicy Valid values are JobStorageAccount and SystemAccount. If set to
             *     JobStorageAccount, this requires the user to also specify jobStorageAccount property. .
             * @return the next definition stage.
             */
            WithCreate withContentStoragePolicy(ContentStoragePolicy contentStoragePolicy);
        }
        /** The stage of the StreamingJob definition allowing to specify cluster. */
        interface WithCluster {
            /**
             * Specifies the cluster property: The cluster which streaming jobs will run on..
             *
             * @param cluster The cluster which streaming jobs will run on.
             * @return the next definition stage.
             */
            WithCreate withCluster(ClusterInfo cluster);
        }
        /** The stage of the StreamingJob definition allowing to specify ifMatch. */
        interface WithIfMatch {
            /**
             * Specifies the ifMatch property: The ETag of the streaming job. Omit this value to always overwrite the
             * current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent
             * changes..
             *
             * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set.
             *     Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
             * @return the next definition stage.
             */
            WithCreate withIfMatch(String ifMatch);
        }
        /** The stage of the StreamingJob definition allowing to specify ifNoneMatch. */
        interface WithIfNoneMatch {
            /**
             * Specifies the ifNoneMatch property: Set to '*' to allow a new streaming job to be created, but to prevent
             * updating an existing record set. Other values will result in a 412 Pre-condition Failed response..
             *
             * @param ifNoneMatch Set to '*' to allow a new streaming job to be created, but to prevent updating an
             *     existing record set. Other values will result in a 412 Pre-condition Failed response.
             * @return the next definition stage.
             */
            WithCreate withIfNoneMatch(String ifNoneMatch);
        }
    }
    /**
     * Begins update for the StreamingJob resource.
     *
     * @return the stage of resource update.
     */
    StreamingJob.Update update();

    /** The template for StreamingJob update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithIdentity,
            UpdateStages.WithSku,
            UpdateStages.WithJobType,
            UpdateStages.WithOutputStartMode,
            UpdateStages.WithOutputStartTime,
            UpdateStages.WithEventsOutOfOrderPolicy,
            UpdateStages.WithOutputErrorPolicy,
            UpdateStages.WithEventsOutOfOrderMaxDelayInSeconds,
            UpdateStages.WithEventsLateArrivalMaxDelayInSeconds,
            UpdateStages.WithDataLocale,
            UpdateStages.WithCompatibilityLevel,
            UpdateStages.WithInputs,
            UpdateStages.WithTransformation,
            UpdateStages.WithOutputs,
            UpdateStages.WithFunctions,
            UpdateStages.WithJobStorageAccount,
            UpdateStages.WithContentStoragePolicy,
            UpdateStages.WithCluster,
            UpdateStages.WithIfMatch {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        StreamingJob apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        StreamingJob apply(Context context);
    }
    /** The StreamingJob update stages. */
    interface UpdateStages {
        /** The stage of the StreamingJob update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the StreamingJob update allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: Describes the system-assigned managed identity assigned to this job that
             * can be used to authenticate with inputs and outputs..
             *
             * @param identity Describes the system-assigned managed identity assigned to this job that can be used to
             *     authenticate with inputs and outputs.
             * @return the next definition stage.
             */
            Update withIdentity(Identity identity);
        }
        /** The stage of the StreamingJob update allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: Describes the SKU of the streaming job. Required on PUT (CreateOrReplace)
             * requests..
             *
             * @param sku Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests.
             * @return the next definition stage.
             */
            Update withSku(Sku sku);
        }
        /** The stage of the StreamingJob update allowing to specify jobType. */
        interface WithJobType {
            /**
             * Specifies the jobType property: Describes the type of the job. Valid modes are `Cloud` and 'Edge'..
             *
             * @param jobType Describes the type of the job. Valid modes are `Cloud` and 'Edge'.
             * @return the next definition stage.
             */
            Update withJobType(JobType jobType);
        }
        /** The stage of the StreamingJob update allowing to specify outputStartMode. */
        interface WithOutputStartMode {
            /**
             * Specifies the outputStartMode property: This property should only be utilized when it is desired that the
             * job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime
             * to indicate whether the starting point of the output event stream should start whenever the job is
             * started, start at a custom user time stamp specified via the outputStartTime property, or start from the
             * last event output time..
             *
             * @param outputStartMode This property should only be utilized when it is desired that the job be started
             *     immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate
             *     whether the starting point of the output event stream should start whenever the job is started, start
             *     at a custom user time stamp specified via the outputStartTime property, or start from the last event
             *     output time.
             * @return the next definition stage.
             */
            Update withOutputStartMode(OutputStartMode outputStartMode);
        }
        /** The stage of the StreamingJob update allowing to specify outputStartTime. */
        interface WithOutputStartTime {
            /**
             * Specifies the outputStartTime property: Value is either an ISO-8601 formatted time stamp that indicates
             * the starting point of the output event stream, or null to indicate that the output event stream will
             * start whenever the streaming job is started. This property must have a value if outputStartMode is set to
             * CustomTime..
             *
             * @param outputStartTime Value is either an ISO-8601 formatted time stamp that indicates the starting point
             *     of the output event stream, or null to indicate that the output event stream will start whenever the
             *     streaming job is started. This property must have a value if outputStartMode is set to CustomTime.
             * @return the next definition stage.
             */
            Update withOutputStartTime(OffsetDateTime outputStartTime);
        }
        /** The stage of the StreamingJob update allowing to specify eventsOutOfOrderPolicy. */
        interface WithEventsOutOfOrderPolicy {
            /**
             * Specifies the eventsOutOfOrderPolicy property: Indicates the policy to apply to events that arrive out of
             * order in the input event stream..
             *
             * @param eventsOutOfOrderPolicy Indicates the policy to apply to events that arrive out of order in the
             *     input event stream.
             * @return the next definition stage.
             */
            Update withEventsOutOfOrderPolicy(EventsOutOfOrderPolicy eventsOutOfOrderPolicy);
        }
        /** The stage of the StreamingJob update allowing to specify outputErrorPolicy. */
        interface WithOutputErrorPolicy {
            /**
             * Specifies the outputErrorPolicy property: Indicates the policy to apply to events that arrive at the
             * output and cannot be written to the external storage due to being malformed (missing column values,
             * column values of wrong type or size)..
             *
             * @param outputErrorPolicy Indicates the policy to apply to events that arrive at the output and cannot be
             *     written to the external storage due to being malformed (missing column values, column values of wrong
             *     type or size).
             * @return the next definition stage.
             */
            Update withOutputErrorPolicy(OutputErrorPolicy outputErrorPolicy);
        }
        /** The stage of the StreamingJob update allowing to specify eventsOutOfOrderMaxDelayInSeconds. */
        interface WithEventsOutOfOrderMaxDelayInSeconds {
            /**
             * Specifies the eventsOutOfOrderMaxDelayInSeconds property: The maximum tolerable delay in seconds where
             * out-of-order events can be adjusted to be back in order..
             *
             * @param eventsOutOfOrderMaxDelayInSeconds The maximum tolerable delay in seconds where out-of-order events
             *     can be adjusted to be back in order.
             * @return the next definition stage.
             */
            Update withEventsOutOfOrderMaxDelayInSeconds(Integer eventsOutOfOrderMaxDelayInSeconds);
        }
        /** The stage of the StreamingJob update allowing to specify eventsLateArrivalMaxDelayInSeconds. */
        interface WithEventsLateArrivalMaxDelayInSeconds {
            /**
             * Specifies the eventsLateArrivalMaxDelayInSeconds property: The maximum tolerable delay in seconds where
             * events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is
             * used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1..
             *
             * @param eventsLateArrivalMaxDelayInSeconds The maximum tolerable delay in seconds where events arriving
             *     late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify
             *     wait indefinitely. If the property is absent, it is interpreted to have a value of -1.
             * @return the next definition stage.
             */
            Update withEventsLateArrivalMaxDelayInSeconds(Integer eventsLateArrivalMaxDelayInSeconds);
        }
        /** The stage of the StreamingJob update allowing to specify dataLocale. */
        interface WithDataLocale {
            /**
             * Specifies the dataLocale property: The data locale of the stream analytics job. Value should be the name
             * of a supported .NET Culture from the set
             * https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to
             * 'en-US' if none specified..
             *
             * @param dataLocale The data locale of the stream analytics job. Value should be the name of a supported
             *     .NET Culture from the set
             *     https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults
             *     to 'en-US' if none specified.
             * @return the next definition stage.
             */
            Update withDataLocale(String dataLocale);
        }
        /** The stage of the StreamingJob update allowing to specify compatibilityLevel. */
        interface WithCompatibilityLevel {
            /**
             * Specifies the compatibilityLevel property: Controls certain runtime behaviors of the streaming job..
             *
             * @param compatibilityLevel Controls certain runtime behaviors of the streaming job.
             * @return the next definition stage.
             */
            Update withCompatibilityLevel(CompatibilityLevel compatibilityLevel);
        }
        /** The stage of the StreamingJob update allowing to specify inputs. */
        interface WithInputs {
            /**
             * Specifies the inputs property: A list of one or more inputs to the streaming job. The name property for
             * each input is required when specifying this property in a PUT request. This property cannot be modify via
             * a PATCH operation. You must use the PATCH API available for the individual input..
             *
             * @param inputs A list of one or more inputs to the streaming job. The name property for each input is
             *     required when specifying this property in a PUT request. This property cannot be modify via a PATCH
             *     operation. You must use the PATCH API available for the individual input.
             * @return the next definition stage.
             */
            Update withInputs(List<InputInner> inputs);
        }
        /** The stage of the StreamingJob update allowing to specify transformation. */
        interface WithTransformation {
            /**
             * Specifies the transformation property: Indicates the query and the number of streaming units to use for
             * the streaming job. The name property of the transformation is required when specifying this property in a
             * PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available
             * for the individual transformation..
             *
             * @param transformation Indicates the query and the number of streaming units to use for the streaming job.
             *     The name property of the transformation is required when specifying this property in a PUT request.
             *     This property cannot be modify via a PATCH operation. You must use the PATCH API available for the
             *     individual transformation.
             * @return the next definition stage.
             */
            Update withTransformation(TransformationInner transformation);
        }
        /** The stage of the StreamingJob update allowing to specify outputs. */
        interface WithOutputs {
            /**
             * Specifies the outputs property: A list of one or more outputs for the streaming job. The name property
             * for each output is required when specifying this property in a PUT request. This property cannot be
             * modify via a PATCH operation. You must use the PATCH API available for the individual output..
             *
             * @param outputs A list of one or more outputs for the streaming job. The name property for each output is
             *     required when specifying this property in a PUT request. This property cannot be modify via a PATCH
             *     operation. You must use the PATCH API available for the individual output.
             * @return the next definition stage.
             */
            Update withOutputs(List<OutputInner> outputs);
        }
        /** The stage of the StreamingJob update allowing to specify functions. */
        interface WithFunctions {
            /**
             * Specifies the functions property: A list of one or more functions for the streaming job. The name
             * property for each function is required when specifying this property in a PUT request. This property
             * cannot be modify via a PATCH operation. You must use the PATCH API available for the individual
             * transformation..
             *
             * @param functions A list of one or more functions for the streaming job. The name property for each
             *     function is required when specifying this property in a PUT request. This property cannot be modify
             *     via a PATCH operation. You must use the PATCH API available for the individual transformation.
             * @return the next definition stage.
             */
            Update withFunctions(List<FunctionInner> functions);
        }
        /** The stage of the StreamingJob update allowing to specify jobStorageAccount. */
        interface WithJobStorageAccount {
            /**
             * Specifies the jobStorageAccount property: The properties that are associated with an Azure Storage
             * account with MSI.
             *
             * @param jobStorageAccount The properties that are associated with an Azure Storage account with MSI.
             * @return the next definition stage.
             */
            Update withJobStorageAccount(JobStorageAccount jobStorageAccount);
        }
        /** The stage of the StreamingJob update allowing to specify contentStoragePolicy. */
        interface WithContentStoragePolicy {
            /**
             * Specifies the contentStoragePolicy property: Valid values are JobStorageAccount and SystemAccount. If set
             * to JobStorageAccount, this requires the user to also specify jobStorageAccount property. ..
             *
             * @param contentStoragePolicy Valid values are JobStorageAccount and SystemAccount. If set to
             *     JobStorageAccount, this requires the user to also specify jobStorageAccount property. .
             * @return the next definition stage.
             */
            Update withContentStoragePolicy(ContentStoragePolicy contentStoragePolicy);
        }
        /** The stage of the StreamingJob update allowing to specify cluster. */
        interface WithCluster {
            /**
             * Specifies the cluster property: The cluster which streaming jobs will run on..
             *
             * @param cluster The cluster which streaming jobs will run on.
             * @return the next definition stage.
             */
            Update withCluster(ClusterInfo cluster);
        }
        /** The stage of the StreamingJob update allowing to specify ifMatch. */
        interface WithIfMatch {
            /**
             * Specifies the ifMatch property: The ETag of the streaming job. Omit this value to always overwrite the
             * current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent
             * changes..
             *
             * @param ifMatch The ETag of the streaming job. Omit this value to always overwrite the current record set.
             *     Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.
             * @return the next definition stage.
             */
            Update withIfMatch(String ifMatch);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    StreamingJob refresh();

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

    /**
     * Starts a streaming job. Once a job is started it will start processing input events and produce output.
     *
     * @param startJobParameters Parameters applicable to a start streaming job 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.
     */
    void start(StartStreamingJobParameters startJobParameters);

    /**
     * Starts a streaming job. Once a job is started it will start processing input events and produce output.
     *
     * @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 start();

    /**
     * Starts a streaming job. Once a job is started it will start processing input events and produce output.
     *
     * @param startJobParameters Parameters applicable to a start streaming job operation.
     * @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.
     */
    void start(StartStreamingJobParameters startJobParameters, Context context);

    /**
     * Stops a running streaming job. This will cause a running streaming job to stop processing input events and
     * producing output.
     *
     * @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 stop();

    /**
     * Stops a running streaming job. This will cause a running streaming job to stop processing input events and
     * producing output.
     *
     * @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.
     */
    void stop(Context context);

    /**
     * Scales a streaming job when the job is running.
     *
     * @param scaleJobParameters Parameters applicable to a scale streaming job 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.
     */
    void scale(ScaleStreamingJobParameters scaleJobParameters);

    /**
     * Scales a streaming job when the job is running.
     *
     * @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 scale();

    /**
     * Scales a streaming job when the job is running.
     *
     * @param scaleJobParameters Parameters applicable to a scale streaming job operation.
     * @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.
     */
    void scale(ScaleStreamingJobParameters scaleJobParameters, Context context);
}
