# 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::V7_0_0_42
  module Models
    #
    # Describes properties of a service resource.
    #
    class ServiceProperties

      include MsRestAzure

      # @return [String] User readable description of the service.
      attr_accessor :description

      # @return [Integer] The number of replicas of the service to create.
      # Defaults to 1 if not specified.
      attr_accessor :replica_count

      # @return [ExecutionPolicy] The execution policy of the service
      attr_accessor :execution_policy

      # @return [Array<AutoScalingPolicy>] Auto scaling policies
      attr_accessor :auto_scaling_policies

      # @return [ResourceStatus] Status of the service. Possible values
      # include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting',
      # 'Failed'
      attr_accessor :status

      # @return [String] Gives additional information about the current status
      # of the service.
      attr_accessor :status_details

      # @return [HealthState] Describes the health state of an application
      # resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
      # 'Unknown'
      attr_accessor :health_state

      # @return [String] When the service's health state is not 'Ok', this
      # additional details from service fabric Health Manager for the user to
      # know why the service is marked unhealthy.
      attr_accessor :unhealthy_evaluation

      # @return [Array<ServiceIdentity>] The service identity list.
      attr_accessor :identity_refs

      # @return [String] Dns name of the service.
      attr_accessor :dns_name


      #
      # Mapper for ServiceProperties class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ServiceProperties',
          type: {
            name: 'Composite',
            class_name: 'ServiceProperties',
            model_properties: {
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              replica_count: {
                client_side_validation: true,
                required: false,
                serialized_name: 'replicaCount',
                type: {
                  name: 'Number'
                }
              },
              execution_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'executionPolicy',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'ExecutionPolicy',
                  class_name: 'ExecutionPolicy'
                }
              },
              auto_scaling_policies: {
                client_side_validation: true,
                required: false,
                serialized_name: 'autoScalingPolicies',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'AutoScalingPolicyElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'AutoScalingPolicy'
                      }
                  }
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'status',
                type: {
                  name: 'String'
                }
              },
              status_details: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'statusDetails',
                type: {
                  name: 'String'
                }
              },
              health_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'healthState',
                type: {
                  name: 'String'
                }
              },
              unhealthy_evaluation: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'unhealthyEvaluation',
                type: {
                  name: 'String'
                }
              },
              identity_refs: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identityRefs',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ServiceIdentityElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ServiceIdentity'
                      }
                  }
                }
              },
              dns_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'dnsName',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
