<?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;

/**
 * Configuration for how a distributor will rebill a channel partner
 * (also known as a distributor-authorized reseller).
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.ChannelPartnerRepricingConfig</code>
 */
class ChannelPartnerRepricingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Resource name of the ChannelPartnerRepricingConfig.
     * Format:
     * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * Required. The configuration for bill modifications made by a reseller
     * before sending it to ChannelPartner.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.RepricingConfig repricing_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $repricing_config = null;
    /**
     * Output only. Timestamp of an update to the repricing rule. If `update_time`
     * is after
     * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
     * then it indicates this was set mid-month.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. Resource name of the ChannelPartnerRepricingConfig.
     *           Format:
     *           accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
     *     @type \Google\Cloud\Channel\V1\RepricingConfig $repricing_config
     *           Required. The configuration for bill modifications made by a reseller
     *           before sending it to ChannelPartner.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Timestamp of an update to the repricing rule. If `update_time`
     *           is after
     *           [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
     *           then it indicates this was set mid-month.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Repricing::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Resource name of the ChannelPartnerRepricingConfig.
     * Format:
     * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. Resource name of the ChannelPartnerRepricingConfig.
     * Format:
     * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The configuration for bill modifications made by a reseller
     * before sending it to ChannelPartner.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.RepricingConfig repricing_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Channel\V1\RepricingConfig|null
     */
    public function getRepricingConfig()
    {
        return $this->repricing_config;
    }

    public function hasRepricingConfig()
    {
        return isset($this->repricing_config);
    }

    public function clearRepricingConfig()
    {
        unset($this->repricing_config);
    }

    /**
     * Required. The configuration for bill modifications made by a reseller
     * before sending it to ChannelPartner.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.RepricingConfig repricing_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Channel\V1\RepricingConfig $var
     * @return $this
     */
    public function setRepricingConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\RepricingConfig::class);
        $this->repricing_config = $var;

        return $this;
    }

    /**
     * Output only. Timestamp of an update to the repricing rule. If `update_time`
     * is after
     * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
     * then it indicates this was set mid-month.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Timestamp of an update to the repricing rule. If `update_time`
     * is after
     * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
     * then it indicates this was set mid-month.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

