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

namespace Google\Ads\AdManager\V1;

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

/**
 * Request object for `CreateTeam` method.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.CreateTeamRequest</code>
 */
class CreateTeamRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource where this `Team` will be created.
     * 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 `Team` to create.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Team team = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $team = null;

    /**
     * @param string                        $parent Required. The parent resource where this `Team` will be created.
     *                                              Format: `networks/{network_code}`
     *                                              Please see {@see TeamServiceClient::networkName()} for help formatting this field.
     * @param \Google\Ads\AdManager\V1\Team $team   Required. The `Team` to create.
     *
     * @return \Google\Ads\AdManager\V1\CreateTeamRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Ads\AdManager\V1\Team $team): self
    {
        return (new self())
            ->setParent($parent)
            ->setTeam($team);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource where this `Team` will be created.
     *           Format: `networks/{network_code}`
     *     @type \Google\Ads\AdManager\V1\Team $team
     *           Required. The `Team` to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource where this `Team` will be created.
     * 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. The parent resource where this `Team` will be created.
     * 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 `Team` to create.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Team team = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Ads\AdManager\V1\Team|null
     */
    public function getTeam()
    {
        return $this->team;
    }

    public function hasTeam()
    {
        return isset($this->team);
    }

    public function clearTeam()
    {
        unset($this->team);
    }

    /**
     * Required. The `Team` to create.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Team team = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Ads\AdManager\V1\Team $var
     * @return $this
     */
    public function setTeam($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Team::class);
        $this->team = $var;

        return $this;
    }

}

