# 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
    #
    # Defines the parameters for the cache expiration action.
    #
    class CacheExpirationActionParameters

      include MsRestAzure

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

      # @return [CacheBehavior] Caching behavior for the requests. Possible
      # values include: 'BypassCache', 'Override', 'SetIfMissing'
      attr_accessor :cache_behavior

      # @return [String] The level at which the content needs to be cached.
      # Default value: 'All' .
      attr_accessor :cache_type

      # @return [String] The duration for which the content needs to be cached.
      # Allowed format is [d.]hh:mm:ss
      attr_accessor :cache_duration


      #
      # Mapper for CacheExpirationActionParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CacheExpirationActionParameters',
          type: {
            name: 'Composite',
            class_name: 'CacheExpirationActionParameters',
            model_properties: {
              odatatype: {
                client_side_validation: true,
                required: true,
                is_constant: true,
                serialized_name: '@odata\\.type',
                default_value: '#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters',
                type: {
                  name: 'String'
                }
              },
              cache_behavior: {
                client_side_validation: true,
                required: true,
                serialized_name: 'cacheBehavior',
                type: {
                  name: 'String'
                }
              },
              cache_type: {
                client_side_validation: true,
                required: true,
                is_constant: true,
                serialized_name: 'cacheType',
                default_value: 'All',
                type: {
                  name: 'String'
                }
              },
              cache_duration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'cacheDuration',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
