<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/speech/v2/cloud_speech.proto

namespace Google\Cloud\Speech\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Configuration to enable speaker diarization.
 *
 * Generated from protobuf message <code>google.cloud.speech.v2.SpeakerDiarizationConfig</code>
 */
class SpeakerDiarizationConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Minimum number of speakers in the conversation. This range gives
     * you more flexibility by allowing the system to automatically determine the
     * correct number of speakers.
     * To fix the number of speakers detected in the audio, set
     * `min_speaker_count` = `max_speaker_count`.
     *
     * Generated from protobuf field <code>int32 min_speaker_count = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $min_speaker_count = 0;
    /**
     * Required. Maximum number of speakers in the conversation. Valid values are:
     * 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
     * by allowing the system to automatically determine the correct number of
     * speakers.
     *
     * Generated from protobuf field <code>int32 max_speaker_count = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $max_speaker_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $min_speaker_count
     *           Required. Minimum number of speakers in the conversation. This range gives
     *           you more flexibility by allowing the system to automatically determine the
     *           correct number of speakers.
     *           To fix the number of speakers detected in the audio, set
     *           `min_speaker_count` = `max_speaker_count`.
     *     @type int $max_speaker_count
     *           Required. Maximum number of speakers in the conversation. Valid values are:
     *           1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
     *           by allowing the system to automatically determine the correct number of
     *           speakers.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Minimum number of speakers in the conversation. This range gives
     * you more flexibility by allowing the system to automatically determine the
     * correct number of speakers.
     * To fix the number of speakers detected in the audio, set
     * `min_speaker_count` = `max_speaker_count`.
     *
     * Generated from protobuf field <code>int32 min_speaker_count = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getMinSpeakerCount()
    {
        return $this->min_speaker_count;
    }

    /**
     * Required. Minimum number of speakers in the conversation. This range gives
     * you more flexibility by allowing the system to automatically determine the
     * correct number of speakers.
     * To fix the number of speakers detected in the audio, set
     * `min_speaker_count` = `max_speaker_count`.
     *
     * Generated from protobuf field <code>int32 min_speaker_count = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setMinSpeakerCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->min_speaker_count = $var;

        return $this;
    }

    /**
     * Required. Maximum number of speakers in the conversation. Valid values are:
     * 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
     * by allowing the system to automatically determine the correct number of
     * speakers.
     *
     * Generated from protobuf field <code>int32 max_speaker_count = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getMaxSpeakerCount()
    {
        return $this->max_speaker_count;
    }

    /**
     * Required. Maximum number of speakers in the conversation. Valid values are:
     * 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
     * by allowing the system to automatically determine the correct number of
     * speakers.
     *
     * Generated from protobuf field <code>int32 max_speaker_count = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setMaxSpeakerCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_speaker_count = $var;

        return $this;
    }

}

