# 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
    #
    # The domain JSON object required for domain creation or update.
    #
    class RouteUpdateParameters

      include MsRestAzure

      # @return [Array<ResourceReference>] Domains referenced by this endpoint.
      attr_accessor :custom_domains

      # @return [ResourceReference] A reference to the origin group.
      attr_accessor :origin_group

      # @return [String] A directory path on the origin that AzureFrontDoor can
      # use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
      attr_accessor :origin_path

      # @return [Array<ResourceReference>] rule sets referenced by this
      # endpoint.
      attr_accessor :rule_sets

      # @return [Array<AFDEndpointProtocols>] List of supported protocols for
      # this route.
      attr_accessor :supported_protocols

      # @return [Array<String>] The route patterns of the rule.
      attr_accessor :patterns_to_match

      # @return compression settings.
      attr_accessor :compression_settings

      # @return [QueryStringCachingBehavior] Defines how AzureFrontDoor caches
      # requests that include query strings. You can ignore any query strings
      # when caching, bypass caching to prevent requests that contain query
      # strings from being cached, or cache every request with a unique URL.
      # Possible values include: 'IgnoreQueryString', 'BypassCaching',
      # 'UseQueryString', 'NotSet'
      attr_accessor :query_string_caching_behavior

      # @return [OptimizationType] Specifies what scenario the customer wants
      # this AzureFrontDoor endpoint to optimize for, e.g. Download, Media
      # services. With this information, AzureFrontDoor can apply scenario
      # driven optimization. Possible values include: 'GeneralWebDelivery',
      # 'GeneralMediaStreaming', 'VideoOnDemandMediaStreaming',
      # 'LargeFileDownload', 'DynamicSiteAcceleration'
      attr_accessor :optimization_type

      # @return [ForwardingProtocol] Protocol this rule will use when
      # forwarding traffic to backends. Possible values include: 'HttpOnly',
      # 'HttpsOnly', 'MatchRequest'
      attr_accessor :forwarding_protocol

      # @return [LinkToDefaultDomain] whether this route will be linked to the
      # default endpoint domain. Possible values include: 'Enabled', 'Disabled'
      attr_accessor :link_to_default_domain

      # @return [HttpsRedirect] Whether to automatically redirect HTTP traffic
      # to HTTPS traffic. Note that this is a easy way to set up this rule and
      # it will be the first rule that gets executed. Possible values include:
      # 'Enabled', 'Disabled'
      attr_accessor :https_redirect

      # @return [EnabledState] Whether to enable use of this rule. Permitted
      # values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled',
      # 'Disabled'
      attr_accessor :enabled_state


      #
      # Mapper for RouteUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'RouteUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'RouteUpdateParameters',
            model_properties: {
              custom_domains: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.customDomains',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ResourceReferenceElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ResourceReference'
                      }
                  }
                }
              },
              origin_group: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.originGroup',
                type: {
                  name: 'Composite',
                  class_name: 'ResourceReference'
                }
              },
              origin_path: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.originPath',
                type: {
                  name: 'String'
                }
              },
              rule_sets: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.ruleSets',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ResourceReferenceElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ResourceReference'
                      }
                  }
                }
              },
              supported_protocols: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.supportedProtocols',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'AFDEndpointProtocolsElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              patterns_to_match: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.patternsToMatch',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              compression_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.compressionSettings',
                type: {
                  name: 'Object'
                }
              },
              query_string_caching_behavior: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.queryStringCachingBehavior',
                type: {
                  name: 'Enum',
                  module: 'QueryStringCachingBehavior'
                }
              },
              optimization_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.optimizationType',
                type: {
                  name: 'String'
                }
              },
              forwarding_protocol: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.forwardingProtocol',
                type: {
                  name: 'String'
                }
              },
              link_to_default_domain: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.linkToDefaultDomain',
                type: {
                  name: 'String'
                }
              },
              https_redirect: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.httpsRedirect',
                type: {
                  name: 'String'
                }
              },
              enabled_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.enabledState',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
