lib/google_api/cloud_asset/v1/model/inventory.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.CloudAsset.V1.Model.Inventory do
  @moduledoc """
  This API resource represents the available inventory data for a Compute Engine virtual machine (VM) instance at a given point in time. You can use this API resource to determine the inventory data of your VM. For more information, see [Information provided by OS inventory management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).

  ## Attributes

  *   `items` (*type:* `%{optional(String.t) => GoogleApi.CloudAsset.V1.Model.Item.t}`, *default:* `nil`) - Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The `Inventory` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
  *   `osInfo` (*type:* `GoogleApi.CloudAsset.V1.Model.OsInfo.t`, *default:* `nil`) - Base level operating system information for the VM.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the last reported inventory for the VM.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :items => %{optional(String.t()) => GoogleApi.CloudAsset.V1.Model.Item.t()} | nil,
          :name => String.t() | nil,
          :osInfo => GoogleApi.CloudAsset.V1.Model.OsInfo.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:items, as: GoogleApi.CloudAsset.V1.Model.Item, type: :map)
  field(:name)
  field(:osInfo, as: GoogleApi.CloudAsset.V1.Model.OsInfo)
  field(:updateTime, as: DateTime)
end

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

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