# encoding: utf-8
# 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::V2019_08_01_preview
  module Models
    #
    # A cache instance.  Follows Azure Resource Manager standards:
    # https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md
    #
    class Cache

      include MsRestAzure

      # @return ARM tags as name/value pairs.
      attr_accessor :tags

      # @return [String] Fully qualified URL of the cache.
      attr_accessor :id

      # @return [String] Region name string.
      attr_accessor :location

      # @return [String] Name of cache.
      attr_accessor :name

      # @return [String] Type for the cache; Microsoft.StorageCache/Cache
      attr_accessor :type

      # @return [Integer] The size of this cache's cache, in GB.
      attr_accessor :cache_size_gb

      # @return [CacheHealth] Health of the cache.
      attr_accessor :health

      # @return [Array<String>] Array of IP addresses that can be used by
      # clients mounting this Cache.
      attr_accessor :mount_addresses

      # @return [ProvisioningStateType] ARM provisioning state, see
      # https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
      # Possible values include: 'Succeeded', 'Failed', 'Cancelled',
      # 'Creating', 'Deleting', 'Updating'
      attr_accessor :provisioning_state

      # @return [String] Subnet used for the cache.
      attr_accessor :subnet

      # @return [CacheUpgradeStatus] Upgrade status of the cache.
      attr_accessor :upgrade_status

      # @return [CacheSku] Sku for the cache.
      attr_accessor :sku


      #
      # Mapper for Cache class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Cache',
          type: {
            name: 'Composite',
            class_name: 'Cache',
            model_properties: {
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Object'
                }
              },
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              location: {
                client_side_validation: true,
                required: false,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              cache_size_gb: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.cacheSizeGB',
                type: {
                  name: 'Number'
                }
              },
              health: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.health',
                type: {
                  name: 'Composite',
                  class_name: 'CacheHealth'
                }
              },
              mount_addresses: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.mountAddresses',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              subnet: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.subnet',
                type: {
                  name: 'String'
                }
              },
              upgrade_status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.upgradeStatus',
                type: {
                  name: 'Composite',
                  class_name: 'CacheUpgradeStatus'
                }
              },
              sku: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sku',
                type: {
                  name: 'Composite',
                  class_name: 'CacheSku'
                }
              }
            }
          }
        }
      end
    end
  end
end
