# 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
    #
    # AFDOrigin group properties needed for origin group creation or update.
    #
    class AFDOriginGroupUpdateParameters

      include MsRestAzure

      # @return [LoadBalancingSettingsParameters] Load balancing settings for a
      # backend pool
      attr_accessor :load_balancing_settings

      # @return [HealthProbeParameters] Health probe settings to the origin
      # that is used to determine the health of the origin.
      attr_accessor :health_probe_settings

      # @return [Integer] Time in minutes to shift the traffic to the endpoint
      # gradually when an unhealthy endpoint comes healthy or a new endpoint is
      # added. Default is 10 mins. This property is currently not supported.
      attr_accessor :traffic_restoration_time_to_healed_or_new_endpoints_in_minutes

      # @return [ResponseBasedOriginErrorDetectionParameters] The JSON object
      # that contains the properties to determine origin health using real
      # requests/responses. This property is currently not supported.
      attr_accessor :response_based_afd_origin_error_detection_settings

      # @return [EnabledState] Whether to allow session affinity on this host.
      # Valid options are 'Enabled' or 'Disabled'. Possible values include:
      # 'Enabled', 'Disabled'
      attr_accessor :session_affinity_state


      #
      # Mapper for AFDOriginGroupUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AFDOriginGroupUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'AFDOriginGroupUpdateParameters',
            model_properties: {
              load_balancing_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.loadBalancingSettings',
                type: {
                  name: 'Composite',
                  class_name: 'LoadBalancingSettingsParameters'
                }
              },
              health_probe_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.healthProbeSettings',
                type: {
                  name: 'Composite',
                  class_name: 'HealthProbeParameters'
                }
              },
              traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes',
                constraints: {
                  InclusiveMaximum: 50,
                  InclusiveMinimum: 0
                },
                type: {
                  name: 'Number'
                }
              },
              response_based_afd_origin_error_detection_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.responseBasedAfdOriginErrorDetectionSettings',
                type: {
                  name: 'Composite',
                  class_name: 'ResponseBasedOriginErrorDetectionParameters'
                }
              },
              session_affinity_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.sessionAffinityState',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
