# 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::DataFactory::Mgmt::V2017_09_01_preview
  module Models
    #
    # Azure data factory nested object which contains information about
    # creating pipeline run
    #
    class Trigger

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["TumblingWindowTrigger"] = "TumblingWindowTrigger"
      @@discriminatorMap["BlobEventsTrigger"] = "BlobEventsTrigger"
      @@discriminatorMap["BlobTrigger"] = "BlobTrigger"
      @@discriminatorMap["ScheduleTrigger"] = "ScheduleTrigger"
      @@discriminatorMap["MultiplePipelineTrigger"] = "MultiplePipelineTrigger"

      def initialize
        @type = "Trigger"
      end

      attr_accessor :type

      # @return Unmatched properties from the message are deserialized this
      # collection
      attr_accessor :additional_properties

      # @return [String] Trigger description.
      attr_accessor :description

      # @return [TriggerRuntimeState] Indicates if trigger is running or not.
      # Updated when Start/Stop APIs are called on the Trigger. Possible values
      # include: 'Started', 'Stopped', 'Disabled'
      attr_accessor :runtime_state


      #
      # Mapper for Trigger class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Trigger',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'type',
            uber_parent: 'Trigger',
            class_name: 'Trigger',
            model_properties: {
              additional_properties: {
                client_side_validation: true,
                required: false,
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              runtime_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'runtimeState',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
