# 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::RecoveryServicesBackup::Mgmt::V2019_06_15
  module Models
    #
    # AzureWorkload-specific restore.
    #
    class AzureWorkloadRestoreRequest < RestoreRequest

      include MsRestAzure


      def initialize
        @objectType = "AzureWorkloadRestoreRequest"
      end

      attr_accessor :objectType

      # @return [RecoveryType] Type of this recovery. Possible values include:
      # 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks',
      # 'Offline'
      attr_accessor :recovery_type

      # @return [String] Fully qualified ARM ID of the VM on which workload
      # that was running is being recovered.
      attr_accessor :source_resource_id

      # @return [Hash{String => String}] Workload specific property bag.
      attr_accessor :property_bag

      # @return [TargetRestoreInfo] Details of target database
      attr_accessor :target_info

      # @return [RecoveryMode] Defines whether the current recovery mode is
      # file restore or database restore. Possible values include: 'Invalid',
      # 'FileRecovery', 'WorkloadRecovery'
      attr_accessor :recovery_mode


      #
      # Mapper for AzureWorkloadRestoreRequest class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AzureWorkloadRestoreRequest',
          type: {
            name: 'Composite',
            class_name: 'AzureWorkloadRestoreRequest',
            model_properties: {
              objectType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'objectType',
                type: {
                  name: 'String'
                }
              },
              recovery_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'recoveryType',
                type: {
                  name: 'String'
                }
              },
              source_resource_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sourceResourceId',
                type: {
                  name: 'String'
                }
              },
              property_bag: {
                client_side_validation: true,
                required: false,
                serialized_name: 'propertyBag',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              target_info: {
                client_side_validation: true,
                required: false,
                serialized_name: 'targetInfo',
                type: {
                  name: 'Composite',
                  class_name: 'TargetRestoreInfo'
                }
              },
              recovery_mode: {
                client_side_validation: true,
                required: false,
                serialized_name: 'recoveryMode',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
