# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Chat.V1.Model.PermissionSettings do
  @moduledoc """
  [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.

  ## Attributes

  *   `manageApps` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Optional. Setting for managing apps in a space.
  *   `manageMembersAndGroups` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Optional. Setting for managing members and groups in a space.
  *   `manageWebhooks` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Optional. Setting for managing webhooks in a space.
  *   `modifySpaceDetails` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Optional. Setting for updating space name, avatar, description and guidelines.
  *   `postMessages` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Output only. Setting for posting messages in a space.
  *   `replyMessages` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Optional. Setting for replying to messages in a space.
  *   `toggleHistory` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Optional. Setting for toggling space history on and off.
  *   `useAtMentionAll` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Optional. Setting for using @all in a space.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :manageApps => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
          :manageMembersAndGroups => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
          :manageWebhooks => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
          :modifySpaceDetails => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
          :postMessages => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
          :replyMessages => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
          :toggleHistory => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
          :useAtMentionAll => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil
        }

  field(:manageApps, as: GoogleApi.Chat.V1.Model.PermissionSetting)
  field(:manageMembersAndGroups, as: GoogleApi.Chat.V1.Model.PermissionSetting)
  field(:manageWebhooks, as: GoogleApi.Chat.V1.Model.PermissionSetting)
  field(:modifySpaceDetails, as: GoogleApi.Chat.V1.Model.PermissionSetting)
  field(:postMessages, as: GoogleApi.Chat.V1.Model.PermissionSetting)
  field(:replyMessages, as: GoogleApi.Chat.V1.Model.PermissionSetting)
  field(:toggleHistory, as: GoogleApi.Chat.V1.Model.PermissionSetting)
  field(:useAtMentionAll, as: GoogleApi.Chat.V1.Model.PermissionSetting)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.PermissionSettings do
  def decode(value, options) do
    GoogleApi.Chat.V1.Model.PermissionSettings.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.PermissionSettings do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
