/*
 * 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 0.16.0.0
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the GatewayResource class.
 * @constructor
 * @member {date} [created] UTC date and time when gateway was first added to
 * management service
 * 
 * @member {date} [updated] UTC date and time when node was last updated
 * 
 * @member {string} [autoUpgrade] setting of the autoupgrade. Possible values
 * include: 'On', 'Off'
 * 
 * @member {string} [desiredVersion] latest available msi version
 * 
 * @member {array} [instances] names of the nodes in the gateway
 * 
 * @member {number} [activeMessageCount] number of active messages
 * 
 * @member {string} [latestPublishedMsiVersion] last published msi version
 * 
 * @member {date} [publishedTimeUtc] the date/time of the last published
 * gateway
 * 
 */
function GatewayResource() {
  GatewayResource['super_'].call(this);
}

util.inherits(GatewayResource, models['Resource']);

/**
 * Defines the metadata of GatewayResource
 *
 * @returns {object} metadata of GatewayResource
 *
 */
GatewayResource.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'GatewayResource',
    type: {
      name: 'Composite',
      className: 'GatewayResource',
      modelProperties: {
        id: {
          required: false,
          readOnly: true,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        type: {
          required: false,
          readOnly: true,
          serializedName: 'type',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          readOnly: true,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        location: {
          required: false,
          readOnly: true,
          serializedName: 'location',
          type: {
            name: 'String'
          }
        },
        tags: {
          required: false,
          serializedName: 'tags',
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        etag: {
          required: false,
          serializedName: 'etag',
          type: {
            name: 'String'
          }
        },
        created: {
          required: false,
          serializedName: 'properties.created',
          type: {
            name: 'DateTime'
          }
        },
        updated: {
          required: false,
          serializedName: 'properties.updated',
          type: {
            name: 'DateTime'
          }
        },
        autoUpgrade: {
          required: false,
          serializedName: 'properties.autoUpgrade',
          type: {
            name: 'Enum',
            allowedValues: [ 'On', 'Off' ]
          }
        },
        desiredVersion: {
          required: false,
          serializedName: 'properties.desiredVersion',
          type: {
            name: 'String'
          }
        },
        instances: {
          required: false,
          serializedName: 'properties.instances',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'GatewayStatusElementType',
                type: {
                  name: 'Composite',
                  className: 'GatewayStatus'
                }
            }
          }
        },
        activeMessageCount: {
          required: false,
          serializedName: 'properties.activeMessageCount',
          type: {
            name: 'Number'
          }
        },
        latestPublishedMsiVersion: {
          required: false,
          serializedName: 'properties.latestPublishedMsiVersion',
          type: {
            name: 'String'
          }
        },
        publishedTimeUtc: {
          required: false,
          serializedName: 'properties.publishedTimeUtc',
          type: {
            name: 'DateTime'
          }
        }
      }
    }
  };
};

module.exports = GatewayResource;
