# 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.DeploymentManager.V2.Model.QuotaExceededInfo do
  @moduledoc """
  Additional details for quota exceeded error for resource quota.

  ## Attributes

  *   `dimensions` (*type:* `map()`, *default:* `nil`) - The map holding related quota dimensions.
  *   `futureLimit` (*type:* `float()`, *default:* `nil`) - Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
  *   `limit` (*type:* `float()`, *default:* `nil`) - Current effective quota limit. The limit's unit depends on the quota type or metric.
  *   `limitName` (*type:* `String.t`, *default:* `nil`) - The name of the quota limit.
  *   `metricName` (*type:* `String.t`, *default:* `nil`) - The Compute Engine quota metric name.
  *   `rolloutStatus` (*type:* `String.t`, *default:* `nil`) - Rollout status of the future quota limit.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dimensions => map() | nil,
          :futureLimit => float() | nil,
          :limit => float() | nil,
          :limitName => String.t() | nil,
          :metricName => String.t() | nil,
          :rolloutStatus => String.t() | nil
        }

  field(:dimensions, type: :map)
  field(:futureLimit)
  field(:limit)
  field(:limitName)
  field(:metricName)
  field(:rolloutStatus)
end

defimpl Poison.Decoder, for: GoogleApi.DeploymentManager.V2.Model.QuotaExceededInfo do
  def decode(value, options) do
    GoogleApi.DeploymentManager.V2.Model.QuotaExceededInfo.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DeploymentManager.V2.Model.QuotaExceededInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
