<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/talent/v4beta1/filters.proto

namespace Google\Cloud\Talent\V4beta1;

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

/**
 * Filter on availability signals.
 *
 * Generated from protobuf message <code>google.cloud.talent.v4beta1.AvailabilityFilter</code>
 */
class AvailabilityFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Type of signal to apply filter on.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.AvailabilitySignalType signal_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $signal_type = 0;
    /**
     * Required. Range of times to filter candidate signals by.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.TimestampRange range = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $range = null;
    /**
     * If multiple [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] are provided, the default
     * behavior is to OR all filters, but if this field is set to true, this
     * particular [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] will be AND'ed against other
     * [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter].
     *
     * Generated from protobuf field <code>bool required = 3;</code>
     */
    private $required = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $signal_type
     *           Required. Type of signal to apply filter on.
     *     @type \Google\Cloud\Talent\V4beta1\TimestampRange $range
     *           Required. Range of times to filter candidate signals by.
     *     @type bool $required
     *           If multiple [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] are provided, the default
     *           behavior is to OR all filters, but if this field is set to true, this
     *           particular [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] will be AND'ed against other
     *           [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Talent\V4Beta1\Filters::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Type of signal to apply filter on.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.AvailabilitySignalType signal_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getSignalType()
    {
        return $this->signal_type;
    }

    /**
     * Required. Type of signal to apply filter on.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.AvailabilitySignalType signal_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setSignalType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\AvailabilitySignalType::class);
        $this->signal_type = $var;

        return $this;
    }

    /**
     * Required. Range of times to filter candidate signals by.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.TimestampRange range = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Talent\V4beta1\TimestampRange
     */
    public function getRange()
    {
        return $this->range;
    }

    /**
     * Required. Range of times to filter candidate signals by.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.TimestampRange range = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Talent\V4beta1\TimestampRange $var
     * @return $this
     */
    public function setRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\TimestampRange::class);
        $this->range = $var;

        return $this;
    }

    /**
     * If multiple [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] are provided, the default
     * behavior is to OR all filters, but if this field is set to true, this
     * particular [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] will be AND'ed against other
     * [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter].
     *
     * Generated from protobuf field <code>bool required = 3;</code>
     * @return bool
     */
    public function getRequired()
    {
        return $this->required;
    }

    /**
     * If multiple [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] are provided, the default
     * behavior is to OR all filters, but if this field is set to true, this
     * particular [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter] will be AND'ed against other
     * [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter].
     *
     * Generated from protobuf field <code>bool required = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setRequired($var)
    {
        GPBUtil::checkBool($var);
        $this->required = $var;

        return $this;
    }

}

