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

/**
 * This type describes the resource requirements for a container or a service.
 *
 */
class ResourceRequirements {
  /**
   * Create a ResourceRequirements.
   * @property {object} requests Describes the requested resources for a given
   * container.
   * @property {number} [requests.memoryInGB] The memory request in GB for this
   * container.
   * @property {number} [requests.cpu] Requested number of CPU cores. At
   * present, only full cores are supported.
   * @property {object} [limits] Describes the maximum limits on the resources
   * for a given container.
   * @property {number} [limits.memoryInGB] The memory limit in GB.
   * @property {number} [limits.cpu] CPU limits in cores. At present, only full
   * cores are supported.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ResourceRequirements
   *
   * @returns {object} metadata of ResourceRequirements
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ResourceRequirements',
      type: {
        name: 'Composite',
        className: 'ResourceRequirements',
        modelProperties: {
          requests: {
            required: true,
            serializedName: 'requests',
            type: {
              name: 'Composite',
              className: 'ResourceRequests'
            }
          },
          limits: {
            required: false,
            serializedName: 'limits',
            type: {
              name: 'Composite',
              className: 'ResourceLimits'
            }
          }
        }
      }
    };
  }
}

module.exports = ResourceRequirements;
