# 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::V2020_06_01
  module Models
    #
    # The instance view of a virtual machine run command.
    #
    class VirtualMachineRunCommandInstanceView

      include MsRestAzure

      # @return [ExecutionState] Script execution status. Possible values
      # include: 'Unknown', 'Pending', 'Running', 'Failed', 'Succeeded',
      # 'TimedOut', 'Canceled'
      attr_accessor :execution_state

      # @return [String] Communicate script configuration errors or execution
      # messages.
      attr_accessor :execution_message

      # @return [Integer] Exit code returned from script execution.
      attr_accessor :exit_code

      # @return [String] Script output stream.
      attr_accessor :output

      # @return [String] Script error stream.
      attr_accessor :error

      # @return [DateTime] Script start time.
      attr_accessor :start_time

      # @return [DateTime] Script end time.
      attr_accessor :end_time

      # @return [Array<InstanceViewStatus>] The resource status information.
      attr_accessor :statuses


      #
      # Mapper for VirtualMachineRunCommandInstanceView class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'VirtualMachineRunCommandInstanceView',
          type: {
            name: 'Composite',
            class_name: 'VirtualMachineRunCommandInstanceView',
            model_properties: {
              execution_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'executionState',
                type: {
                  name: 'String'
                }
              },
              execution_message: {
                client_side_validation: true,
                required: false,
                serialized_name: 'executionMessage',
                type: {
                  name: 'String'
                }
              },
              exit_code: {
                client_side_validation: true,
                required: false,
                serialized_name: 'exitCode',
                type: {
                  name: 'Number'
                }
              },
              output: {
                client_side_validation: true,
                required: false,
                serialized_name: 'output',
                type: {
                  name: 'String'
                }
              },
              error: {
                client_side_validation: true,
                required: false,
                serialized_name: 'error',
                type: {
                  name: 'String'
                }
              },
              start_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'startTime',
                type: {
                  name: 'DateTime'
                }
              },
              end_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'endTime',
                type: {
                  name: 'DateTime'
                }
              },
              statuses: {
                client_side_validation: true,
                required: false,
                serialized_name: 'statuses',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'InstanceViewStatusElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'InstanceViewStatus'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
