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

namespace Google\Ads\GoogleAds\V22\Services;

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

/**
 * Request message for
 * [DataLinkService.UpdateDataLink][google.ads.googleads.v22.services.DataLinkService.UpdateDataLink].
 *
 * Generated from protobuf message <code>google.ads.googleads.v22.services.UpdateDataLinkRequest</code>
 */
class UpdateDataLinkRequest 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 status to be updated to.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.DataLinkStatusEnum.DataLinkStatus data_link_status = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_link_status = 0;
    /**
     * Required. The data link is expected to have a valid resource name.
     *
     * Generated from protobuf field <code>string resource_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';

    /**
     * @param string $customerId     Required. The ID of the customer for which the data link is created.
     * @param int    $dataLinkStatus Required. The data link status to be updated to.
     *                               For allowed values, use constants defined on {@see \Google\Ads\GoogleAds\V22\Enums\DataLinkStatusEnum\DataLinkStatus}
     * @param string $resourceName   Required. The data link is expected to have a valid resource name.
     *
     * @return \Google\Ads\GoogleAds\V22\Services\UpdateDataLinkRequest
     *
     * @experimental
     */
    public static function build(string $customerId, int $dataLinkStatus, string $resourceName): self
    {
        return (new self())
            ->setCustomerId($customerId)
            ->setDataLinkStatus($dataLinkStatus)
            ->setResourceName($resourceName);
    }

    /**
     * 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 int $data_link_status
     *           Required. The data link status to be updated to.
     *     @type string $resource_name
     *           Required. The data link is expected to have a valid resource name.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V22\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 status to be updated to.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.DataLinkStatusEnum.DataLinkStatus data_link_status = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDataLinkStatus()
    {
        return $this->data_link_status;
    }

    /**
     * Required. The data link status to be updated to.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.DataLinkStatusEnum.DataLinkStatus data_link_status = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setDataLinkStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V22\Enums\DataLinkStatusEnum\DataLinkStatus::class);
        $this->data_link_status = $var;

        return $this;
    }

    /**
     * Required. The data link is expected to have a valid resource name.
     *
     * Generated from protobuf field <code>string resource_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Required. The data link is expected to have a valid resource name.
     *
     * Generated from protobuf field <code>string resource_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

}

