<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/ad_break_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 `UpdateAdBreak` method.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.UpdateAdBreakRequest</code>
 */
class UpdateAdBreakRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The `AdBreak` to update.
     * The `AdBreak`'s `name` is used to identify the `AdBreak` to update.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.AdBreak ad_break = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $ad_break = 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\AdBreak $adBreak    Required. The `AdBreak` to update.
     *
     *                                                     The `AdBreak`'s `name` is used to identify the `AdBreak` to update.
     * @param \Google\Protobuf\FieldMask       $updateMask Required. The list of fields to update.
     *
     * @return \Google\Ads\AdManager\V1\UpdateAdBreakRequest
     *
     * @experimental
     */
    public static function build(\Google\Ads\AdManager\V1\AdBreak $adBreak, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setAdBreak($adBreak)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\AdManager\V1\AdBreak $ad_break
     *           Required. The `AdBreak` to update.
     *           The `AdBreak`'s `name` is used to identify the `AdBreak` 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\AdBreakService::initOnce();
        parent::__construct($data);
    }

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

    public function hasAdBreak()
    {
        return isset($this->ad_break);
    }

    public function clearAdBreak()
    {
        unset($this->ad_break);
    }

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

}

