# 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
    #
    # WebHook activity.
    #
    class WebHookActivity < ControlActivity

      include MsRestAzure


      def initialize
        @type = "WebHook"
      end

      attr_accessor :type

      # @return [String] Rest API method for target endpoint. Default value:
      # 'POST' .
      attr_accessor :method

      # @return WebHook activity target endpoint and path. Type: string (or
      # Expression with resultType string).
      attr_accessor :url

      # @return [String] The timeout within which the webhook should be called
      # back. If there is no value specified, it defaults to 10 minutes. Type:
      # string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
      attr_accessor :timeout

      # @return Represents the headers that will be sent to the request. For
      # example, to set the language and type on a request: "headers" : {
      # "Accept-Language": "en-us", "Content-Type": "application/json" }. Type:
      # string (or Expression with resultType string).
      attr_accessor :headers

      # @return Represents the payload that will be sent to the endpoint.
      # Required for POST/PUT method, not allowed for GET method Type: string
      # (or Expression with resultType string).
      attr_accessor :body

      # @return [WebActivityAuthentication] Authentication method used for
      # calling the endpoint.
      attr_accessor :authentication

      # @return When set to true, statusCode, output and error in callback
      # request body will be consumed by activity. The activity can be marked
      # as failed by setting statusCode >= 400 in callback request. Default is
      # false. Type: boolean (or Expression with resultType boolean).
      attr_accessor :report_status_on_call_back


      #
      # Mapper for WebHookActivity class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'WebHook',
          type: {
            name: 'Composite',
            class_name: 'WebHookActivity',
            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'
                      }
                  }
                }
              },
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              method: {
                client_side_validation: true,
                required: true,
                is_constant: true,
                serialized_name: 'typeProperties.method',
                default_value: 'POST',
                type: {
                  name: 'String'
                }
              },
              url: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.url',
                type: {
                  name: 'Object'
                }
              },
              timeout: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.timeout',
                type: {
                  name: 'String'
                }
              },
              headers: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.headers',
                type: {
                  name: 'Object'
                }
              },
              body: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.body',
                type: {
                  name: 'Object'
                }
              },
              authentication: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.authentication',
                type: {
                  name: 'Composite',
                  class_name: 'WebActivityAuthentication'
                }
              },
              report_status_on_call_back: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.reportStatusOnCallBack',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
