<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/site_service.proto

namespace Google\Ads\AdManager\V1;

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

/**
 * Request object for `UpdateSite` method.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.UpdateSiteRequest</code>
 */
class UpdateSiteRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The `Site` to update.
     * The `Site`'s `name` is used to identify the `Site` to update.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Site site = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $site = null;
    /**
     * Required. The list of fields to update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $update_mask = null;

    /**
     * @param \Google\Ads\AdManager\V1\Site $site       Required. The `Site` to update.
     *
     *                                                  The `Site`'s `name` is used to identify the `Site` to update.
     * @param \Google\Protobuf\FieldMask    $updateMask Required. The list of fields to update.
     *
     * @return \Google\Ads\AdManager\V1\UpdateSiteRequest
     *
     * @experimental
     */
    public static function build(\Google\Ads\AdManager\V1\Site $site, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setSite($site)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\AdManager\V1\Site $site
     *           Required. The `Site` to update.
     *           The `Site`'s `name` is used to identify the `Site` to update.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. The list of fields to update.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The `Site` to update.
     * The `Site`'s `name` is used to identify the `Site` to update.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Site site = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Ads\AdManager\V1\Site|null
     */
    public function getSite()
    {
        return $this->site;
    }

    public function hasSite()
    {
        return isset($this->site);
    }

    public function clearSite()
    {
        unset($this->site);
    }

    /**
     * Required. The `Site` to update.
     * The `Site`'s `name` is used to identify the `Site` to update.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Site site = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Ads\AdManager\V1\Site $var
     * @return $this
     */
    public function setSite($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Site::class);
        $this->site = $var;

        return $this;
    }

    /**
     * Required. The list of fields to update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

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

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

    /**
     * Required. The list of fields to update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</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;
    }

}

