# 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::ServiceFabric::V7_0_0_42
  module Models
    #
    # The run to completion execution policy
    #
    class RunToCompletionExecutionPolicy < ExecutionPolicy

      include MsRestAzure


      def initialize
        @type = "runToCompletion"
      end

      attr_accessor :type

      # @return [RestartPolicy] Enumerates the restart policy for
      # RunToCompletionExecutionPolicy. Possible values include: 'onFailure',
      # 'never'
      attr_accessor :restart


      #
      # Mapper for RunToCompletionExecutionPolicy class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'runToCompletion',
          type: {
            name: 'Composite',
            class_name: 'RunToCompletionExecutionPolicy',
            model_properties: {
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              restart: {
                client_side_validation: true,
                required: true,
                serialized_name: 'restart',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
