# 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.Customer do
  @moduledoc """


  ## Attributes

  *   `alternateEmail` (*type:* `String.t`, *default:* `nil`) - The customer's secondary contact email address. This email address cannot be on the same domain as the `customerDomain`
  *   `customerCreationTime` (*type:* `DateTime.t`, *default:* `nil`) - The customer's creation time (Readonly)
  *   `customerDomain` (*type:* `String.t`, *default:* `nil`) - The customer's primary domain name string. Do not include the `www` prefix when creating a new customer.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - ETag of the resource.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The unique ID for the customer's Google Workspace account. (Readonly)
  *   `kind` (*type:* `String.t`, *default:* `admin#directory#customer`) - Identifies the resource as a customer. Value: `admin#directory#customer`
  *   `language` (*type:* `String.t`, *default:* `nil`) - The customer's ISO 639-2 language code. See the [Language Codes](/admin-sdk/directory/v1/languages) page for the list of supported codes. Valid language codes outside the supported set will be accepted by the API but may lead to unexpected behavior. The default value is `en`.
  *   `phoneNumber` (*type:* `String.t`, *default:* `nil`) - The customer's contact phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.
  *   `postalAddress` (*type:* `GoogleApi.Admin.Directory_v1.Model.CustomerPostalAddress.t`, *default:* `nil`) - The customer's postal address information.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :alternateEmail => String.t() | nil,
          :customerCreationTime => DateTime.t() | nil,
          :customerDomain => String.t() | nil,
          :etag => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :language => String.t() | nil,
          :phoneNumber => String.t() | nil,
          :postalAddress => GoogleApi.Admin.Directory_v1.Model.CustomerPostalAddress.t() | nil
        }

  field(:alternateEmail)
  field(:customerCreationTime, as: DateTime)
  field(:customerDomain)
  field(:etag)
  field(:id)
  field(:kind)
  field(:language)
  field(:phoneNumber)
  field(:postalAddress, as: GoogleApi.Admin.Directory_v1.Model.CustomerPostalAddress)
end

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

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