# 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_05_13
  module Models
    #
    # Azure VM (Mercury) workload-specific backup policy.
    #
    class AzureVmWorkloadProtectionPolicy < ProtectionPolicy

      include MsRestAzure


      def initialize
        @backupManagementType = "AzureWorkload"
      end

      attr_accessor :backupManagementType

      # @return [WorkloadType] Type of workload for the backup management.
      # Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb',
      # 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client',
      # 'GenericDataSource', 'SQLDataBase', 'AzureFileShare',
      # 'SAPHanaDatabase', 'SAPAseDatabase'
      attr_accessor :work_load_type

      # @return [Settings] Common settings for the backup management
      attr_accessor :settings

      # @return [Array<SubProtectionPolicy>] List of sub-protection policies
      # which includes schedule and retention
      attr_accessor :sub_protection_policy

      # @return [Boolean] Fix the policy inconsistency
      attr_accessor :make_policy_consistent


      #
      # Mapper for AzureVmWorkloadProtectionPolicy class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AzureWorkload',
          type: {
            name: 'Composite',
            class_name: 'AzureVmWorkloadProtectionPolicy',
            model_properties: {
              protected_items_count: {
                client_side_validation: true,
                required: false,
                serialized_name: 'protectedItemsCount',
                type: {
                  name: 'Number'
                }
              },
              backupManagementType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'backupManagementType',
                type: {
                  name: 'String'
                }
              },
              work_load_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'workLoadType',
                type: {
                  name: 'String'
                }
              },
              settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'settings',
                type: {
                  name: 'Composite',
                  class_name: 'Settings'
                }
              },
              sub_protection_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'subProtectionPolicy',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'SubProtectionPolicyElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'SubProtectionPolicy'
                      }
                  }
                }
              },
              make_policy_consistent: {
                client_side_validation: true,
                required: false,
                serialized_name: 'makePolicyConsistent',
                type: {
                  name: 'Boolean'
                }
              }
            }
          }
        }
      end
    end
  end
end
