<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * [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
{
    /**
     * 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;</code>
     */
    protected $manage_members_and_groups = null;
    /**
     * Setting for updating space name, avatar, description and guidelines.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2;</code>
     */
    protected $modify_space_details = null;
    /**
     * Setting for toggling space history on and off.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting toggle_history = 3;</code>
     */
    protected $toggle_history = null;
    /**
     * Setting for using &#64;all in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4;</code>
     */
    protected $use_at_mention_all = null;
    /**
     * Setting for managing apps in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_apps = 5;</code>
     */
    protected $manage_apps = null;
    /**
     * Setting for managing webhooks in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6;</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;
    /**
     * Setting for replying to messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting reply_messages = 8;</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
     *           Setting for managing members and groups in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $modify_space_details
     *           Setting for updating space name, avatar, description and guidelines.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $toggle_history
     *           Setting for toggling space history on and off.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $use_at_mention_all
     *           Setting for using &#64;all in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_apps
     *           Setting for managing apps in a space.
     *     @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_webhooks
     *           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
     *           Setting for replying to messages in a space.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Chat\V1\Space::initOnce();
        parent::__construct($data);
    }

    /**
     * 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;</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);
    }

    /**
     * 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;</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;
    }

    /**
     * Setting for updating space name, avatar, description and guidelines.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2;</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);
    }

    /**
     * Setting for updating space name, avatar, description and guidelines.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2;</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;
    }

    /**
     * Setting for toggling space history on and off.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting toggle_history = 3;</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);
    }

    /**
     * Setting for toggling space history on and off.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting toggle_history = 3;</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;
    }

    /**
     * Setting for using &#64;all in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4;</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);
    }

    /**
     * Setting for using &#64;all in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4;</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;
    }

    /**
     * Setting for managing apps in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_apps = 5;</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);
    }

    /**
     * Setting for managing apps in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_apps = 5;</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;
    }

    /**
     * Setting for managing webhooks in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6;</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);
    }

    /**
     * Setting for managing webhooks in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6;</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;
    }

    /**
     * Setting for replying to messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting reply_messages = 8;</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);
    }

    /**
     * Setting for replying to messages in a space.
     *
     * Generated from protobuf field <code>optional .google.chat.v1.Space.PermissionSetting reply_messages = 8;</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;
    }

}


