lib/google_api/sas_portal/v1alpha1/model/sas_portal_device.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.SASPortal.V1alpha1.Model.SasPortalDevice do
  @moduledoc """


  ## Attributes

  *   `activeConfig` (*type:* `GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceConfig.t`, *default:* `nil`) - Output only. Current configuration of the device as registered to the SAS.
  *   `currentChannels` (*type:* `list(GoogleApi.SASPortal.V1alpha1.Model.SasPortalChannelWithScore.t)`, *default:* `nil`) - Output only. Current channels with scores.
  *   `deviceMetadata` (*type:* `GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceMetadata.t`, *default:* `nil`) - Device parameters that can be overridden by both SAS Portal and SAS registration requests.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Device display name.
  *   `fccId` (*type:* `String.t`, *default:* `nil`) - The FCC identifier of the device.
  *   `grantRangeAllowlists` (*type:* `list(GoogleApi.SASPortal.V1alpha1.Model.SasPortalFrequencyRange.t)`, *default:* `nil`) - Only ranges within the allowlists are available for new grants.
  *   `grants` (*type:* `list(GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceGrant.t)`, *default:* `nil`) - Output only. Grants held by the device.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource path name.
  *   `preloadedConfig` (*type:* `GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceConfig.t`, *default:* `nil`) - Configuration of the device, as specified via SAS Portal API.
  *   `serialNumber` (*type:* `String.t`, *default:* `nil`) - A serial number assigned to the device by the device manufacturer.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. Device state.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activeConfig => GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceConfig.t() | nil,
          :currentChannels =>
            list(GoogleApi.SASPortal.V1alpha1.Model.SasPortalChannelWithScore.t()) | nil,
          :deviceMetadata => GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceMetadata.t() | nil,
          :displayName => String.t() | nil,
          :fccId => String.t() | nil,
          :grantRangeAllowlists =>
            list(GoogleApi.SASPortal.V1alpha1.Model.SasPortalFrequencyRange.t()) | nil,
          :grants => list(GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceGrant.t()) | nil,
          :name => String.t() | nil,
          :preloadedConfig => GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceConfig.t() | nil,
          :serialNumber => String.t() | nil,
          :state => String.t() | nil
        }

  field(:activeConfig, as: GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceConfig)

  field(:currentChannels,
    as: GoogleApi.SASPortal.V1alpha1.Model.SasPortalChannelWithScore,
    type: :list
  )

  field(:deviceMetadata, as: GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceMetadata)
  field(:displayName)
  field(:fccId)

  field(:grantRangeAllowlists,
    as: GoogleApi.SASPortal.V1alpha1.Model.SasPortalFrequencyRange,
    type: :list
  )

  field(:grants, as: GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceGrant, type: :list)
  field(:name)
  field(:preloadedConfig, as: GoogleApi.SASPortal.V1alpha1.Model.SasPortalDeviceConfig)
  field(:serialNumber)
  field(:state)
end

defimpl Poison.Decoder, for: GoogleApi.SASPortal.V1alpha1.Model.SasPortalDevice do
  def decode(value, options) do
    GoogleApi.SASPortal.V1alpha1.Model.SasPortalDevice.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.SASPortal.V1alpha1.Model.SasPortalDevice do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end