# 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::ServiceFabric::Mgmt::V2018_02_01
  module Models
    #
    # Defines a health policy used to evaluate the health of an application or
    # one of its children entities.
    #
    #
    class ApplicationHealthPolicy

      include MsRestAzure

      # @return [ServiceTypeHealthPolicy] The health policy used by default to
      # evaluate the health of a service type.
      attr_accessor :default_service_type_health_policy

      # @return [Hash{String => ServiceTypeHealthPolicy}] The map with service
      # type health policy per service type name. The map is empty by default.
      attr_accessor :service_type_health_policies


      #
      # Mapper for ApplicationHealthPolicy class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ApplicationHealthPolicy',
          type: {
            name: 'Composite',
            class_name: 'ApplicationHealthPolicy',
            model_properties: {
              default_service_type_health_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'defaultServiceTypeHealthPolicy',
                type: {
                  name: 'Composite',
                  class_name: 'ServiceTypeHealthPolicy'
                }
              },
              service_type_health_policies: {
                client_side_validation: true,
                required: false,
                serialized_name: 'serviceTypeHealthPolicies',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ServiceTypeHealthPolicyElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ServiceTypeHealthPolicy'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
