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

/**
 * Properties of integration runtime node.
 *
 */
class ManagedIntegrationRuntimeNode {
  /**
   * Create a ManagedIntegrationRuntimeNode.
   * @member {string} [nodeId] The managed integration runtime node id.
   * @member {string} [status] The managed integration runtime node status.
   * Possible values include: 'Starting', 'Available', 'Recycling',
   * 'Unavailable'
   * @member {array} [errors] The errors that occurred on this integration
   * runtime node.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ManagedIntegrationRuntimeNode
   *
   * @returns {object} metadata of ManagedIntegrationRuntimeNode
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ManagedIntegrationRuntimeNode',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        className: 'ManagedIntegrationRuntimeNode',
        modelProperties: {
          nodeId: {
            required: false,
            readOnly: true,
            serializedName: 'nodeId',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          errors: {
            required: false,
            serializedName: 'errors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ManagedIntegrationRuntimeErrorElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'ManagedIntegrationRuntimeError'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ManagedIntegrationRuntimeNode;
