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

/**
 * The list of available upgrades for compute pools.
 *
 */
class ManagedClusterUpgradeProfile {
  /**
   * Create a ManagedClusterUpgradeProfile.
   * @property {string} [id] Id of upgrade profile.
   * @property {string} [name] Name of upgrade profile.
   * @property {string} [type] Type of upgrade profile.
   * @property {object} controlPlaneProfile The list of available upgrade
   * versions for the control plane.
   * @property {string} [controlPlaneProfile.kubernetesVersion] Kubernetes
   * version (major, minor, patch).
   * @property {string} [controlPlaneProfile.name] Pool name.
   * @property {string} [controlPlaneProfile.osType] OsType to be used to
   * specify os type. Choose from Linux and Windows. Default to Linux. Possible
   * values include: 'Linux', 'Windows'
   * @property {array} [controlPlaneProfile.upgrades] List of orchestrator
   * types and versions available for upgrade.
   * @property {array} agentPoolProfiles The list of available upgrade versions
   * for agent pools.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ManagedClusterUpgradeProfile
   *
   * @returns {object} metadata of ManagedClusterUpgradeProfile
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ManagedClusterUpgradeProfile',
      type: {
        name: 'Composite',
        className: 'ManagedClusterUpgradeProfile',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          controlPlaneProfile: {
            required: true,
            serializedName: 'properties.controlPlaneProfile',
            type: {
              name: 'Composite',
              className: 'ManagedClusterPoolUpgradeProfile'
            }
          },
          agentPoolProfiles: {
            required: true,
            serializedName: 'properties.agentPoolProfiles',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ManagedClusterPoolUpgradeProfileElementType',
                  type: {
                    name: 'Composite',
                    className: 'ManagedClusterPoolUpgradeProfile'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ManagedClusterUpgradeProfile;
