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

/**
 * User crendentials used for publishing activity.
 *
 * @extends models['ProxyOnlyResource']
 */
class Deployment extends models['ProxyOnlyResource'] {
  /**
   * Create a Deployment.
   * @member {number} [status] Deployment status.
   * @member {string} [message] Details about deployment status.
   * @member {string} [author] Who authored the deployment.
   * @member {string} [deployer] Who performed the deployment.
   * @member {string} [authorEmail] Author email.
   * @member {date} [startTime] Start time.
   * @member {date} [endTime] End time.
   * @member {boolean} [active] True if deployment is currently active, false
   * if completed and null if not started.
   * @member {string} [details] Details on deployment.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Deployment
   *
   * @returns {object} metadata of Deployment
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Deployment',
      type: {
        name: 'Composite',
        className: 'Deployment',
        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'
            }
          },
          status: {
            required: false,
            serializedName: 'properties.status',
            type: {
              name: 'Number'
            }
          },
          message: {
            required: false,
            serializedName: 'properties.message',
            type: {
              name: 'String'
            }
          },
          author: {
            required: false,
            serializedName: 'properties.author',
            type: {
              name: 'String'
            }
          },
          deployer: {
            required: false,
            serializedName: 'properties.deployer',
            type: {
              name: 'String'
            }
          },
          authorEmail: {
            required: false,
            serializedName: 'properties.author_email',
            type: {
              name: 'String'
            }
          },
          startTime: {
            required: false,
            serializedName: 'properties.start_time',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            serializedName: 'properties.end_time',
            type: {
              name: 'DateTime'
            }
          },
          active: {
            required: false,
            serializedName: 'properties.active',
            type: {
              name: 'Boolean'
            }
          },
          details: {
            required: false,
            serializedName: 'properties.details',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Deployment;
