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

/**
 * IP configuration profile child resource.
 *
 * @extends models['SubResource']
 */
class IPConfigurationProfile extends models['SubResource'] {
  /**
   * Create a IPConfigurationProfile.
   * @property {object} [subnet] The reference of the subnet resource to create
   * a container network interface ip configuration.
   * @property {string} [subnet.addressPrefix] The address prefix for the
   * subnet.
   * @property {array} [subnet.addressPrefixes] List of  address prefixes for
   * the subnet.
   * @property {object} [subnet.networkSecurityGroup] The reference of the
   * NetworkSecurityGroup resource.
   * @property {array} [subnet.networkSecurityGroup.securityRules] A collection
   * of security rules of the network security group.
   * @property {array} [subnet.networkSecurityGroup.defaultSecurityRules] The
   * default security rules of network security group.
   * @property {array} [subnet.networkSecurityGroup.networkInterfaces] A
   * collection of references to network interfaces.
   * @property {array} [subnet.networkSecurityGroup.subnets] A collection of
   * references to subnets.
   * @property {string} [subnet.networkSecurityGroup.resourceGuid] The resource
   * GUID property of the network security group resource.
   * @property {string} [subnet.networkSecurityGroup.provisioningState] The
   * provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [subnet.networkSecurityGroup.etag] A unique read-only
   * string that changes whenever the resource is updated.
   * @property {object} [subnet.routeTable] The reference of the RouteTable
   * resource.
   * @property {array} [subnet.routeTable.routes] Collection of routes
   * contained within a route table.
   * @property {array} [subnet.routeTable.subnets] A collection of references
   * to subnets.
   * @property {boolean} [subnet.routeTable.disableBgpRoutePropagation] Gets or
   * sets whether to disable the routes learned by BGP on that route table.
   * True means disable.
   * @property {string} [subnet.routeTable.provisioningState] The provisioning
   * state of the resource. Possible values are: 'Updating', 'Deleting', and
   * 'Failed'.
   * @property {string} [subnet.routeTable.etag] Gets a unique read-only string
   * that changes whenever the resource is updated.
   * @property {object} [subnet.natGateway] Nat gateway associated with this
   * subnet.
   * @property {string} [subnet.natGateway.id] Resource ID.
   * @property {array} [subnet.serviceEndpoints] An array of service endpoints.
   * @property {array} [subnet.serviceEndpointPolicies] An array of service
   * endpoint policies.
   * @property {array} [subnet.interfaceEndpoints] An array of references to
   * interface endpoints
   * @property {array} [subnet.ipConfigurations] Gets an array of references to
   * the network interface IP configurations using subnet.
   * @property {array} [subnet.ipConfigurationProfiles] Array of IP
   * configuration profiles which reference this subnet.
   * @property {array} [subnet.resourceNavigationLinks] Gets an array of
   * references to the external resources using subnet.
   * @property {array} [subnet.serviceAssociationLinks] Gets an array of
   * references to services injecting into this subnet.
   * @property {array} [subnet.delegations] Gets an array of references to the
   * delegations on the subnet.
   * @property {string} [subnet.purpose] A read-only string identifying the
   * intention of use for this subnet based on delegations and other
   * user-defined properties.
   * @property {string} [subnet.provisioningState] The provisioning state of
   * the resource.
   * @property {string} [subnet.name] The name of the resource that is unique
   * within a resource group. This name can be used to access the resource.
   * @property {string} [subnet.etag] A unique read-only string that changes
   * whenever the resource is updated.
   * @property {string} [provisioningState] The provisioning state of the
   * resource.
   * @property {string} [name] The name of the resource. This name can be used
   * to access the resource.
   * @property {string} [type] Sub Resource type.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of IPConfigurationProfile
   *
   * @returns {object} metadata of IPConfigurationProfile
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'IPConfigurationProfile',
      type: {
        name: 'Composite',
        className: 'IPConfigurationProfile',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          subnet: {
            required: false,
            serializedName: 'properties.subnet',
            type: {
              name: 'Composite',
              className: 'Subnet'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = IPConfigurationProfile;
