<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/private_auction_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 `CreatePrivateAuction` method.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.CreatePrivateAuctionRequest</code>
 */
class CreatePrivateAuctionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource where this `PrivateAuction` will be
     * created. Format: `networks/{network_code}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The `PrivateAuction` to create.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.PrivateAuction private_auction = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $private_auction = null;

    /**
     * @param string                                  $parent         Required. The parent resource where this `PrivateAuction` will be
     *                                                                created. Format: `networks/{network_code}`
     *                                                                Please see {@see PrivateAuctionServiceClient::networkName()} for help formatting this field.
     * @param \Google\Ads\AdManager\V1\PrivateAuction $privateAuction Required. The `PrivateAuction` to create.
     *
     * @return \Google\Ads\AdManager\V1\CreatePrivateAuctionRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Ads\AdManager\V1\PrivateAuction $privateAuction): self
    {
        return (new self())
            ->setParent($parent)
            ->setPrivateAuction($privateAuction);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource where this `PrivateAuction` will be
     *           created. Format: `networks/{network_code}`
     *     @type \Google\Ads\AdManager\V1\PrivateAuction $private_auction
     *           Required. The `PrivateAuction` to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\PrivateAuctionService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource where this `PrivateAuction` will be
     * created. Format: `networks/{network_code}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent resource where this `PrivateAuction` will be
     * created. Format: `networks/{network_code}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The `PrivateAuction` to create.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.PrivateAuction private_auction = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Ads\AdManager\V1\PrivateAuction|null
     */
    public function getPrivateAuction()
    {
        return $this->private_auction;
    }

    public function hasPrivateAuction()
    {
        return isset($this->private_auction);
    }

    public function clearPrivateAuction()
    {
        unset($this->private_auction);
    }

    /**
     * Required. The `PrivateAuction` to create.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.PrivateAuction private_auction = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Ads\AdManager\V1\PrivateAuction $var
     * @return $this
     */
    public function setPrivateAuction($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\PrivateAuction::class);
        $this->private_auction = $var;

        return $this;
    }

}

