/*
 * 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 JitNetworkAccessPolicyInitiatePort.
 */
class JitNetworkAccessPolicyInitiatePort {
  /**
   * Create a JitNetworkAccessPolicyInitiatePort.
   * @member {number} number
   * @member {string} [allowedSourceAddressPrefix] Source of the allowed
   * traffic. If omitted, the request will be for the source IP address of the
   * initiate request.
   * @member {date} endTimeUtc The time to close the request in UTC
   */
  constructor() {
  }

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

module.exports = JitNetworkAccessPolicyInitiatePort;
