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

/**
 * Provider details.
 *
 * @extends models['Resource']
 */
class RecoveryServicesProvider extends models['Resource'] {
  /**
   * Create a RecoveryServicesProvider.
   * @member {object} [properties] Provider properties.
   * @member {string} [properties.fabricType] Type of the site.
   * @member {string} [properties.friendlyName] Friendly name of the DRA.
   * @member {string} [properties.providerVersion] The provider version.
   * @member {string} [properties.serverVersion] The fabric provider.
   * @member {string} [properties.providerVersionState] DRA version status.
   * @member {date} [properties.providerVersionExpiryDate] Expiry date of the
   * version.
   * @member {string} [properties.fabricFriendlyName] The fabric friendly name.
   * @member {date} [properties.lastHeartBeat] Time when last heartbeat was
   * sent by the DRA.
   * @member {string} [properties.connectionStatus] A value indicating whether
   * DRA is responsive.
   * @member {number} [properties.protectedItemCount] Number of protected VMs
   * currently managed by the DRA.
   * @member {array} [properties.allowedScenarios] The scenarios allowed on
   * this provider.
   * @member {array} [properties.healthErrorDetails] The recovery services
   * provider health error details.
   * @member {string} [properties.draIdentifier] The DRA Id.
   * @member {object} [properties.identityDetails] The identity details.
   * @member {string} [properties.identityDetails.identityProviderType] The
   * identity provider type. Value is the ToString() of a IdentityProviderType
   * value. Possible values include: 'RecoveryServicesActiveDirectory'
   * @member {string} [properties.identityDetails.tenantId] The tenant Id for
   * the service principal with which the on-premise management/data plane
   * components would communicate with our Azure services.
   * @member {string} [properties.identityDetails.applicationId] The
   * application/client Id for the service principal with which the on-premise
   * management/data plane components would communicate with our Azure
   * services.
   * @member {string} [properties.identityDetails.objectId] The object Id of
   * the service principal with which the on-premise management/data plane
   * components would communicate with our Azure services.
   * @member {string} [properties.identityDetails.audience] The intended
   * Audience of the service principal with which the on-premise
   * management/data plane components would communicate with our Azure
   * services.
   * @member {string} [properties.identityDetails.aadAuthority] The base
   * authority for Azure Active Directory authentication.
   * @member {string} [properties.identityDetails.certificateThumbprint] The
   * certificate thumbprint. Applicable only if IdentityProviderType is
   * RecoveryServicesActiveDirectory.
   * @member {object} [properties.providerVersionDetails] The provider version
   * details.
   * @member {string} [properties.providerVersionDetails.version] The agent
   * version.
   * @member {date} [properties.providerVersionDetails.expiryDate] Version
   * expiry date.
   * @member {string} [properties.providerVersionDetails.status] A value
   * indicating whether security update required. Possible values include:
   * 'Supported', 'NotSupported', 'Deprecated', 'UpdateRequired',
   * 'SecurityUpdateRequired'
   */
  constructor() {
    super();
  }

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

module.exports = RecoveryServicesProvider;
