# 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::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
  module Models
    #
    # Configure backups for databases in your SQL virtual machine.
    #
    class AutoBackupSettings

      include MsRestAzure

      # @return [Boolean] Enable or disable autobackup on SQL virtual machine.
      attr_accessor :enable

      # @return [Boolean] Enable or disable encryption for backup on SQL
      # virtual machine.
      attr_accessor :enable_encryption

      # @return [Integer] Retention period of backup: 1-30 days.
      attr_accessor :retention_period

      # @return [String] Storage account url where backup will be taken to.
      attr_accessor :storage_account_url

      # @return [String] Storage account key where backup will be taken to.
      attr_accessor :storage_access_key

      # @return [String] Password for encryption on backup.
      attr_accessor :password

      # @return [Boolean] Include or exclude system databases from auto backup.
      attr_accessor :backup_system_dbs

      # @return [BackupScheduleType] Backup schedule type. Possible values
      # include: 'Manual', 'Automated'
      attr_accessor :backup_schedule_type

      # @return [FullBackupFrequencyType] Frequency of full backups. In both
      # cases, full backups begin during the next scheduled time window.
      # Possible values include: 'Daily', 'Weekly'
      attr_accessor :full_backup_frequency

      # @return [Integer] Start time of a given day during which full backups
      # can take place. 0-23 hours.
      attr_accessor :full_backup_start_time

      # @return [Integer] Duration of the time window of a given day during
      # which full backups can take place. 1-23 hours.
      attr_accessor :full_backup_window_hours

      # @return [Integer] Frequency of log backups. 5-60 minutes.
      attr_accessor :log_backup_frequency


      #
      # Mapper for AutoBackupSettings class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AutoBackupSettings',
          type: {
            name: 'Composite',
            class_name: 'AutoBackupSettings',
            model_properties: {
              enable: {
                client_side_validation: true,
                required: false,
                serialized_name: 'enable',
                type: {
                  name: 'Boolean'
                }
              },
              enable_encryption: {
                client_side_validation: true,
                required: false,
                serialized_name: 'enableEncryption',
                type: {
                  name: 'Boolean'
                }
              },
              retention_period: {
                client_side_validation: true,
                required: false,
                serialized_name: 'retentionPeriod',
                type: {
                  name: 'Number'
                }
              },
              storage_account_url: {
                client_side_validation: true,
                required: false,
                serialized_name: 'storageAccountUrl',
                type: {
                  name: 'String'
                }
              },
              storage_access_key: {
                client_side_validation: true,
                required: false,
                serialized_name: 'storageAccessKey',
                type: {
                  name: 'String'
                }
              },
              password: {
                client_side_validation: true,
                required: false,
                serialized_name: 'password',
                type: {
                  name: 'String'
                }
              },
              backup_system_dbs: {
                client_side_validation: true,
                required: false,
                serialized_name: 'backupSystemDbs',
                type: {
                  name: 'Boolean'
                }
              },
              backup_schedule_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'backupScheduleType',
                type: {
                  name: 'String'
                }
              },
              full_backup_frequency: {
                client_side_validation: true,
                required: false,
                serialized_name: 'fullBackupFrequency',
                type: {
                  name: 'String'
                }
              },
              full_backup_start_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'fullBackupStartTime',
                type: {
                  name: 'Number'
                }
              },
              full_backup_window_hours: {
                client_side_validation: true,
                required: false,
                serialized_name: 'fullBackupWindowHours',
                type: {
                  name: 'Number'
                }
              },
              log_backup_frequency: {
                client_side_validation: true,
                required: false,
                serialized_name: 'logBackupFrequency',
                type: {
                  name: 'Number'
                }
              }
            }
          }
        }
      end
    end
  end
end
