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

namespace Google\Apps\Chat\V1\Space;

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

/**
 * [Permission settings](https://support.google.com/chat/answer/13340792)
 * that you can specify when updating an existing named space.
 * To set permission settings when creating a space, specify the
 * `PredefinedPermissionSettings` field in your request.
 *
 * Generated from protobuf message <code>google.chat.v1.Space.PermissionSettings</code>
 */
class PermissionSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Setting for managing members and groups in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $manage_members_and_groups = null;
    /**
     * Optional. Setting for updating space name, avatar, description and
     * guidelines.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $modify_space_details = null;
    /**
     * Optional. Setting for toggling space history on and off.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting toggle_history = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $toggle_history = null;
    /**
     * Optional. Setting for using \@all in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $use_at_mention_all = null;
    /**
     * Optional. Setting for managing apps in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_apps = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $manage_apps = null;
    /**
     * Optional. Setting for managing webhooks in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $manage_webhooks = null;
    /**
     * Output only. Setting for posting messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $post_messages = null;
    /**
     * Optional. Setting for replying to messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting reply_messages = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $reply_messages = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_members_and_groups
     *           Optional. Setting for managing members and groups in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $modify_space_details
     *           Optional. Setting for updating space name, avatar, description and
     *           guidelines.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $toggle_history
     *           Optional. Setting for toggling space history on and off.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $use_at_mention_all
     *           Optional. Setting for using \@all in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_apps
     *           Optional. Setting for managing apps in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_webhooks
     *           Optional. Setting for managing webhooks in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $post_messages
     *           Output only. Setting for posting messages in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $reply_messages
     *           Optional. Setting for replying to messages in a space.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Chat\V1\Space::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Setting for managing members and groups in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getManageMembersAndGroups()
    {
        return $this->manage_members_and_groups;
    }

    public function hasManageMembersAndGroups()
    {
        return isset($this->manage_members_and_groups);
    }

    public function clearManageMembersAndGroups()
    {
        unset($this->manage_members_and_groups);
    }

    /**
     * Optional. Setting for managing members and groups in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setManageMembersAndGroups($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->manage_members_and_groups = $var;

        return $this;
    }

    /**
     * Optional. Setting for updating space name, avatar, description and
     * guidelines.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getModifySpaceDetails()
    {
        return $this->modify_space_details;
    }

    public function hasModifySpaceDetails()
    {
        return isset($this->modify_space_details);
    }

    public function clearModifySpaceDetails()
    {
        unset($this->modify_space_details);
    }

    /**
     * Optional. Setting for updating space name, avatar, description and
     * guidelines.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setModifySpaceDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->modify_space_details = $var;

        return $this;
    }

    /**
     * Optional. Setting for toggling space history on and off.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting toggle_history = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getToggleHistory()
    {
        return $this->toggle_history;
    }

    public function hasToggleHistory()
    {
        return isset($this->toggle_history);
    }

    public function clearToggleHistory()
    {
        unset($this->toggle_history);
    }

    /**
     * Optional. Setting for toggling space history on and off.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting toggle_history = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setToggleHistory($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->toggle_history = $var;

        return $this;
    }

    /**
     * Optional. Setting for using \@all in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getUseAtMentionAll()
    {
        return $this->use_at_mention_all;
    }

    public function hasUseAtMentionAll()
    {
        return isset($this->use_at_mention_all);
    }

    public function clearUseAtMentionAll()
    {
        unset($this->use_at_mention_all);
    }

    /**
     * Optional. Setting for using \@all in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setUseAtMentionAll($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->use_at_mention_all = $var;

        return $this;
    }

    /**
     * Optional. Setting for managing apps in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_apps = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getManageApps()
    {
        return $this->manage_apps;
    }

    public function hasManageApps()
    {
        return isset($this->manage_apps);
    }

    public function clearManageApps()
    {
        unset($this->manage_apps);
    }

    /**
     * Optional. Setting for managing apps in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_apps = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setManageApps($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->manage_apps = $var;

        return $this;
    }

    /**
     * Optional. Setting for managing webhooks in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getManageWebhooks()
    {
        return $this->manage_webhooks;
    }

    public function hasManageWebhooks()
    {
        return isset($this->manage_webhooks);
    }

    public function clearManageWebhooks()
    {
        unset($this->manage_webhooks);
    }

    /**
     * Optional. Setting for managing webhooks in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setManageWebhooks($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->manage_webhooks = $var;

        return $this;
    }

    /**
     * Output only. Setting for posting messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getPostMessages()
    {
        return $this->post_messages;
    }

    public function hasPostMessages()
    {
        return isset($this->post_messages);
    }

    public function clearPostMessages()
    {
        unset($this->post_messages);
    }

    /**
     * Output only. Setting for posting messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setPostMessages($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->post_messages = $var;

        return $this;
    }

    /**
     * Optional. Setting for replying to messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting reply_messages = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null
     */
    public function getReplyMessages()
    {
        return $this->reply_messages;
    }

    public function hasReplyMessages()
    {
        return isset($this->reply_messages);
    }

    public function clearReplyMessages()
    {
        unset($this->reply_messages);
    }

    /**
     * Optional. Setting for replying to messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting reply_messages = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var
     * @return $this
     */
    public function setReplyMessages($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class);
        $this->reply_messages = $var;

        return $this;
    }

}

