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

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["ChainingTrigger"] = "ChainingTrigger"
      @@discriminatorMap["RerunTumblingWindowTrigger"] = "RerunTumblingWindowTrigger"
      @@discriminatorMap["TumblingWindowTrigger"] = "TumblingWindowTrigger"
      @@discriminatorMap["CustomEventsTrigger"] = "CustomEventsTrigger"
      @@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

      # @return List of tags that can be used for describing the trigger.
      attr_accessor :annotations


      #
      # 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'
                }
              },
              annotations: {
                client_side_validation: true,
                required: false,
                serialized_name: 'annotations',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
