/*
 * 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';

const models = require('./index');

/**
 * Describes a replica of a service resource.
 *
 * @extends models['ServiceReplicaProperties']
 */
class ServiceResourceReplicaDescription extends models['ServiceReplicaProperties'] {
  /**
   * Create a ServiceResourceReplicaDescription.
   * @property {string} replicaName Name of the replica.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ServiceResourceReplicaDescription
   *
   * @returns {object} metadata of ServiceResourceReplicaDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ServiceResourceReplicaDescription',
      type: {
        name: 'Composite',
        className: 'ServiceResourceReplicaDescription',
        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'
            }
          },
          replicaName: {
            required: true,
            serializedName: 'replicaName',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ServiceResourceReplicaDescription;
