# 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.DisplayVideo.V1.Model.InventorySourceStatus do
  @moduledoc """
  The status related settings of the inventory source.

  ## Attributes

  *   `configStatus` (*type:* `String.t`, *default:* `nil`) - Output only. The configuration status of the inventory source. Only applicable for guaranteed inventory sources. Acceptable values are `INVENTORY_SOURCE_CONFIG_STATUS_PENDING` and `INVENTORY_SOURCE_CONFIG_STATUS_COMPLETED`. An inventory source must be configured (fill in the required fields, choose creatives, and select a default campaign) before it can serve.
  *   `entityPauseReason` (*type:* `String.t`, *default:* `nil`) - The user-provided reason for pausing this inventory source. Must not exceed 100 characters. Only applicable when entity_status is set to `ENTITY_STATUS_PAUSED`.
  *   `entityStatus` (*type:* `String.t`, *default:* `nil`) - Whether or not the inventory source is servable. Acceptable values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. Default value is `ENTITY_STATUS_ACTIVE`.
  *   `sellerPauseReason` (*type:* `String.t`, *default:* `nil`) - Output only. The seller-provided reason for pausing this inventory source. Only applicable for inventory sources synced directly from the publishers and when seller_status is set to `ENTITY_STATUS_PAUSED`.
  *   `sellerStatus` (*type:* `String.t`, *default:* `nil`) - Output only. The status set by the seller for the inventory source. Only applicable for inventory sources synced directly from the publishers. Acceptable values are `ENTITY_STATUS_ACTIVE` and `ENTITY_STATUS_PAUSED`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :configStatus => String.t() | nil,
          :entityPauseReason => String.t() | nil,
          :entityStatus => String.t() | nil,
          :sellerPauseReason => String.t() | nil,
          :sellerStatus => String.t() | nil
        }

  field(:configStatus)
  field(:entityPauseReason)
  field(:entityStatus)
  field(:sellerPauseReason)
  field(:sellerStatus)
end

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

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