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

/**
 * Active Directory Key Credential information.
 *
 */
class KeyCredential {
  /**
   * Create a KeyCredential.
   * @member {date} [startDate] Start date.
   * @member {date} [endDate] End date.
   * @member {string} [value] Key value.
   * @member {string} [keyId] Key ID.
   * @member {string} [usage] Usage. Acceptable values are 'Verify' and 'Sign'.
   * @member {string} [type] Type. Acceptable values are 'AsymmetricX509Cert'
   * and 'Symmetric'.
   * @member {buffer} [customKeyIdentifier] Custom Key Identifier
   */
  constructor() {
  }

  /**
   * Defines the metadata of KeyCredential
   *
   * @returns {object} metadata of KeyCredential
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KeyCredential',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        className: 'KeyCredential',
        modelProperties: {
          startDate: {
            required: false,
            serializedName: 'startDate',
            type: {
              name: 'DateTime'
            }
          },
          endDate: {
            required: false,
            serializedName: 'endDate',
            type: {
              name: 'DateTime'
            }
          },
          value: {
            required: false,
            serializedName: 'value',
            type: {
              name: 'String'
            }
          },
          keyId: {
            required: false,
            serializedName: 'keyId',
            type: {
              name: 'String'
            }
          },
          usage: {
            required: false,
            serializedName: 'usage',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          customKeyIdentifier: {
            required: false,
            serializedName: 'customKeyIdentifier',
            type: {
              name: 'ByteArray'
            }
          }
        }
      }
    };
  }
}

module.exports = KeyCredential;
