lib/google_api/reseller/v1/model/seats.ex

# 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.Reseller.V1.Model.Seats do
  @moduledoc """
  JSON template for subscription seats.

  ## Attributes

  *   `kind` (*type:* `String.t`, *default:* `subscriptions#seats`) - Identifies the resource as a subscription seat setting. Value: `subscriptions#seats`
  *   `licensedNumberOfSeats` (*type:* `integer()`, *default:* `nil`) - Read-only field containing the current number of users that are assigned a license for the product defined in `skuId`. This field's value is equivalent to the numerical count of users returned by the Enterprise License Manager API method: [`listForProductAndSku`](/admin-sdk/licensing/v1/reference/licenseAssignments/listForProductAndSku).
  *   `maximumNumberOfSeats` (*type:* `integer()`, *default:* `nil`) - This is a required property and is exclusive to subscriptions with `FLEXIBLE` or `TRIAL` plans. This property sets the maximum number of licensed users allowed on a subscription. This quantity can be increased up to the maximum limit defined in the reseller's contract. The minimum quantity is the current number of users in the customer account. *Note: *G Suite subscriptions automatically assign a license to every user.
  *   `numberOfSeats` (*type:* `integer()`, *default:* `nil`) - This is a required property and is exclusive to subscriptions with `ANNUAL_MONTHLY_PAY` and `ANNUAL_YEARLY_PAY` plans. This property sets the maximum number of licenses assignable to users on a subscription. The reseller can add more licenses, but once set, the `numberOfSeats` cannot be reduced until renewal. The reseller is invoiced based on the `numberOfSeats` value regardless of how many of these user licenses are assigned. *Note: *Google Workspace subscriptions automatically assign a license to every user.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :kind => String.t() | nil,
          :licensedNumberOfSeats => integer() | nil,
          :maximumNumberOfSeats => integer() | nil,
          :numberOfSeats => integer() | nil
        }

  field(:kind)
  field(:licensedNumberOfSeats)
  field(:maximumNumberOfSeats)
  field(:numberOfSeats)
end

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

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