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

namespace Google\Cloud\Talent\V4\CompensationInfo;

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

/**
 * Compensation range.
 *
 * Generated from protobuf message <code>google.cloud.talent.v4.CompensationInfo.CompensationRange</code>
 */
class CompensationRange extends \Google\Protobuf\Internal\Message
{
    /**
     * The maximum amount of compensation. If left empty, the value is set
     * to a maximal compensation value and the currency code is set to
     * match the [currency code][google.type.Money.currency_code] of
     * min_compensation.
     *
     * Generated from protobuf field <code>.google.type.Money max_compensation = 2;</code>
     */
    private $max_compensation = null;
    /**
     * The minimum amount of compensation. If left empty, the value is set
     * to zero and the currency code is set to match the
     * [currency code][google.type.Money.currency_code] of max_compensation.
     *
     * Generated from protobuf field <code>.google.type.Money min_compensation = 1;</code>
     */
    private $min_compensation = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Type\Money $max_compensation
     *           The maximum amount of compensation. If left empty, the value is set
     *           to a maximal compensation value and the currency code is set to
     *           match the [currency code][google.type.Money.currency_code] of
     *           min_compensation.
     *     @type \Google\Type\Money $min_compensation
     *           The minimum amount of compensation. If left empty, the value is set
     *           to zero and the currency code is set to match the
     *           [currency code][google.type.Money.currency_code] of max_compensation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * The maximum amount of compensation. If left empty, the value is set
     * to a maximal compensation value and the currency code is set to
     * match the [currency code][google.type.Money.currency_code] of
     * min_compensation.
     *
     * Generated from protobuf field <code>.google.type.Money max_compensation = 2;</code>
     * @return \Google\Type\Money|null
     */
    public function getMaxCompensation()
    {
        return $this->max_compensation;
    }

    public function hasMaxCompensation()
    {
        return isset($this->max_compensation);
    }

    public function clearMaxCompensation()
    {
        unset($this->max_compensation);
    }

    /**
     * The maximum amount of compensation. If left empty, the value is set
     * to a maximal compensation value and the currency code is set to
     * match the [currency code][google.type.Money.currency_code] of
     * min_compensation.
     *
     * Generated from protobuf field <code>.google.type.Money max_compensation = 2;</code>
     * @param \Google\Type\Money $var
     * @return $this
     */
    public function setMaxCompensation($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Money::class);
        $this->max_compensation = $var;

        return $this;
    }

    /**
     * The minimum amount of compensation. If left empty, the value is set
     * to zero and the currency code is set to match the
     * [currency code][google.type.Money.currency_code] of max_compensation.
     *
     * Generated from protobuf field <code>.google.type.Money min_compensation = 1;</code>
     * @return \Google\Type\Money|null
     */
    public function getMinCompensation()
    {
        return $this->min_compensation;
    }

    public function hasMinCompensation()
    {
        return isset($this->min_compensation);
    }

    public function clearMinCompensation()
    {
        unset($this->min_compensation);
    }

    /**
     * The minimum amount of compensation. If left empty, the value is set
     * to zero and the currency code is set to match the
     * [currency code][google.type.Money.currency_code] of max_compensation.
     *
     * Generated from protobuf field <code>.google.type.Money min_compensation = 1;</code>
     * @param \Google\Type\Money $var
     * @return $this
     */
    public function setMinCompensation($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Money::class);
        $this->min_compensation = $var;

        return $this;
    }

}


