# 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::V2017_07_01_preview
  module Models
    #
    # Describes capacity information for a custom resource balancing metric.
    # This can be used to limit the total consumption of this metric by the
    # services of this application.
    #
    #
    class ApplicationMetricDescription

      include MsRestAzure

      # @return [String] The name of the metric.
      attr_accessor :name

      # @return [Integer] The maximum node capacity for Service Fabric
      # application.
      # This is the maximum Load for an instance of this application on a
      # single node. Even if the capacity of node is greater than this value,
      # Service Fabric will limit the total load of services within the
      # application on each node to this value.
      # If set to zero, capacity for this metric is unlimited on each node.
      # When creating a new application with application capacity defined, the
      # product of MaximumNodes and this value must always be smaller than or
      # equal to TotalApplicationCapacity.
      # When updating existing application with application capacity, the
      # product of MaximumNodes and this value must always be smaller than or
      # equal to TotalApplicationCapacity.
      #
      attr_accessor :maximum_capacity

      # @return [Integer] The node reservation capacity for Service Fabric
      # application.
      # This is the amount of load which is reserved on nodes which have
      # instances of this application.
      # If MinimumNodes is specified, then the product of these values will be
      # the capacity reserved in the cluster for the application.
      # If set to zero, no capacity is reserved for this metric.
      # When setting application capacity or when updating application
      # capacity; this value must be smaller than or equal to MaximumCapacity
      # for each metric.
      #
      attr_accessor :reservation_capacity

      # @return [Integer] The total metric capacity for Service Fabric
      # application.
      # This is the total metric capacity for this application in the cluster.
      # Service Fabric will try to limit the sum of loads of services within
      # the application to this value.
      # When creating a new application with application capacity defined, the
      # product of MaximumNodes and MaximumCapacity must always be smaller than
      # or equal to this value.
      #
      attr_accessor :total_application_capacity


      #
      # Mapper for ApplicationMetricDescription class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ApplicationMetricDescription',
          type: {
            name: 'Composite',
            class_name: 'ApplicationMetricDescription',
            model_properties: {
              name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Name',
                type: {
                  name: 'String'
                }
              },
              maximum_capacity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'MaximumCapacity',
                type: {
                  name: 'Number'
                }
              },
              reservation_capacity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ReservationCapacity',
                type: {
                  name: 'Number'
                }
              },
              total_application_capacity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'TotalApplicationCapacity',
                type: {
                  name: 'Number'
                }
              }
            }
          }
        }
      end
    end
  end
end
