/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ExtendedLocation != null)
     {
         ExtendedLocation.Validate();
     }
     if (PrivateEndpoint != null)
     {
         PrivateEndpoint.Validate();
     }
     if (IpConfigurations != null)
     {
         foreach (var element in IpConfigurations)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (TapConfigurations != null)
     {
         foreach (var element1 in TapConfigurations)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (PrivateLinkService != null)
     {
         PrivateLinkService.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the NetworkInterface class.
 /// </summary>
 /// <param name="id">Resource ID.</param>
 /// <param name="name">Resource name.</param>
 /// <param name="type">Resource type.</param>
 /// <param name="location">Resource location.</param>
 /// <param name="tags">Resource tags.</param>
 /// <param name="extendedLocation">The extended location of the network
 /// interface.</param>
 /// <param name="virtualMachine">The reference to a virtual
 /// machine.</param>
 /// <param name="networkSecurityGroup">The reference to the
 /// NetworkSecurityGroup resource.</param>
 /// <param name="privateEndpoint">A reference to the private endpoint
 /// to which the network interface is linked.</param>
 /// <param name="ipConfigurations">A list of IPConfigurations of the
 /// network interface.</param>
 /// <param name="tapConfigurations">A list of TapConfigurations of the
 /// network interface.</param>
 /// <param name="dnsSettings">The DNS settings in network
 /// interface.</param>
 /// <param name="macAddress">The MAC address of the network
 /// interface.</param>
 /// <param name="primary">Whether this is a primary network interface
 /// on a virtual machine.</param>
 /// <param name="enableAcceleratedNetworking">If the network interface
 /// is accelerated networking enabled.</param>
 /// <param name="enableIPForwarding">Indicates whether IP forwarding is
 /// enabled on this network interface.</param>
 /// <param name="hostedWorkloads">A list of references to linked
 /// BareMetal resources.</param>
 /// <param name="dscpConfiguration">A reference to the dscp
 /// configuration to which the network interface is linked.</param>
 /// <param name="resourceGuid">The resource GUID property of the
 /// network interface resource.</param>
 /// <param name="provisioningState">The provisioning state of the
 /// network interface resource. Possible values include: 'Succeeded',
 /// 'Updating', 'Deleting', 'Failed'</param>
 /// <param name="nicType">Type of Network Interface resource. Possible
 /// values include: 'Standard', 'Elastic'</param>
 /// <param name="privateLinkService">Privatelinkservice of the network
 /// interface resource.</param>
 /// <param name="migrationPhase">Migration phase of Network Interface
 /// resource. Possible values include: 'None', 'Prepare', 'Commit',
 /// 'Abort', 'Committed'</param>
 /// <param name="etag">A unique read-only string that changes whenever
 /// the resource is updated.</param>
 public NetworkInterface(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), ExtendedLocation extendedLocation = default(ExtendedLocation), SubResource virtualMachine = default(SubResource), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), IList <NetworkInterfaceIPConfiguration> ipConfigurations = default(IList <NetworkInterfaceIPConfiguration>), IList <NetworkInterfaceTapConfiguration> tapConfigurations = default(IList <NetworkInterfaceTapConfiguration>), NetworkInterfaceDnsSettings dnsSettings = default(NetworkInterfaceDnsSettings), string macAddress = default(string), bool?primary = default(bool?), bool?enableAcceleratedNetworking = default(bool?), bool?enableIPForwarding = default(bool?), IList <string> hostedWorkloads = default(IList <string>), SubResource dscpConfiguration = default(SubResource), string resourceGuid = default(string), string provisioningState = default(string), string nicType = default(string), PrivateLinkService privateLinkService = default(PrivateLinkService), string migrationPhase = default(string), string etag = default(string))
     : base(id, name, type, location, tags)
 {
     ExtendedLocation     = extendedLocation;
     VirtualMachine       = virtualMachine;
     NetworkSecurityGroup = networkSecurityGroup;
     PrivateEndpoint      = privateEndpoint;
     IpConfigurations     = ipConfigurations;
     TapConfigurations    = tapConfigurations;
     DnsSettings          = dnsSettings;
     MacAddress           = macAddress;
     Primary = primary;
     EnableAcceleratedNetworking = enableAcceleratedNetworking;
     EnableIPForwarding          = enableIPForwarding;
     HostedWorkloads             = hostedWorkloads;
     DscpConfiguration           = dscpConfiguration;
     ResourceGuid       = resourceGuid;
     ProvisioningState  = provisioningState;
     NicType            = nicType;
     PrivateLinkService = privateLinkService;
     MigrationPhase     = migrationPhase;
     Etag = etag;
     CustomInit();
 }