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

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

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

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

    /**
     * Set the processCountPerInstance property: Number of processes per MPI node.
     *
     * @param processCountPerInstance the processCountPerInstance value to set.
     * @return the Mpi object itself.
     */
    public Mpi 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();
    }
}
