# 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
    #
    # A pipeline activity.
    #
    class Activity

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["ExecuteDataFlow"] = "ExecuteDataFlowActivity"
      @@discriminatorMap["AzureFunctionActivity"] = "AzureFunctionActivity"
      @@discriminatorMap["DatabricksSparkPython"] = "DatabricksSparkPythonActivity"
      @@discriminatorMap["DatabricksSparkJar"] = "DatabricksSparkJarActivity"
      @@discriminatorMap["DatabricksNotebook"] = "DatabricksNotebookActivity"
      @@discriminatorMap["DataLakeAnalyticsU-SQL"] = "DataLakeAnalyticsUSQLActivity"
      @@discriminatorMap["AzureMLExecutePipeline"] = "AzureMLExecutePipelineActivity"
      @@discriminatorMap["AzureMLUpdateResource"] = "AzureMLUpdateResourceActivity"
      @@discriminatorMap["AzureMLBatchExecution"] = "AzureMLBatchExecutionActivity"
      @@discriminatorMap["GetMetadata"] = "GetMetadataActivity"
      @@discriminatorMap["WebActivity"] = "WebActivity"
      @@discriminatorMap["Lookup"] = "LookupActivity"
      @@discriminatorMap["AzureDataExplorerCommand"] = "AzureDataExplorerCommandActivity"
      @@discriminatorMap["Delete"] = "DeleteActivity"
      @@discriminatorMap["SqlServerStoredProcedure"] = "SqlServerStoredProcedureActivity"
      @@discriminatorMap["Custom"] = "CustomActivity"
      @@discriminatorMap["ExecuteSSISPackage"] = "ExecuteSSISPackageActivity"
      @@discriminatorMap["HDInsightSpark"] = "HDInsightSparkActivity"
      @@discriminatorMap["HDInsightStreaming"] = "HDInsightStreamingActivity"
      @@discriminatorMap["HDInsightMapReduce"] = "HDInsightMapReduceActivity"
      @@discriminatorMap["HDInsightPig"] = "HDInsightPigActivity"
      @@discriminatorMap["HDInsightHive"] = "HDInsightHiveActivity"
      @@discriminatorMap["Copy"] = "CopyActivity"
      @@discriminatorMap["Execution"] = "ExecutionActivity"
      @@discriminatorMap["WebHook"] = "WebHookActivity"
      @@discriminatorMap["AppendVariable"] = "AppendVariableActivity"
      @@discriminatorMap["SetVariable"] = "SetVariableActivity"
      @@discriminatorMap["Filter"] = "FilterActivity"
      @@discriminatorMap["Validation"] = "ValidationActivity"
      @@discriminatorMap["Until"] = "UntilActivity"
      @@discriminatorMap["Wait"] = "WaitActivity"
      @@discriminatorMap["ForEach"] = "ForEachActivity"
      @@discriminatorMap["Switch"] = "SwitchActivity"
      @@discriminatorMap["IfCondition"] = "IfConditionActivity"
      @@discriminatorMap["ExecutePipeline"] = "ExecutePipelineActivity"
      @@discriminatorMap["Container"] = "ControlActivity"

      def initialize
        @type = "Activity"
      end

      attr_accessor :type

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

      # @return [String] Activity name.
      attr_accessor :name

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

      # @return [Array<ActivityDependency>] Activity depends on condition.
      attr_accessor :depends_on

      # @return [Array<UserProperty>] Activity user properties.
      attr_accessor :user_properties


      #
      # Mapper for Activity class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Activity',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'type',
            uber_parent: 'Activity',
            class_name: 'Activity',
            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'
                      }
                  }
                }
              },
              name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              depends_on: {
                client_side_validation: true,
                required: false,
                serialized_name: 'dependsOn',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ActivityDependencyElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ActivityDependency'
                      }
                  }
                }
              },
              user_properties: {
                client_side_validation: true,
                required: false,
                serialized_name: 'userProperties',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'UserPropertyElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'UserProperty'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
