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

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

/**
 * Contains information about a private link resource.
 *
 * @extends models['ProxyResource']
 */
class PrivateEndpointConnection extends models['ProxyResource'] {
  /**
   * Create a PrivateEndpointConnection.
   * @property {string} [provisioningState] The provisioning state of the
   * private endpoint connection. Possible values include: 'Succeeded',
   * 'Updating', 'Failed'
   * @property {object} [privateEndpoint] The ARM resource identifier of the
   * private endpoint.
   * @property {string} [privateEndpoint.id]
   * @property {object} [privateLinkServiceConnectionState] The private link
   * service connection state of the private endpoint connection.
   * @property {string} [privateLinkServiceConnectionState.status] Possible
   * values include: 'Approved', 'Pending', 'Rejected', 'Disconnected'
   * @property {string} [privateLinkServiceConnectionState.description]
   * @property {string} [privateLinkServiceConnectionState.actionRequired]
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of PrivateEndpointConnection
   *
   * @returns {object} metadata of PrivateEndpointConnection
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PrivateEndpointConnection',
      type: {
        name: 'Composite',
        className: 'PrivateEndpointConnection',
        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'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Succeeded', 'Updating', 'Failed' ]
            }
          },
          privateEndpoint: {
            required: false,
            serializedName: 'properties.privateEndpoint',
            type: {
              name: 'Composite',
              className: 'PrivateEndpoint'
            }
          },
          privateLinkServiceConnectionState: {
            required: false,
            serializedName: 'properties.privateLinkServiceConnectionState',
            type: {
              name: 'Composite',
              className: 'PrivateLinkServiceConnectionState'
            }
          }
        }
      }
    };
  }
}

module.exports = PrivateEndpointConnection;
