# 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.Keep.V1.Model.BatchDeletePermissionsRequest do
  @moduledoc """
  The request to remove one or more permissions from a note. A permission with the `OWNER` role can't be removed. If removing a permission fails, then the entire request fails and no changes are made. Returns a 400 bad request error if a specified permission does not exist on the note.

  ## Attributes

  *   `names` (*type:* `list(String.t)`, *default:* `nil`) - Required. The names of the permissions to delete. Format: `notes/{note}/permissions/{permission}`
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :names => list(String.t()) | nil
        }

  field(:names, type: :list)
end

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

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