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

/**
 * Class representing a JitNetworkAccessRequestPort.
 */
class JitNetworkAccessRequestPort {
  /**
   * Create a JitNetworkAccessRequestPort.
   * @member {number} number
   * @member {string} [allowedSourceAddressPrefix] Mutually exclusive with the
   * "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR,
   * for example "192.168.0.3" or "192.168.0.0/16".
   * @member {array} [allowedSourceAddressPrefixes] Mutually exclusive with the
   * "allowedSourceAddressPrefix" parameter.
   * @member {date} endTimeUtc The date & time at which the request ends in UTC
   * @member {string} status The status of the port. Possible values include:
   * 'Revoked', 'Initiated'
   * @member {string} statusReason A description of why the `status` has its
   * value. Possible values include: 'Expired', 'UserRequested',
   * 'NewerRequestInitiated'
   */
  constructor() {
  }

  /**
   * Defines the metadata of JitNetworkAccessRequestPort
   *
   * @returns {object} metadata of JitNetworkAccessRequestPort
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'JitNetworkAccessRequestPort',
      type: {
        name: 'Composite',
        className: 'JitNetworkAccessRequestPort',
        modelProperties: {
          number: {
            required: true,
            serializedName: 'number',
            type: {
              name: 'Number'
            }
          },
          allowedSourceAddressPrefix: {
            required: false,
            serializedName: 'allowedSourceAddressPrefix',
            type: {
              name: 'String'
            }
          },
          allowedSourceAddressPrefixes: {
            required: false,
            serializedName: 'allowedSourceAddressPrefixes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          endTimeUtc: {
            required: true,
            serializedName: 'endTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          status: {
            required: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          statusReason: {
            required: true,
            serializedName: 'statusReason',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = JitNetworkAccessRequestPort;
