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

namespace Google\Cloud\Channel\V1;

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

/**
 * Represents a billing account that can be used to make a purchase.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.BillingAccountPurchaseInfo</code>
 */
class BillingAccountPurchaseInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The billing account resource.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.BillingAccount billing_account = 1;</code>
     */
    protected $billing_account = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Channel\V1\BillingAccount $billing_account
     *           The billing account resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The billing account resource.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.BillingAccount billing_account = 1;</code>
     * @return \Google\Cloud\Channel\V1\BillingAccount|null
     */
    public function getBillingAccount()
    {
        return $this->billing_account;
    }

    public function hasBillingAccount()
    {
        return isset($this->billing_account);
    }

    public function clearBillingAccount()
    {
        unset($this->billing_account);
    }

    /**
     * The billing account resource.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.BillingAccount billing_account = 1;</code>
     * @param \Google\Cloud\Channel\V1\BillingAccount $var
     * @return $this
     */
    public function setBillingAccount($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\BillingAccount::class);
        $this->billing_account = $var;

        return $this;
    }

}

