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

package com.azure.resourcemanager.datamigration.models;

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

/** Properties for task that validates migration input for SQL to Azure SQL Database Managed Instance sync scenario. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType")
@JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS")
@Fluent
public final class ValidateMigrationInputSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties {
    /*
     * Task input
     */
    @JsonProperty(value = "input")
    private ValidateMigrationInputSqlServerSqlMISyncTaskInput input;

    /*
     * Task output. This is ignored if submitted.
     */
    @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY)
    private List<ValidateMigrationInputSqlServerSqlMISyncTaskOutput> output;

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

    /**
     * Get the input property: Task input.
     *
     * @return the input value.
     */
    public ValidateMigrationInputSqlServerSqlMISyncTaskInput input() {
        return this.input;
    }

    /**
     * Set the input property: Task input.
     *
     * @param input the input value to set.
     * @return the ValidateMigrationInputSqlServerSqlMISyncTaskProperties object itself.
     */
    public ValidateMigrationInputSqlServerSqlMISyncTaskProperties withInput(
        ValidateMigrationInputSqlServerSqlMISyncTaskInput input) {
        this.input = input;
        return this;
    }

    /**
     * Get the output property: Task output. This is ignored if submitted.
     *
     * @return the output value.
     */
    public List<ValidateMigrationInputSqlServerSqlMISyncTaskOutput> output() {
        return this.output;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (input() != null) {
            input().validate();
        }
        if (output() != null) {
            output().forEach(e -> e.validate());
        }
    }
}
