# 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::HybridCompute::Mgmt::V2019_12_12
  module Models
    #
    # Describes a hybrid machine.
    #
    class Machine < TrackedResource

      include MsRestAzure

      # @return [LocationData]
      attr_accessor :location_data

      # @return [MachinePropertiesOsProfile] Specifies the operating system
      # settings for the hybrid machine.
      attr_accessor :os_profile

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

      # @return [StatusTypes] The status of the hybrid machine agent. Possible
      # values include: 'Connected', 'Disconnected', 'Error'
      attr_accessor :status

      # @return [DateTime] The time of the last status change.
      attr_accessor :last_status_change

      # @return [Array<ErrorDetail>] Details about the error state.
      attr_accessor :error_details

      # @return [String] The hybrid machine agent full version.
      attr_accessor :agent_version

      # @return [String] Specifies the hybrid machine unique ID.
      attr_accessor :vm_id

      # @return [String] Specifies the hybrid machine display name.
      attr_accessor :display_name

      # @return [String] Specifies the hybrid machine FQDN.
      attr_accessor :machine_fqdn

      # @return [String] Public Key that the client provides to be used during
      # initial resource onboarding
      attr_accessor :client_public_key

      # @return [String] The Operating System running on the hybrid machine.
      attr_accessor :os_name

      # @return [String] The version of Operating System running on the hybrid
      # machine.
      attr_accessor :os_version

      # @return [Array<MachineExtensionInstanceView>] Machine Extensions
      # information
      attr_accessor :extensions

      # @return [MachineIdentity]
      attr_accessor :identity


      #
      # Mapper for Machine class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Machine',
          type: {
            name: 'Composite',
            class_name: 'Machine',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                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'
                }
              },
              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'
                      }
                  }
                }
              },
              location: {
                client_side_validation: true,
                required: true,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              location_data: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.locationData',
                type: {
                  name: 'Composite',
                  class_name: 'LocationData'
                }
              },
              os_profile: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.osProfile',
                type: {
                  name: 'Composite',
                  class_name: 'MachinePropertiesOsProfile'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.status',
                type: {
                  name: 'String'
                }
              },
              last_status_change: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.lastStatusChange',
                type: {
                  name: 'DateTime'
                }
              },
              error_details: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.errorDetails',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ErrorDetailElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ErrorDetail'
                      }
                  }
                }
              },
              agent_version: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.agentVersion',
                type: {
                  name: 'String'
                }
              },
              vm_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.vmId',
                type: {
                  name: 'String'
                }
              },
              display_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.displayName',
                type: {
                  name: 'String'
                }
              },
              machine_fqdn: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.machineFqdn',
                type: {
                  name: 'String'
                }
              },
              client_public_key: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.clientPublicKey',
                type: {
                  name: 'String'
                }
              },
              os_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.osName',
                type: {
                  name: 'String'
                }
              },
              os_version: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.osVersion',
                type: {
                  name: 'String'
                }
              },
              extensions: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.extensions',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'MachineExtensionInstanceViewElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'MachineExtensionInstanceView'
                      }
                  }
                }
              },
              identity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identity',
                type: {
                  name: 'Composite',
                  class_name: 'MachineIdentity'
                }
              }
            }
          }
        }
      end
    end
  end
end
