// 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.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** TensorFlow distribution configuration. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType")
@JsonTypeName("TensorFlow")
@Fluent
public final class TensorFlow extends DistributionConfiguration {
    /*
     * Number of parameter server tasks.
     */
    @JsonProperty(value = "parameterServerCount")
    private Integer parameterServerCount;

    /*
     * Number of workers. If not specified, will default to the instance count.
     */
    @JsonProperty(value = "workerCount")
    private Integer workerCount;

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

    /**
     * Get the parameterServerCount property: Number of parameter server tasks.
     *
     * @return the parameterServerCount value.
     */
    public Integer parameterServerCount() {
        return this.parameterServerCount;
    }

    /**
     * Set the parameterServerCount property: Number of parameter server tasks.
     *
     * @param parameterServerCount the parameterServerCount value to set.
     * @return the TensorFlow object itself.
     */
    public TensorFlow withParameterServerCount(Integer parameterServerCount) {
        this.parameterServerCount = parameterServerCount;
        return this;
    }

    /**
     * Get the workerCount property: Number of workers. If not specified, will default to the instance count.
     *
     * @return the workerCount value.
     */
    public Integer workerCount() {
        return this.workerCount;
    }

    /**
     * Set the workerCount property: Number of workers. If not specified, will default to the instance count.
     *
     * @param workerCount the workerCount value to set.
     * @return the TensorFlow object itself.
     */
    public TensorFlow withWorkerCount(Integer workerCount) {
        this.workerCount = workerCount;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
