/*
 * 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 JitNetworkAccessPolicy.
 */
class JitNetworkAccessPolicy {
  /**
   * Create a JitNetworkAccessPolicy.
   * @member {string} [id] Resource Id
   * @member {string} [name] Resource name
   * @member {string} [type] Resource type
   * @member {string} [kind] Kind of the resource
   * @member {string} [location] Location where the resource is stored
   * @member {array} virtualMachines Configurations for
   * Microsoft.Compute/virtualMachines resource type.
   * @member {array} [requests]
   * @member {string} [provisioningState] Gets the provisioning state of the
   * Just-in-Time policy.
   */
  constructor() {
  }

  /**
   * Defines the metadata of JitNetworkAccessPolicy
   *
   * @returns {object} metadata of JitNetworkAccessPolicy
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'JitNetworkAccessPolicy',
      type: {
        name: 'Composite',
        className: 'JitNetworkAccessPolicy',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            readOnly: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          virtualMachines: {
            required: true,
            serializedName: 'properties.virtualMachines',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'JitNetworkAccessPolicyVirtualMachineElementType',
                  type: {
                    name: 'Composite',
                    className: 'JitNetworkAccessPolicyVirtualMachine'
                  }
              }
            }
          },
          requests: {
            required: false,
            serializedName: 'properties.requests',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'JitNetworkAccessRequestElementType',
                  type: {
                    name: 'Composite',
                    className: 'JitNetworkAccessRequest'
                  }
              }
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = JitNetworkAccessPolicy;
