/*
 * 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 the properties of a service replica.
 *
 */
class ServiceReplicaProperties {
  /**
   * Create a ServiceReplicaProperties.
   * @property {string} osType The operation system required by the code in
   * service. Possible values include: 'Linux', 'Windows'
   * @property {array} codePackages Describes the set of code packages that
   * forms the service. A code package describes the container and the
   * properties for running it. All the code packages are started together on
   * the same host and share the same context (network, process etc.).
   * @property {array} [networkRefs] The names of the private networks that
   * this service needs to be part of.
   * @property {object} [diagnostics] Reference to sinks in
   * DiagnosticsDescription.
   * @property {boolean} [diagnostics.enabled] Status of whether or not sinks
   * are enabled.
   * @property {array} [diagnostics.sinkRefs] List of sinks to be used if
   * enabled. References the list of sinks in DiagnosticsDescription.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ServiceReplicaProperties
   *
   * @returns {object} metadata of ServiceReplicaProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ServiceReplicaProperties',
      type: {
        name: 'Composite',
        className: 'ServiceReplicaProperties',
        modelProperties: {
          osType: {
            required: true,
            serializedName: 'osType',
            type: {
              name: 'String'
            }
          },
          codePackages: {
            required: true,
            serializedName: 'codePackages',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ContainerCodePackagePropertiesElementType',
                  type: {
                    name: 'Composite',
                    className: 'ContainerCodePackageProperties'
                  }
              }
            }
          },
          networkRefs: {
            required: false,
            serializedName: 'networkRefs',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NetworkRefElementType',
                  type: {
                    name: 'Composite',
                    className: 'NetworkRef'
                  }
              }
            }
          },
          diagnostics: {
            required: false,
            serializedName: 'diagnostics',
            type: {
              name: 'Composite',
              className: 'DiagnosticsRef'
            }
          }
        }
      }
    };
  }
}

module.exports = ServiceReplicaProperties;
