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

/**
 * Web activity authentication properties.
 *
 */
class WebActivityAuthentication {
  /**
   * Create a WebActivityAuthentication.
   * @member {string} type Web activity authentication
   * (Basic/ClientCertificate/MSI)
   * @member {object} [pfx] Base64-encoded contents of a PFX file.
   * @member {string} [pfx.value] Value of secure string.
   * @member {string} [username] Web activity authentication user name for
   * basic authentication.
   * @member {object} [password] Password for the PFX file or basic
   * authentication.
   * @member {string} [password.value] Value of secure string.
   * @member {string} [resource] Resource for which Azure Auth token will be
   * requested when using MSI Authentication.
   */
  constructor() {
  }

  /**
   * Defines the metadata of WebActivityAuthentication
   *
   * @returns {object} metadata of WebActivityAuthentication
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'WebActivityAuthentication',
      type: {
        name: 'Composite',
        className: 'WebActivityAuthentication',
        modelProperties: {
          type: {
            required: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          pfx: {
            required: false,
            serializedName: 'pfx',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'SecretBase',
              className: 'SecureString'
            }
          },
          username: {
            required: false,
            serializedName: 'username',
            type: {
              name: 'String'
            }
          },
          password: {
            required: false,
            serializedName: 'password',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'SecretBase',
              className: 'SecureString'
            }
          },
          resource: {
            required: false,
            serializedName: 'resource',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = WebActivityAuthentication;
