# 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_09_01
  module Models
    #
    # Defines the parameters for the url rewrite action.
    #
    class UrlRewriteActionParameters

      include MsRestAzure

      # @return [String] . Default value:
      # '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters' .
      attr_accessor :odatatype

      # @return [String] define a request URI pattern that identifies the type
      # of requests that may be rewritten. If value is blank, all strings are
      # matched.
      attr_accessor :source_pattern

      # @return [String] Define the relative URL to which the above requests
      # will be rewritten by.
      attr_accessor :destination

      # @return [Boolean] Whether to preserve unmatched path. Default value is
      # true.
      attr_accessor :preserve_unmatched_path


      #
      # Mapper for UrlRewriteActionParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'UrlRewriteActionParameters',
          type: {
            name: 'Composite',
            class_name: 'UrlRewriteActionParameters',
            model_properties: {
              odatatype: {
                client_side_validation: true,
                required: true,
                is_constant: true,
                serialized_name: '@odata\\.type',
                default_value: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters',
                type: {
                  name: 'String'
                }
              },
              source_pattern: {
                client_side_validation: true,
                required: true,
                serialized_name: 'sourcePattern',
                type: {
                  name: 'String'
                }
              },
              destination: {
                client_side_validation: true,
                required: true,
                serialized_name: 'destination',
                type: {
                  name: 'String'
                }
              },
              preserve_unmatched_path: {
                client_side_validation: true,
                required: false,
                serialized_name: 'preserveUnmatchedPath',
                type: {
                  name: 'Boolean'
                }
              }
            }
          }
        }
      end
    end
  end
end
