/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * Describes properties of a service resource.
 *
 */
class ServiceProperties {
  /**
   * Create a ServiceProperties.
   * @member {string} [description] User readable description of the service.
   * @member {number} [replicaCount] The number of replicas of the service to
   * create. Defaults to 1 if not specified.
   * @member {array} [autoScalingPolicies] Auto scaling policies
   * @member {string} [status] Status of the service. Possible values include:
   * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
   * @member {string} [statusDetails] Gives additional information about the
   * current status of the service.
   * @member {string} [healthState] Describes the health state of an
   * application resource. Possible values include: 'Invalid', 'Ok', 'Warning',
   * 'Error', 'Unknown'
   * @member {string} [unhealthyEvaluation] 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.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ServiceProperties
   *
   * @returns {object} metadata of ServiceProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ServiceProperties',
      type: {
        name: 'Composite',
        className: 'ServiceProperties',
        modelProperties: {
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          replicaCount: {
            required: false,
            serializedName: 'replicaCount',
            type: {
              name: 'Number'
            }
          },
          autoScalingPolicies: {
            required: false,
            serializedName: 'autoScalingPolicies',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'AutoScalingPolicyElementType',
                  type: {
                    name: 'Composite',
                    className: 'AutoScalingPolicy'
                  }
              }
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          statusDetails: {
            required: false,
            readOnly: true,
            serializedName: 'statusDetails',
            type: {
              name: 'String'
            }
          },
          healthState: {
            required: false,
            readOnly: true,
            serializedName: 'healthState',
            type: {
              name: 'String'
            }
          },
          unhealthyEvaluation: {
            required: false,
            readOnly: true,
            serializedName: 'unhealthyEvaluation',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ServiceProperties;
