# 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.Drive.V3.Model.TeamDriveCapabilities do
  @moduledoc """
  Capabilities the current user has on this Team Drive.

  ## Attributes

  *   `canAddChildren` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can add children to folders in this Team Drive.
  *   `canChangeCopyRequiresWriterPermissionRestriction` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can change the `copyRequiresWriterPermission` restriction of this Team Drive.
  *   `canChangeDomainUsersOnlyRestriction` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can change the `domainUsersOnly` restriction of this Team Drive.
  *   `canChangeSharingFoldersRequiresOrganizerPermissionRestriction` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this Team Drive.
  *   `canChangeTeamDriveBackground` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can change the background of this Team Drive.
  *   `canChangeTeamMembersOnlyRestriction` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can change the `teamMembersOnly` restriction of this Team Drive.
  *   `canComment` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can comment on files in this Team Drive.
  *   `canCopy` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can copy files in this Team Drive.
  *   `canDeleteChildren` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can delete children from folders in this Team Drive.
  *   `canDeleteTeamDrive` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
  *   `canDownload` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can download files in this Team Drive.
  *   `canEdit` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can edit files in this Team Drive
  *   `canListChildren` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can list the children of folders in this Team Drive.
  *   `canManageMembers` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can add members to this Team Drive or remove them or change their role.
  *   `canReadRevisions` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can read the revisions resource of files in this Team Drive.
  *   `canRemoveChildren` (*type:* `boolean()`, *default:* `nil`) - Deprecated: Use `canDeleteChildren` or `canTrashChildren` instead.
  *   `canRename` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can rename files or folders in this Team Drive.
  *   `canRenameTeamDrive` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can rename this Team Drive.
  *   `canResetTeamDriveRestrictions` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can reset the Team Drive restrictions to defaults.
  *   `canShare` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can share files or folders in this Team Drive.
  *   `canTrashChildren` (*type:* `boolean()`, *default:* `nil`) - Whether the current user can trash children from folders in this Team Drive.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :canAddChildren => boolean() | nil,
          :canChangeCopyRequiresWriterPermissionRestriction => boolean() | nil,
          :canChangeDomainUsersOnlyRestriction => boolean() | nil,
          :canChangeSharingFoldersRequiresOrganizerPermissionRestriction => boolean() | nil,
          :canChangeTeamDriveBackground => boolean() | nil,
          :canChangeTeamMembersOnlyRestriction => boolean() | nil,
          :canComment => boolean() | nil,
          :canCopy => boolean() | nil,
          :canDeleteChildren => boolean() | nil,
          :canDeleteTeamDrive => boolean() | nil,
          :canDownload => boolean() | nil,
          :canEdit => boolean() | nil,
          :canListChildren => boolean() | nil,
          :canManageMembers => boolean() | nil,
          :canReadRevisions => boolean() | nil,
          :canRemoveChildren => boolean() | nil,
          :canRename => boolean() | nil,
          :canRenameTeamDrive => boolean() | nil,
          :canResetTeamDriveRestrictions => boolean() | nil,
          :canShare => boolean() | nil,
          :canTrashChildren => boolean() | nil
        }

  field(:canAddChildren)
  field(:canChangeCopyRequiresWriterPermissionRestriction)
  field(:canChangeDomainUsersOnlyRestriction)
  field(:canChangeSharingFoldersRequiresOrganizerPermissionRestriction)
  field(:canChangeTeamDriveBackground)
  field(:canChangeTeamMembersOnlyRestriction)
  field(:canComment)
  field(:canCopy)
  field(:canDeleteChildren)
  field(:canDeleteTeamDrive)
  field(:canDownload)
  field(:canEdit)
  field(:canListChildren)
  field(:canManageMembers)
  field(:canReadRevisions)
  field(:canRemoveChildren)
  field(:canRename)
  field(:canRenameTeamDrive)
  field(:canResetTeamDriveRestrictions)
  field(:canShare)
  field(:canTrashChildren)
end

defimpl Poison.Decoder, for: GoogleApi.Drive.V3.Model.TeamDriveCapabilities do
  def decode(value, options) do
    GoogleApi.Drive.V3.Model.TeamDriveCapabilities.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Drive.V3.Model.TeamDriveCapabilities do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
