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

package com.azure.analytics.synapse.artifacts.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** This activity verifies that an external resource exists. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("Validation")
@JsonFlatten
@Fluent
public class ValidationActivity extends ControlActivity {
    /*
     * Specifies the timeout for the activity to run. If there is no value specified, it takes the value of
     * TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern:
     * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
     */
    @JsonProperty(value = "typeProperties.timeout")
    private Object timeout;

    /*
     * A delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the
     * default. Type: integer (or Expression with resultType integer).
     */
    @JsonProperty(value = "typeProperties.sleep")
    private Object sleep;

    /*
     * Can be used if dataset points to a file. The file must be greater than or equal in size to the value specified.
     * Type: integer (or Expression with resultType integer).
     */
    @JsonProperty(value = "typeProperties.minimumSize")
    private Object minimumSize;

    /*
     * Can be used if dataset points to a folder. If set to true, the folder must have at least one file. If set to
     * false, the folder must be empty. Type: boolean (or Expression with resultType boolean).
     */
    @JsonProperty(value = "typeProperties.childItems")
    private Object childItems;

    /*
     * Validation activity dataset reference.
     */
    @JsonProperty(value = "typeProperties.dataset", required = true)
    private DatasetReference dataset;

    /** Creates an instance of ValidationActivity class. */
    public ValidationActivity() {}

    /**
     * Get the timeout property: Specifies the timeout for the activity to run. If there is no value specified, it takes
     * the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType
     * string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
     *
     * @return the timeout value.
     */
    public Object getTimeout() {
        return this.timeout;
    }

    /**
     * Set the timeout property: Specifies the timeout for the activity to run. If there is no value specified, it takes
     * the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType
     * string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
     *
     * @param timeout the timeout value to set.
     * @return the ValidationActivity object itself.
     */
    public ValidationActivity setTimeout(Object timeout) {
        this.timeout = timeout;
        return this;
    }

    /**
     * Get the sleep property: A delay in seconds between validation attempts. If no value is specified, 10 seconds will
     * be used as the default. Type: integer (or Expression with resultType integer).
     *
     * @return the sleep value.
     */
    public Object getSleep() {
        return this.sleep;
    }

    /**
     * Set the sleep property: A delay in seconds between validation attempts. If no value is specified, 10 seconds will
     * be used as the default. Type: integer (or Expression with resultType integer).
     *
     * @param sleep the sleep value to set.
     * @return the ValidationActivity object itself.
     */
    public ValidationActivity setSleep(Object sleep) {
        this.sleep = sleep;
        return this;
    }

    /**
     * Get the minimumSize property: Can be used if dataset points to a file. The file must be greater than or equal in
     * size to the value specified. Type: integer (or Expression with resultType integer).
     *
     * @return the minimumSize value.
     */
    public Object getMinimumSize() {
        return this.minimumSize;
    }

    /**
     * Set the minimumSize property: Can be used if dataset points to a file. The file must be greater than or equal in
     * size to the value specified. Type: integer (or Expression with resultType integer).
     *
     * @param minimumSize the minimumSize value to set.
     * @return the ValidationActivity object itself.
     */
    public ValidationActivity setMinimumSize(Object minimumSize) {
        this.minimumSize = minimumSize;
        return this;
    }

    /**
     * Get the childItems property: Can be used if dataset points to a folder. If set to true, the folder must have at
     * least one file. If set to false, the folder must be empty. Type: boolean (or Expression with resultType boolean).
     *
     * @return the childItems value.
     */
    public Object getChildItems() {
        return this.childItems;
    }

    /**
     * Set the childItems property: Can be used if dataset points to a folder. If set to true, the folder must have at
     * least one file. If set to false, the folder must be empty. Type: boolean (or Expression with resultType boolean).
     *
     * @param childItems the childItems value to set.
     * @return the ValidationActivity object itself.
     */
    public ValidationActivity setChildItems(Object childItems) {
        this.childItems = childItems;
        return this;
    }

    /**
     * Get the dataset property: Validation activity dataset reference.
     *
     * @return the dataset value.
     */
    public DatasetReference getDataset() {
        return this.dataset;
    }

    /**
     * Set the dataset property: Validation activity dataset reference.
     *
     * @param dataset the dataset value to set.
     * @return the ValidationActivity object itself.
     */
    public ValidationActivity setDataset(DatasetReference dataset) {
        this.dataset = dataset;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ValidationActivity setName(String name) {
        super.setName(name);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ValidationActivity setDescription(String description) {
        super.setDescription(description);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ValidationActivity setDependsOn(List<ActivityDependency> dependsOn) {
        super.setDependsOn(dependsOn);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ValidationActivity setUserProperties(List<UserProperty> userProperties) {
        super.setUserProperties(userProperties);
        return this;
    }
}
