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

namespace Google\Cloud\StorageTransfer\V1;

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

/**
 * Specifies the request passed to CreateAgentPool.
 *
 * Generated from protobuf message <code>google.storagetransfer.v1.CreateAgentPoolRequest</code>
 */
class CreateAgentPoolRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The ID of the Google Cloud project that owns the
     * agent pool.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $project_id = '';
    /**
     * Required. The agent pool to create.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $agent_pool = null;
    /**
     * Required. The ID of the agent pool to create.
     * The `agent_pool_id` must meet the following requirements:
     * *   Length of 128 characters or less.
     * *   Not start with the string `goog`.
     * *   Start with a lowercase ASCII character, followed by:
     *     *   Zero or more: lowercase Latin alphabet characters, numerals,
     *         hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`).
     *     *   One or more numerals or lowercase ASCII characters.
     * As expressed by the regular expression:
     * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
     *
     * Generated from protobuf field <code>string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $agent_pool_id = '';

    /**
     * @param string                                     $projectId   Required. The ID of the Google Cloud project that owns the
     *                                                                agent pool.
     * @param \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool   Required. The agent pool to create.
     * @param string                                     $agentPoolId Required. The ID of the agent pool to create.
     *
     *                                                                The `agent_pool_id` must meet the following requirements:
     *
     *                                                                *   Length of 128 characters or less.
     *                                                                *   Not start with the string `goog`.
     *                                                                *   Start with a lowercase ASCII character, followed by:
     *                                                                *   Zero or more: lowercase Latin alphabet characters, numerals,
     *                                                                hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`).
     *                                                                *   One or more numerals or lowercase ASCII characters.
     *
     *                                                                As expressed by the regular expression:
     *                                                                `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
     *
     * @return \Google\Cloud\StorageTransfer\V1\CreateAgentPoolRequest
     *
     * @experimental
     */
    public static function build(string $projectId, \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool, string $agentPoolId): self
    {
        return (new self())
            ->setProjectId($projectId)
            ->setAgentPool($agentPool)
            ->setAgentPoolId($agentPoolId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $project_id
     *           Required. The ID of the Google Cloud project that owns the
     *           agent pool.
     *     @type \Google\Cloud\StorageTransfer\V1\AgentPool $agent_pool
     *           Required. The agent pool to create.
     *     @type string $agent_pool_id
     *           Required. The ID of the agent pool to create.
     *           The `agent_pool_id` must meet the following requirements:
     *           *   Length of 128 characters or less.
     *           *   Not start with the string `goog`.
     *           *   Start with a lowercase ASCII character, followed by:
     *               *   Zero or more: lowercase Latin alphabet characters, numerals,
     *                   hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`).
     *               *   One or more numerals or lowercase ASCII characters.
     *           As expressed by the regular expression:
     *           `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The ID of the Google Cloud project that owns the
     * agent pool.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getProjectId()
    {
        return $this->project_id;
    }

    /**
     * Required. The ID of the Google Cloud project that owns the
     * agent pool.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

    /**
     * Required. The agent pool to create.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\StorageTransfer\V1\AgentPool|null
     */
    public function getAgentPool()
    {
        return $this->agent_pool;
    }

    public function hasAgentPool()
    {
        return isset($this->agent_pool);
    }

    public function clearAgentPool()
    {
        unset($this->agent_pool);
    }

    /**
     * Required. The agent pool to create.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\StorageTransfer\V1\AgentPool $var
     * @return $this
     */
    public function setAgentPool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AgentPool::class);
        $this->agent_pool = $var;

        return $this;
    }

    /**
     * Required. The ID of the agent pool to create.
     * The `agent_pool_id` must meet the following requirements:
     * *   Length of 128 characters or less.
     * *   Not start with the string `goog`.
     * *   Start with a lowercase ASCII character, followed by:
     *     *   Zero or more: lowercase Latin alphabet characters, numerals,
     *         hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`).
     *     *   One or more numerals or lowercase ASCII characters.
     * As expressed by the regular expression:
     * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
     *
     * Generated from protobuf field <code>string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAgentPoolId()
    {
        return $this->agent_pool_id;
    }

    /**
     * Required. The ID of the agent pool to create.
     * The `agent_pool_id` must meet the following requirements:
     * *   Length of 128 characters or less.
     * *   Not start with the string `goog`.
     * *   Start with a lowercase ASCII character, followed by:
     *     *   Zero or more: lowercase Latin alphabet characters, numerals,
     *         hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`).
     *     *   One or more numerals or lowercase ASCII characters.
     * As expressed by the regular expression:
     * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
     *
     * Generated from protobuf field <code>string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAgentPoolId($var)
    {
        GPBUtil::checkString($var, True);
        $this->agent_pool_id = $var;

        return $this;
    }

}

