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

/**
 * Managed integration runtime, including managed elastic and managed dedicated
 * integration runtimes.
 *
 * @extends models['IntegrationRuntime']
 */
class ManagedIntegrationRuntime extends models['IntegrationRuntime'] {
  /**
   * Create a ManagedIntegrationRuntime.
   * @member {string} [state] Integration runtime state, only valid for managed
   * dedicated integration runtime. Possible values include: 'Initial',
   * 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration',
   * 'Online', 'Limited', 'Offline', 'AccessDenied'
   * @member {object} [computeProperties] The compute resource for managed
   * integration runtime.
   * @member {string} [computeProperties.location] The location for managed
   * integration runtime. The supported regions could be found on
   * https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities
   * @member {string} [computeProperties.nodeSize] The node size requirement to
   * managed integration runtime.
   * @member {number} [computeProperties.numberOfNodes] The required number of
   * nodes for managed integration runtime.
   * @member {number} [computeProperties.maxParallelExecutionsPerNode] Maximum
   * parallel executions count per node for managed integration runtime.
   * @member {object} [computeProperties.vNetProperties] VNet properties for
   * managed integration runtime.
   * @member {string} [computeProperties.vNetProperties.vNetId] The ID of the
   * VNet that this integration runtime will join.
   * @member {string} [computeProperties.vNetProperties.subnet] The name of the
   * subnet this integration runtime will join.
   * @member {object} [ssisProperties] SSIS properties for managed integration
   * runtime.
   * @member {object} [ssisProperties.catalogInfo] Catalog information for
   * managed dedicated integration runtime.
   * @member {string} [ssisProperties.catalogInfo.catalogServerEndpoint] The
   * catalog database server URL.
   * @member {string} [ssisProperties.catalogInfo.catalogAdminUserName] The
   * administrator user name of catalog database.
   * @member {object} [ssisProperties.catalogInfo.catalogAdminPassword] The
   * password of the administrator user account of the catalog database.
   * @member {string} [ssisProperties.catalogInfo.catalogAdminPassword.value]
   * Value of secure string.
   * @member {string} [ssisProperties.catalogInfo.catalogPricingTier] The
   * pricing tier for the catalog database. The valid values could be found in
   * https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible
   * values include: 'Basic', 'Standard', 'Premium', 'PremiumRS'
   * @member {string} [ssisProperties.licenseType] License type for bringing
   * your own license scenario. Possible values include: 'BasePrice',
   * 'LicenseIncluded'
   * @member {object} [ssisProperties.customSetupScriptProperties] Custom setup
   * script properties for a managed dedicated integration runtime.
   * @member {string}
   * [ssisProperties.customSetupScriptProperties.blobContainerUri] The URI of
   * the Azure blob container that contains the custom setup script.
   * @member {object} [ssisProperties.customSetupScriptProperties.sasToken] The
   * SAS token of the Azure blob container.
   * @member {string}
   * [ssisProperties.customSetupScriptProperties.sasToken.value] Value of
   * secure string.
   * @member {string} [ssisProperties.edition] The edition for the SSIS
   * Integration Runtime. Possible values include: 'Standard', 'Enterprise'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ManagedIntegrationRuntime
   *
   * @returns {object} metadata of ManagedIntegrationRuntime
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Managed',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'IntegrationRuntime',
        className: 'ManagedIntegrationRuntime',
        modelProperties: {
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'state',
            type: {
              name: 'String'
            }
          },
          computeProperties: {
            required: false,
            serializedName: 'typeProperties.computeProperties',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'IntegrationRuntimeComputeProperties'
            }
          },
          ssisProperties: {
            required: false,
            serializedName: 'typeProperties.ssisProperties',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'IntegrationRuntimeSsisProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = ManagedIntegrationRuntime;
