<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v25/services/data_link_service.proto

namespace Google\Ads\GoogleAds\V25\Services;

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

/**
 * Request message for
 * [DataLinkService.CreateDataLink][google.ads.googleads.v25.services.DataLinkService.CreateDataLink].
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.CreateDataLinkRequest</code>
 */
class CreateDataLinkRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The ID of the customer for which the data link is created.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $customer_id = '';
    /**
     * Required. The data link to be created.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.resources.DataLink data_link = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_link = null;

    /**
     * @param string                                       $customerId Required. The ID of the customer for which the data link is created.
     * @param \Google\Ads\GoogleAds\V25\Resources\DataLink $dataLink   Required. The data link to be created.
     *
     * @return \Google\Ads\GoogleAds\V25\Services\CreateDataLinkRequest
     *
     * @experimental
     */
    public static function build(string $customerId, \Google\Ads\GoogleAds\V25\Resources\DataLink $dataLink): self
    {
        return (new self())
            ->setCustomerId($customerId)
            ->setDataLink($dataLink);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $customer_id
     *           Required. The ID of the customer for which the data link is created.
     *     @type \Google\Ads\GoogleAds\V25\Resources\DataLink $data_link
     *           Required. The data link to be created.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\DataLinkService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The ID of the customer for which the data link is created.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCustomerId()
    {
        return $this->customer_id;
    }

    /**
     * Required. The ID of the customer for which the data link is created.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCustomerId($var)
    {
        GPBUtil::checkString($var, True);
        $this->customer_id = $var;

        return $this;
    }

    /**
     * Required. The data link to be created.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.resources.DataLink data_link = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Ads\GoogleAds\V25\Resources\DataLink|null
     */
    public function getDataLink()
    {
        return $this->data_link;
    }

    public function hasDataLink()
    {
        return isset($this->data_link);
    }

    public function clearDataLink()
    {
        unset($this->data_link);
    }

    /**
     * Required. The data link to be created.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.resources.DataLink data_link = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Ads\GoogleAds\V25\Resources\DataLink $var
     * @return $this
     */
    public function setDataLink($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Resources\DataLink::class);
        $this->data_link = $var;

        return $this;
    }

}

