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

package com.azure.resourcemanager.appcontainers.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be
 * set to 1 by default.
 */
@Fluent
public final class JobConfigurationManualTriggerConfig {
    /*
     * Minimum number of successful replica completions before overall job completion.
     */
    @JsonProperty(value = "replicaCompletionCount")
    private Integer replicaCompletionCount;

    /*
     * Number of parallel replicas of a job that can run at a given time.
     */
    @JsonProperty(value = "parallelism")
    private Integer parallelism;

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

    /**
     * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job
     * completion.
     *
     * @return the replicaCompletionCount value.
     */
    public Integer replicaCompletionCount() {
        return this.replicaCompletionCount;
    }

    /**
     * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job
     * completion.
     *
     * @param replicaCompletionCount the replicaCompletionCount value to set.
     * @return the JobConfigurationManualTriggerConfig object itself.
     */
    public JobConfigurationManualTriggerConfig withReplicaCompletionCount(Integer replicaCompletionCount) {
        this.replicaCompletionCount = replicaCompletionCount;
        return this;
    }

    /**
     * Get the parallelism property: Number of parallel replicas of a job that can run at a given time.
     *
     * @return the parallelism value.
     */
    public Integer parallelism() {
        return this.parallelism;
    }

    /**
     * Set the parallelism property: Number of parallel replicas of a job that can run at a given time.
     *
     * @param parallelism the parallelism value to set.
     * @return the JobConfigurationManualTriggerConfig object itself.
     */
    public JobConfigurationManualTriggerConfig withParallelism(Integer parallelism) {
        this.parallelism = parallelism;
        return this;
    }

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