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

/**
 * OpenShift Managed cluster.
 *
 * @extends models['Resource']
 */
class OpenShiftManagedCluster extends models['Resource'] {
  /**
   * Create a OpenShiftManagedCluster.
   * @property {object} [plan] Define the resource plan as required by ARM for
   * billing purposes
   * @property {string} [plan.name] The plan ID.
   * @property {string} [plan.product] Specifies the product of the image from
   * the marketplace. This is the same value as Offer under the imageReference
   * element.
   * @property {string} [plan.promotionCode] The promotion code.
   * @property {string} [plan.publisher] The plan ID.
   * @property {string} [provisioningState] The current deployment or
   * provisioning state, which only appears in the response.
   * @property {string} openShiftVersion Version of OpenShift specified when
   * creating the cluster.
   * @property {string} [clusterVersion] Version of OpenShift specified when
   * creating the cluster.
   * @property {string} [publicHostname] Service generated FQDN for OpenShift
   * API server.
   * @property {string} [fqdn] Service generated FQDN for OpenShift API server
   * loadbalancer internal hostname.
   * @property {object} [networkProfile] Configuration for OpenShift
   * networking.
   * @property {string} [networkProfile.vnetCidr] CIDR for the OpenShift Vnet.
   * @property {string} [networkProfile.peerVnetId] CIDR of the Vnet to peer.
   * @property {string} [networkProfile.vnetId] ID of the Vnet created for OSA
   * cluster.
   * @property {array} [routerProfiles] Configuration for OpenShift router(s).
   * @property {object} [masterPoolProfile] Configuration for OpenShift master
   * VMs.
   * @property {string} [masterPoolProfile.name] Unique name of the master pool
   * profile in the context of the subscription and resource group.
   * @property {number} [masterPoolProfile.count] Number of masters (VMs) to
   * host docker containers. The default value is 3.
   * @property {string} [masterPoolProfile.vmSize] Size of agent VMs. Possible
   * values include: 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3',
   * 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3',
   * 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2',
   * 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2',
   * 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3',
   * 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3',
   * 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3',
   * 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2',
   * 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s',
   * 'Standard_L16s', 'Standard_L32s'
   * @property {string} [masterPoolProfile.subnetCidr] Subnet CIDR for the
   * peering.
   * @property {string} [masterPoolProfile.osType] OsType to be used to specify
   * os type. Choose from Linux and Windows. Default to Linux. Possible values
   * include: 'Linux', 'Windows'
   * @property {array} [agentPoolProfiles] Configuration of OpenShift cluster
   * VMs.
   * @property {object} [authProfile] Configures OpenShift authentication.
   * @property {array} [authProfile.identityProviders] Type of authentication
   * profile to use.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of OpenShiftManagedCluster
   *
   * @returns {object} metadata of OpenShiftManagedCluster
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OpenShiftManagedCluster',
      type: {
        name: 'Composite',
        className: 'OpenShiftManagedCluster',
        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'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          plan: {
            required: false,
            serializedName: 'plan',
            type: {
              name: 'Composite',
              className: 'PurchasePlan'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          openShiftVersion: {
            required: true,
            serializedName: 'properties.openShiftVersion',
            type: {
              name: 'String'
            }
          },
          clusterVersion: {
            required: false,
            readOnly: true,
            serializedName: 'properties.clusterVersion',
            type: {
              name: 'String'
            }
          },
          publicHostname: {
            required: false,
            readOnly: true,
            serializedName: 'properties.publicHostname',
            type: {
              name: 'String'
            }
          },
          fqdn: {
            required: false,
            readOnly: true,
            serializedName: 'properties.fqdn',
            type: {
              name: 'String'
            }
          },
          networkProfile: {
            required: false,
            serializedName: 'properties.networkProfile',
            type: {
              name: 'Composite',
              className: 'NetworkProfile'
            }
          },
          routerProfiles: {
            required: false,
            serializedName: 'properties.routerProfiles',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'OpenShiftRouterProfileElementType',
                  type: {
                    name: 'Composite',
                    className: 'OpenShiftRouterProfile'
                  }
              }
            }
          },
          masterPoolProfile: {
            required: false,
            serializedName: 'properties.masterPoolProfile',
            type: {
              name: 'Composite',
              className: 'OpenShiftManagedClusterMasterPoolProfile'
            }
          },
          agentPoolProfiles: {
            required: false,
            serializedName: 'properties.agentPoolProfiles',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'OpenShiftManagedClusterAgentPoolProfileElementType',
                  type: {
                    name: 'Composite',
                    className: 'OpenShiftManagedClusterAgentPoolProfile'
                  }
              }
            }
          },
          authProfile: {
            required: false,
            serializedName: 'properties.authProfile',
            type: {
              name: 'Composite',
              className: 'OpenShiftManagedClusterAuthProfile'
            }
          }
        }
      }
    };
  }
}

module.exports = OpenShiftManagedCluster;
