# 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::Maintenance::Mgmt::V2018_06_01_preview
  module Models
    #
    # Maintenance update on a resource
    #
    class Update

      include MsRestAzure

      # @return [MaintenanceScope] The impact area. Possible values include:
      # 'All', 'Host', 'Resource', 'InResource'
      attr_accessor :maintenance_scope

      # @return [ImpactType] The impact type. Possible values include: 'None',
      # 'Freeze', 'Restart', 'Redeploy'
      attr_accessor :impact_type

      # @return [UpdateStatus] The status. Possible values include: 'Pending',
      # 'InProgress', 'Completed', 'RetryNow', 'RetryLater'
      attr_accessor :status

      # @return [Integer] Duration of impact in seconds
      attr_accessor :impact_duration_in_sec

      # @return [DateTime] Time when Azure will start force updates if not
      # self-updated by customer before this time
      attr_accessor :not_before

      # @return [String] The resourceId
      attr_accessor :resource_id


      #
      # Mapper for Update class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Update',
          type: {
            name: 'Composite',
            class_name: 'Update',
            model_properties: {
              maintenance_scope: {
                client_side_validation: true,
                required: false,
                serialized_name: 'maintenanceScope',
                type: {
                  name: 'String'
                }
              },
              impact_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'impactType',
                type: {
                  name: 'String'
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'status',
                type: {
                  name: 'String'
                }
              },
              impact_duration_in_sec: {
                client_side_validation: true,
                required: false,
                serialized_name: 'impactDurationInSec',
                type: {
                  name: 'Number'
                }
              },
              not_before: {
                client_side_validation: true,
                required: false,
                serialized_name: 'notBefore',
                type: {
                  name: 'DateTime'
                }
              },
              resource_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.resourceId',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
