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

namespace Google\Ads\GoogleAds\V20\Services;

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

/**
 * Request message for
 * [ProductLinkService.RemoveProductLink][google.ads.googleads.v20.services.ProductLinkService.RemoveProductLink].
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.services.RemoveProductLinkRequest</code>
 */
class RemoveProductLinkRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The ID of the customer being modified.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $customer_id = '';
    /**
     * Required. Remove operation: A resource name for the product link to remove
     * is expected, in this format:
     * `customers/{customer_id}/productLinks/{product_link_id} `
     *
     * Generated from protobuf field <code>string resource_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * If true, the request is validated but not executed. Only errors are
     * returned, not results.
     *
     * Generated from protobuf field <code>bool validate_only = 3;</code>
     */
    protected $validate_only = false;

    /**
     * @param string $customerId   Required. The ID of the customer being modified.
     * @param string $resourceName Required. Remove operation: A resource name for the product link to remove
     *                             is expected, in this format:
     *
     *                             `customers/{customer_id}/productLinks/{product_link_id} `
     *
     * @return \Google\Ads\GoogleAds\V20\Services\RemoveProductLinkRequest
     *
     * @experimental
     */
    public static function build(string $customerId, string $resourceName): self
    {
        return (new self())
            ->setCustomerId($customerId)
            ->setResourceName($resourceName);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $customer_id
     *           Required. The ID of the customer being modified.
     *     @type string $resource_name
     *           Required. Remove operation: A resource name for the product link to remove
     *           is expected, in this format:
     *           `customers/{customer_id}/productLinks/{product_link_id} `
     *     @type bool $validate_only
     *           If true, the request is validated but not executed. Only errors are
     *           returned, not results.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Services\ProductLinkService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The ID of the customer being modified.
     *
     * 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 being modified.
     *
     * 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. Remove operation: A resource name for the product link to remove
     * is expected, in this format:
     * `customers/{customer_id}/productLinks/{product_link_id} `
     *
     * Generated from protobuf field <code>string resource_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Required. Remove operation: A resource name for the product link to remove
     * is expected, in this format:
     * `customers/{customer_id}/productLinks/{product_link_id} `
     *
     * Generated from protobuf field <code>string resource_name = 2 [(.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;
    }

    /**
     * If true, the request is validated but not executed. Only errors are
     * returned, not results.
     *
     * Generated from protobuf field <code>bool validate_only = 3;</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * If true, the request is validated but not executed. Only errors are
     * returned, not results.
     *
     * Generated from protobuf field <code>bool validate_only = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

}

