# 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.PrintServer do
  @moduledoc """
  Configuration for a print server.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the print server was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Editable. Description of the print server (as shown in the Admin console).
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Editable. Display name of the print server (as shown in the Admin console).
  *   `id` (*type:* `String.t`, *default:* `nil`) - Immutable. ID of the print server. Leave empty when creating.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Resource name of the print server. Leave empty when creating. Format: `customers/{customer.id}/printServers/{print_server.id}`
  *   `orgUnitId` (*type:* `String.t`, *default:* `nil`) - ID of the organization unit (OU) that owns this print server. This value can only be set when the print server is initially created. If it's not populated, the print server is placed under the root OU. The `org_unit_id` can be retrieved using the [Directory API](/admin-sdk/directory/reference/rest/v1/orgunits).
  *   `uri` (*type:* `String.t`, *default:* `nil`) - Editable. Print server URI.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :id => String.t() | nil,
          :name => String.t() | nil,
          :orgUnitId => String.t() | nil,
          :uri => String.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:id)
  field(:name)
  field(:orgUnitId)
  field(:uri)
end

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

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