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

namespace Google\Apps\Chat\V1;

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

/**
 * Request message for moving a section item across sections.
 *
 * Generated from protobuf message <code>google.chat.v1.MoveSectionItemRequest</code>
 */
class MoveSectionItemRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the section item to move.
     * Format: `users/{user}/sections/{section}/items/{item}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $name = '';
    /**
     * Required. The resource name of the section to move the section item to.
     * Format: `users/{user}/sections/{section}`
     *
     * Generated from protobuf field <code>string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $target_section = '';

    /**
     * @param string $name          Required. The resource name of the section item to move.
     *
     *                              Format: `users/{user}/sections/{section}/items/{item}`
     *                              Please see {@see ChatServiceClient::sectionItemName()} for help formatting this field.
     * @param string $targetSection Required. The resource name of the section to move the section item to.
     *
     *                              Format: `users/{user}/sections/{section}`
     *                              Please see {@see ChatServiceClient::sectionName()} for help formatting this field.
     *
     * @return \Google\Apps\Chat\V1\MoveSectionItemRequest
     *
     * @experimental
     */
    public static function build(string $name, string $targetSection): self
    {
        return (new self())
            ->setName($name)
            ->setTargetSection($targetSection);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name of the section item to move.
     *           Format: `users/{user}/sections/{section}/items/{item}`
     *     @type string $target_section
     *           Required. The resource name of the section to move the section item to.
     *           Format: `users/{user}/sections/{section}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Chat\V1\Section::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the section item to move.
     * Format: `users/{user}/sections/{section}/items/{item}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The resource name of the section item to move.
     * Format: `users/{user}/sections/{section}/items/{item}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The resource name of the section to move the section item to.
     * Format: `users/{user}/sections/{section}`
     *
     * Generated from protobuf field <code>string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getTargetSection()
    {
        return $this->target_section;
    }

    /**
     * Required. The resource name of the section to move the section item to.
     * Format: `users/{user}/sections/{section}`
     *
     * Generated from protobuf field <code>string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setTargetSection($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_section = $var;

        return $this;
    }

}

