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

/**
 * Results from invoking a PowerShell command.
 *
 */
class PowerShellCommandResult {
  /**
   * Create a PowerShellCommandResult.
   * @member {number} [messageType] The type of message.
   * @member {string} [foregroundColor] The HTML color string representing the
   * foreground color.
   * @member {string} [backgroundColor] The HTML color string representing the
   * background color.
   * @member {string} [value] Actual result text from the PowerShell Command.
   * @member {string} [prompt] The interactive prompt message.
   * @member {number} [exitCode] The exit code from a executable that was
   * called from PowerShell.
   * @member {number} [id] ID of the prompt message.
   * @member {string} [caption] Text that precedes the prompt.
   * @member {string} [message] Text of the prompt.
   * @member {array} [descriptions] Collection of PromptFieldDescription
   * objects that contains the user input.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PowerShellCommandResult
   *
   * @returns {object} metadata of PowerShellCommandResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PowerShellCommandResult',
      type: {
        name: 'Composite',
        className: 'PowerShellCommandResult',
        modelProperties: {
          messageType: {
            required: false,
            serializedName: 'messageType',
            type: {
              name: 'Number'
            }
          },
          foregroundColor: {
            required: false,
            serializedName: 'foregroundColor',
            type: {
              name: 'String'
            }
          },
          backgroundColor: {
            required: false,
            serializedName: 'backgroundColor',
            type: {
              name: 'String'
            }
          },
          value: {
            required: false,
            serializedName: 'value',
            type: {
              name: 'String'
            }
          },
          prompt: {
            required: false,
            serializedName: 'prompt',
            type: {
              name: 'String'
            }
          },
          exitCode: {
            required: false,
            serializedName: 'exitCode',
            type: {
              name: 'Number'
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'Number'
            }
          },
          caption: {
            required: false,
            serializedName: 'caption',
            type: {
              name: 'String'
            }
          },
          message: {
            required: false,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          descriptions: {
            required: false,
            serializedName: 'descriptions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PromptFieldDescriptionElementType',
                  type: {
                    name: 'Composite',
                    className: 'PromptFieldDescription'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = PowerShellCommandResult;
