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

package com.azure.resourcemanager.machinelearning.models;

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

/** The CustomTargetLags model. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode")
@JsonTypeName("Custom")
@Fluent
public final class CustomTargetLags extends TargetLags {
    /*
     * [Required] Set target lags values.
     */
    @JsonProperty(value = "values", required = true)
    private List<Integer> values;

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

    /**
     * Get the values property: [Required] Set target lags values.
     *
     * @return the values value.
     */
    public List<Integer> values() {
        return this.values;
    }

    /**
     * Set the values property: [Required] Set target lags values.
     *
     * @param values the values value to set.
     * @return the CustomTargetLags object itself.
     */
    public CustomTargetLags withValues(List<Integer> values) {
        this.values = values;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (values() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property values in model CustomTargetLags"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(CustomTargetLags.class);
}
