# 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.Admin.Directory_v1.Model.Printer do
  @moduledoc """
  Printer configuration.

  ## Attributes

  *   `auxiliaryMessages` (*type:* `list(GoogleApi.Admin.Directory_v1.Model.AuxiliaryMessage.t)`, *default:* `nil`) - Output only. Auxiliary messages about issues with the printer configuration if any.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when printer was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Editable. Description of printer.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Editable. Name of printer.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Id of the printer. (During printer creation leave empty)
  *   `makeAndModel` (*type:* `String.t`, *default:* `nil`) - Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
  *   `orgUnitId` (*type:* `String.t`, *default:* `nil`) - Organization Unit that owns this printer (Only can be set during Printer creation)
  *   `uri` (*type:* `String.t`, *default:* `nil`) - Editable. Printer URI.
  *   `useDriverlessConfig` (*type:* `boolean()`, *default:* `nil`) - Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :auxiliaryMessages =>
            list(GoogleApi.Admin.Directory_v1.Model.AuxiliaryMessage.t()) | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :id => String.t() | nil,
          :makeAndModel => String.t() | nil,
          :name => String.t() | nil,
          :orgUnitId => String.t() | nil,
          :uri => String.t() | nil,
          :useDriverlessConfig => boolean() | nil
        }

  field(:auxiliaryMessages, as: GoogleApi.Admin.Directory_v1.Model.AuxiliaryMessage, type: :list)
  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:id)
  field(:makeAndModel)
  field(:name)
  field(:orgUnitId)
  field(:uri)
  field(:useDriverlessConfig)
end

defimpl Poison.Decoder, for: GoogleApi.Admin.Directory_v1.Model.Printer do
  def decode(value, options) do
    GoogleApi.Admin.Directory_v1.Model.Printer.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Admin.Directory_v1.Model.Printer do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
