/// <summary>
 /// Initializes a new instance of the NetworkRuleSet class.
 /// </summary>
 /// <param name="id">Resource Id</param>
 /// <param name="name">Resource name</param>
 /// <param name="type">Resource type</param>
 /// <param name="defaultAction">Default Action for Network Rule Set.
 /// Possible values include: 'Allow', 'Deny'</param>
 /// <param name="VirtualNetworkRules">List VirtualNetwork Rules</param>
 /// <param name="ipRules">List of IpRules</param>
 public PSNetworkRuleSetAttributes(NetworkRuleSet networkRuleSet)
 {
     DefaultAction       = networkRuleSet.DefaultAction;
     VirtualNetworkRules = PSNWRuleSetVirtualNetworkRulesAttributes.PSNWRuleSetVirtualNetworkRulesAttributesCollection(networkRuleSet.VirtualNetworkRules);
     IpRules             = PSNWRuleSetIpRulesAttributes.PSNWRuleSetIpRulesAttributesCollection(networkRuleSet.IpRules);
     Id   = networkRuleSet.Id;
     Name = networkRuleSet.Name;
     Type = networkRuleSet.Type;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the NetworkRuleSet class.
 /// </summary>
 /// <param name="id">Resource Id</param>
 /// <param name="name">Resource name</param>
 /// <param name="type">Resource type</param>
 /// <param name="defaultAction">Default Action for Network Rule Set.
 /// Possible values include: 'Allow', 'Deny'</param>
 /// <param name="VirtualNetworkRules">List VirtualNetwork Rules</param>
 /// <param name="ipRules">List of IpRules</param>
 public PSNetworkRuleSetAttributes(NetworkRuleSet networkRuleSet)
 {
     DefaultAction       = networkRuleSet.DefaultAction;
     VirtualNetworkRules = PSNWRuleSetVirtualNetworkRulesAttributes.PSNWRuleSetVirtualNetworkRulesAttributesCollection(networkRuleSet.VirtualNetworkRules);
     IpRules             = PSNWRuleSetIpRulesAttributes.PSNWRuleSetIpRulesAttributesCollection(networkRuleSet.IpRules);
     Id   = networkRuleSet.Id;
     Name = networkRuleSet.Name;
     Type = networkRuleSet.Type;
     PublicNetworkAccess         = networkRuleSet.PublicNetworkAccess;
     TrustedServiceAccessEnabled = networkRuleSet.TrustedServiceAccessEnabled;
 }