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

namespace Google\Cloud\Billing\V1;

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

/**
 * Request message for `UpdateBillingAccount`.
 *
 * Generated from protobuf message <code>google.cloud.billing.v1.UpdateBillingAccountRequest</code>
 */
class UpdateBillingAccountRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the billing account resource to be updated.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * Required. The billing account resource to replace the resource on the server.
     *
     * Generated from protobuf field <code>.google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $account = null;
    /**
     * The update mask applied to the resource.
     * Only "display_name" is currently supported.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The name of the billing account resource to be updated.
     *     @type \Google\Cloud\Billing\V1\BillingAccount $account
     *           Required. The billing account resource to replace the resource on the server.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           The update mask applied to the resource.
     *           Only "display_name" is currently supported.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Billing\V1\CloudBilling::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the billing account resource to be updated.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The name of the billing account resource to be updated.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The billing account resource to replace the resource on the server.
     *
     * Generated from protobuf field <code>.google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Billing\V1\BillingAccount|null
     */
    public function getAccount()
    {
        return isset($this->account) ? $this->account : null;
    }

    public function hasAccount()
    {
        return isset($this->account);
    }

    public function clearAccount()
    {
        unset($this->account);
    }

    /**
     * Required. The billing account resource to replace the resource on the server.
     *
     * Generated from protobuf field <code>.google.cloud.billing.v1.BillingAccount account = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Billing\V1\BillingAccount $var
     * @return $this
     */
    public function setAccount($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Billing\V1\BillingAccount::class);
        $this->account = $var;

        return $this;
    }

    /**
     * The update mask applied to the resource.
     * Only "display_name" is currently supported.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return isset($this->update_mask) ? $this->update_mask : null;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * The update mask applied to the resource.
     * Only "display_name" is currently supported.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

