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

/**
 * Certificate order action.
 *
 * @extends models['ProxyOnlyResource']
 */
class CertificateOrderAction extends models['ProxyOnlyResource'] {
  /**
   * Create a CertificateOrderAction.
   * @member {string} [actionType] Action type. Possible values include:
   * 'CertificateIssued', 'CertificateOrderCanceled',
   * 'CertificateOrderCreated', 'CertificateRevoked',
   * 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange',
   * 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired',
   * 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown'
   * @member {date} [createdAt] Time at which the certificate action was
   * performed.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of CertificateOrderAction
   *
   * @returns {object} metadata of CertificateOrderAction
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CertificateOrderAction',
      type: {
        name: 'Composite',
        className: 'CertificateOrderAction',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          actionType: {
            required: false,
            readOnly: true,
            serializedName: 'properties.actionType',
            type: {
              name: 'Enum',
              allowedValues: [ 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' ]
            }
          },
          createdAt: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdAt',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = CertificateOrderAction;
