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

/**
 * Replication protected item custom data details.
 *
 */
class ProtectableItemProperties {
  /**
   * Create a ProtectableItemProperties.
   * @member {string} [friendlyName] The name.
   * @member {string} [protectionStatus] The protection status.
   * @member {string} [replicationProtectedItemId] The ARM resource of
   * protected items.
   * @member {string} [recoveryServicesProviderId] The recovery provider ARM
   * Id.
   * @member {array} [protectionReadinessErrors] The Current protection
   * readiness errors.
   * @member {array} [supportedReplicationProviders] The list of replication
   * providers supported for the protectable item.
   * @member {object} [customDetails] The Replication provider custom settings.
   * @member {string} [customDetails.instanceType] Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of ProtectableItemProperties
   *
   * @returns {object} metadata of ProtectableItemProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ProtectableItemProperties',
      type: {
        name: 'Composite',
        className: 'ProtectableItemProperties',
        modelProperties: {
          friendlyName: {
            required: false,
            serializedName: 'friendlyName',
            type: {
              name: 'String'
            }
          },
          protectionStatus: {
            required: false,
            serializedName: 'protectionStatus',
            type: {
              name: 'String'
            }
          },
          replicationProtectedItemId: {
            required: false,
            serializedName: 'replicationProtectedItemId',
            type: {
              name: 'String'
            }
          },
          recoveryServicesProviderId: {
            required: false,
            serializedName: 'recoveryServicesProviderId',
            type: {
              name: 'String'
            }
          },
          protectionReadinessErrors: {
            required: false,
            serializedName: 'protectionReadinessErrors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          supportedReplicationProviders: {
            required: false,
            serializedName: 'supportedReplicationProviders',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          customDetails: {
            required: false,
            serializedName: 'customDetails',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'instanceType',
                clientName: 'instanceType'
              },
              uberParent: 'ConfigurationSettings',
              className: 'ConfigurationSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = ProtectableItemProperties;
