# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::StorageCache::Mgmt::V2020_03_01
  module Models
    #
    # Properties describing the software upgrade state of the Cache.
    #
    class CacheUpgradeStatus

      include MsRestAzure

      # @return [String] Version string of the firmware currently installed on
      # this Cache.
      attr_accessor :current_firmware_version

      # @return [FirmwareStatusType] True if there is a firmware update ready
      # to install on this Cache. The firmware will automatically be installed
      # after firmwareUpdateDeadline if not triggered earlier via the upgrade
      # operation. Possible values include: 'available', 'unavailable'
      attr_accessor :firmware_update_status

      # @return [DateTime] Time at which the pending firmware update will
      # automatically be installed on the Cache.
      attr_accessor :firmware_update_deadline

      # @return [DateTime] Time of the last successful firmware update.
      attr_accessor :last_firmware_update

      # @return [String] When firmwareUpdateAvailable is true, this field holds
      # the version string for the update.
      attr_accessor :pending_firmware_version


      #
      # Mapper for CacheUpgradeStatus class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CacheUpgradeStatus',
          type: {
            name: 'Composite',
            class_name: 'CacheUpgradeStatus',
            model_properties: {
              current_firmware_version: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'currentFirmwareVersion',
                type: {
                  name: 'String'
                }
              },
              firmware_update_status: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'firmwareUpdateStatus',
                type: {
                  name: 'String'
                }
              },
              firmware_update_deadline: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'firmwareUpdateDeadline',
                type: {
                  name: 'DateTime'
                }
              },
              last_firmware_update: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'lastFirmwareUpdate',
                type: {
                  name: 'DateTime'
                }
              },
              pending_firmware_version: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'pendingFirmwareVersion',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
