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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Request message for
 * [ShareablePreviewService.GenerateShareablePreviews][google.ads.googleads.v23.services.ShareablePreviewService.GenerateShareablePreviews].
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.GenerateShareablePreviewsRequest</code>
 */
class GenerateShareablePreviewsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The customer creating the shareable previews request.
     *
     * Generated from protobuf field <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $customer_id = '';
    /**
     * Required. The list of shareable previews to generate.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.ShareablePreview shareable_previews = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $shareable_previews;

    /**
     * @param string                                                $customerId        Required. The customer creating the shareable previews request.
     * @param \Google\Ads\GoogleAds\V23\Services\ShareablePreview[] $shareablePreviews Required. The list of shareable previews to generate.
     *
     * @return \Google\Ads\GoogleAds\V23\Services\GenerateShareablePreviewsRequest
     *
     * @experimental
     */
    public static function build(string $customerId, array $shareablePreviews): self
    {
        return (new self())
            ->setCustomerId($customerId)
            ->setShareablePreviews($shareablePreviews);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $customer_id
     *           Required. The customer creating the shareable previews request.
     *     @type array<\Google\Ads\GoogleAds\V23\Services\ShareablePreview>|\Google\Protobuf\Internal\RepeatedField $shareable_previews
     *           Required. The list of shareable previews to generate.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\ShareablePreviewService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The customer creating the shareable previews request.
     *
     * 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 customer creating the shareable previews request.
     *
     * 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 list of shareable previews to generate.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.ShareablePreview shareable_previews = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getShareablePreviews()
    {
        return $this->shareable_previews;
    }

    /**
     * Required. The list of shareable previews to generate.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.ShareablePreview shareable_previews = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Ads\GoogleAds\V23\Services\ShareablePreview>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setShareablePreviews($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Services\ShareablePreview::class);
        $this->shareable_previews = $arr;

        return $this;
    }

}

