/*
 * 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 application resource.
 *
 */
class ApplicationProperties {
  /**
   * Create a ApplicationProperties.
   * @member {string} [description] User readable description of the
   * application.
   * @member {array} [services] Describes the services in the application. This
   * property is used to create or modify services of the application. On get
   * only the name of the service is returned. The service description can be
   * obtained by querying for the service resource.
   * @member {object} [diagnostics] Describes the diagnostics definition and
   * usage for an application resource.
   * @member {array} [diagnostics.sinks] List of supported sinks that can be
   * referenced.
   * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are
   * enabled.
   * @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if
   * diagnostics is enabled. Sink choices can be overridden at the service and
   * code package level.
   * @member {string} [debugParams] Internal - used by Visual Studio to setup
   * the debugging session on the local development environment.
   * @member {array} [serviceNames] Names of the services in the application.
   * @member {string} [status] Status of the application. Possible values
   * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
   * @member {string} [statusDetails] Gives additional information about the
   * current status of the application.
   * @member {string} [healthState] Describes the health state of an
   * application resource. Possible values include: 'Invalid', 'Ok', 'Warning',
   * 'Error', 'Unknown'
   * @member {string} [unhealthyEvaluation] When the application's health state
   * is not 'Ok', this additional details from service fabric Health Manager
   * for the user to know why the application is marked unhealthy.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApplicationProperties
   *
   * @returns {object} metadata of ApplicationProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationProperties',
      type: {
        name: 'Composite',
        className: 'ApplicationProperties',
        modelProperties: {
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          services: {
            required: false,
            serializedName: 'services',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ServiceResourceDescriptionElementType',
                  type: {
                    name: 'Composite',
                    className: 'ServiceResourceDescription'
                  }
              }
            }
          },
          diagnostics: {
            required: false,
            serializedName: 'diagnostics',
            type: {
              name: 'Composite',
              className: 'DiagnosticsDescription'
            }
          },
          debugParams: {
            required: false,
            serializedName: 'debugParams',
            type: {
              name: 'String'
            }
          },
          serviceNames: {
            required: false,
            readOnly: true,
            serializedName: 'serviceNames',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          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 = ApplicationProperties;
