// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. // namespace k8s.Models { using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.Linq; /// /// NetworkPolicyIngressRule describes a particular set of traffic that is /// allowed to the pods matched by a NetworkPolicySpec's podSelector. The /// traffic must match both ports and from. /// public partial class V1NetworkPolicyIngressRule { /// /// Initializes a new instance of the V1NetworkPolicyIngressRule class. /// public V1NetworkPolicyIngressRule() { CustomInit(); } /// /// Initializes a new instance of the V1NetworkPolicyIngressRule class. /// /// List of sources which should be able to /// access the pods selected for this rule. Items in this list are /// combined using a logical OR operation. If this field is empty or /// missing, this rule matches all sources (traffic not restricted by /// source). If this field is present and contains at least on item, /// this rule allows traffic only if the traffic matches at least one /// item in the from list. /// List of ports which should be made accessible /// on the pods selected for this rule. Each item in this list is /// combined using a logical OR. If this field is empty or missing, /// this rule matches all ports (traffic not restricted by port). If /// this field is present and contains at least one item, then this /// rule allows traffic only if the traffic matches at least one port /// in the list. public V1NetworkPolicyIngressRule(IList fromProperty = default(IList), IList ports = default(IList)) { FromProperty = fromProperty; Ports = ports; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets list of sources which should be able to access the /// pods selected for this rule. Items in this list are combined using /// a logical OR operation. If this field is empty or missing, this /// rule matches all sources (traffic not restricted by source). If /// this field is present and contains at least on item, this rule /// allows traffic only if the traffic matches at least one item in the /// from list. /// [JsonProperty(PropertyName = "from")] public IList FromProperty { get; set; } /// /// Gets or sets list of ports which should be made accessible on the /// pods selected for this rule. Each item in this list is combined /// using a logical OR. If this field is empty or missing, this rule /// matches all ports (traffic not restricted by port). If this field /// is present and contains at least one item, then this rule allows /// traffic only if the traffic matches at least one port in the list. /// [JsonProperty(PropertyName = "ports")] public IList Ports { get; set; } } }