<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/placement_service.proto

namespace Google\Ads\AdManager\V1;

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

/**
 * Request message for `BatchArchivePlacements` method.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.BatchArchivePlacementsRequest</code>
 */
class BatchArchivePlacementsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. 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 names of the `Placement` objects to archive.
     * Format: `networks/{network_code}/placements/{placement_id}`
     *
     * Generated from protobuf field <code>repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $names;

    /**
     * @param string   $parent Required. Format: `networks/{network_code}`
     *                         Please see {@see PlacementServiceClient::networkName()} for help formatting this field.
     * @param string[] $names  Required. The names of the `Placement` objects to archive.
     *                         Format: `networks/{network_code}/placements/{placement_id}`
     *                         Please see {@see PlacementServiceClient::placementName()} for help formatting this field.
     *
     * @return \Google\Ads\AdManager\V1\BatchArchivePlacementsRequest
     *
     * @experimental
     */
    public static function build(string $parent, array $names): self
    {
        return (new self())
            ->setParent($parent)
            ->setNames($names);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Format: `networks/{network_code}`
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $names
     *           Required. The names of the `Placement` objects to archive.
     *           Format: `networks/{network_code}/placements/{placement_id}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. 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. 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 names of the `Placement` objects to archive.
     * Format: `networks/{network_code}/placements/{placement_id}`
     *
     * Generated from protobuf field <code>repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNames()
    {
        return $this->names;
    }

    /**
     * Required. The names of the `Placement` objects to archive.
     * Format: `networks/{network_code}/placements/{placement_id}`
     *
     * Generated from protobuf field <code>repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNames($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->names = $arr;

        return $this;
    }

}

