<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/channel/v1/repricing.proto

namespace Google\Cloud\Channel\V1;

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

/**
 * Represents the various repricing conditions you can use for a conditional
 * override.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.RepricingCondition</code>
 */
class RepricingCondition extends \Google\Protobuf\Internal\Message
{
    protected $condition;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Channel\V1\SkuGroupCondition $sku_group_condition
     *           SKU Group condition for override.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Repricing::initOnce();
        parent::__construct($data);
    }

    /**
     * SKU Group condition for override.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.SkuGroupCondition sku_group_condition = 1;</code>
     * @return \Google\Cloud\Channel\V1\SkuGroupCondition|null
     */
    public function getSkuGroupCondition()
    {
        return $this->readOneof(1);
    }

    public function hasSkuGroupCondition()
    {
        return $this->hasOneof(1);
    }

    /**
     * SKU Group condition for override.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.SkuGroupCondition sku_group_condition = 1;</code>
     * @param \Google\Cloud\Channel\V1\SkuGroupCondition $var
     * @return $this
     */
    public function setSkuGroupCondition($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\SkuGroupCondition::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getCondition()
    {
        return $this->whichOneof("condition");
    }

}

