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

/**
 * Namespace/ServiceBus Connection String
 *
 */
class AccessKeys {
  /**
   * Create a AccessKeys.
   * @property {string} [primaryConnectionString] Primary connection string of
   * the created namespace authorization rule.
   * @property {string} [secondaryConnectionString] Secondary connection string
   * of the created namespace authorization rule.
   * @property {string} [aliasPrimaryConnectionString] Primary connection
   * string of the alias if GEO DR is enabled
   * @property {string} [aliasSecondaryConnectionString] Secondary  connection
   * string of the alias if GEO DR is enabled
   * @property {string} [primaryKey] A base64-encoded 256-bit primary key for
   * signing and validating the SAS token.
   * @property {string} [secondaryKey] A base64-encoded 256-bit primary key for
   * signing and validating the SAS token.
   * @property {string} [keyName] A string that describes the authorization
   * rule.
   */
  constructor() {
  }

  /**
   * Defines the metadata of AccessKeys
   *
   * @returns {object} metadata of AccessKeys
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AccessKeys',
      type: {
        name: 'Composite',
        className: 'AccessKeys',
        modelProperties: {
          primaryConnectionString: {
            required: false,
            readOnly: true,
            serializedName: 'primaryConnectionString',
            type: {
              name: 'String'
            }
          },
          secondaryConnectionString: {
            required: false,
            readOnly: true,
            serializedName: 'secondaryConnectionString',
            type: {
              name: 'String'
            }
          },
          aliasPrimaryConnectionString: {
            required: false,
            readOnly: true,
            serializedName: 'aliasPrimaryConnectionString',
            type: {
              name: 'String'
            }
          },
          aliasSecondaryConnectionString: {
            required: false,
            readOnly: true,
            serializedName: 'aliasSecondaryConnectionString',
            type: {
              name: 'String'
            }
          },
          primaryKey: {
            required: false,
            readOnly: true,
            serializedName: 'primaryKey',
            type: {
              name: 'String'
            }
          },
          secondaryKey: {
            required: false,
            readOnly: true,
            serializedName: 'secondaryKey',
            type: {
              name: 'String'
            }
          },
          keyName: {
            required: false,
            readOnly: true,
            serializedName: 'keyName',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = AccessKeys;
