# 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::Compute::Mgmt::V2019_03_01
  module Models
    #
    # Specifies information about the dedicated host. Only tags,
    # autoReplaceOnFailure and licenseType may be updated.
    #
    class DedicatedHostUpdate < UpdateResource

      include MsRestAzure

      # @return [Integer] Fault domain of the dedicated host within a dedicated
      # host group.
      attr_accessor :platform_fault_domain

      # @return [Boolean] Specifies whether the dedicated host should be
      # replaced automatically in case of a failure. The value is defaulted to
      # 'true' when not provided.
      attr_accessor :auto_replace_on_failure

      # @return [String] A unique id generated and assigned to the dedicated
      # host by the platform. <br><br> Does not change throughout the lifetime
      # of the host.
      attr_accessor :host_id

      # @return [Array<SubResourceReadOnly>] A list of references to all
      # virtual machines in the Dedicated Host.
      attr_accessor :virtual_machines

      # @return [DedicatedHostLicenseTypes] Specifies the software license type
      # that will be applied to the VMs deployed on the dedicated host.
      # <br><br> Possible values are: <br><br> **None** <br><br>
      # **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual**
      # <br><br> Default: **None**. Possible values include: 'None',
      # 'Windows_Server_Hybrid', 'Windows_Server_Perpetual'
      attr_accessor :license_type

      # @return [DateTime] The date when the host was first provisioned.
      attr_accessor :provisioning_time

      # @return [String] The provisioning state, which only appears in the
      # response.
      attr_accessor :provisioning_state

      # @return [DedicatedHostInstanceView] The dedicated host instance view.
      attr_accessor :instance_view


      #
      # Mapper for DedicatedHostUpdate class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DedicatedHostUpdate',
          type: {
            name: 'Composite',
            class_name: 'DedicatedHostUpdate',
            model_properties: {
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              platform_fault_domain: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.platformFaultDomain',
                constraints: {
                  InclusiveMaximum: 2,
                  InclusiveMinimum: 0
                },
                type: {
                  name: 'Number'
                }
              },
              auto_replace_on_failure: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.autoReplaceOnFailure',
                type: {
                  name: 'Boolean'
                }
              },
              host_id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.hostId',
                type: {
                  name: 'String'
                }
              },
              virtual_machines: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.virtualMachines',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'SubResourceReadOnlyElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'SubResourceReadOnly'
                      }
                  }
                }
              },
              license_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.licenseType',
                type: {
                  name: 'Enum',
                  module: 'DedicatedHostLicenseTypes'
                }
              },
              provisioning_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningTime',
                type: {
                  name: 'DateTime'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              instance_view: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.instanceView',
                type: {
                  name: 'Composite',
                  class_name: 'DedicatedHostInstanceView'
                }
              }
            }
          }
        }
      end
    end
  end
end
