// 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;

/** PyTorch distribution configuration. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType")
@JsonTypeName("PyTorch")
@Fluent
public final class PyTorch extends DistributionConfiguration {
    /*
     * Number of processes per node.
     */
    @JsonProperty(value = "processCountPerInstance")
    private Integer processCountPerInstance;

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

    /**
     * Get the processCountPerInstance property: Number of processes per node.
     *
     * @return the processCountPerInstance value.
     */
    public Integer processCountPerInstance() {
        return this.processCountPerInstance;
    }

    /**
     * Set the processCountPerInstance property: Number of processes per node.
     *
     * @param processCountPerInstance the processCountPerInstance value to set.
     * @return the PyTorch object itself.
     */
    public PyTorch withProcessCountPerInstance(Integer processCountPerInstance) {
        this.processCountPerInstance = processCountPerInstance;
        return this;
    }

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