# 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::CDN::Mgmt::V2020_04_15
  module Models
    #
    # An action for the delivery rule.
    #
    class DeliveryRuleAction

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["UrlRedirect"] = "UrlRedirectAction"
      @@discriminatorMap["UrlSigning"] = "UrlSigningAction"
      @@discriminatorMap["UrlRewrite"] = "UrlRewriteAction"
      @@discriminatorMap["ModifyRequestHeader"] = "DeliveryRuleRequestHeaderAction"
      @@discriminatorMap["ModifyResponseHeader"] = "DeliveryRuleResponseHeaderAction"
      @@discriminatorMap["CacheExpiration"] = "DeliveryRuleCacheExpirationAction"
      @@discriminatorMap["CacheKeyQueryString"] = "DeliveryRuleCacheKeyQueryStringAction"

      def initialize
        @name = "DeliveryRuleAction"
      end

      attr_accessor :name


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