2017-10-19 19:53:02 +00:00
|
|
|
// <auto-generated>
|
|
|
|
|
// Code generated by Microsoft (R) AutoRest Code Generator.
|
|
|
|
|
// Changes may cause incorrect behavior and will be lost if the code is
|
|
|
|
|
// regenerated.
|
|
|
|
|
// </auto-generated>
|
|
|
|
|
|
|
|
|
|
namespace k8s.Models
|
|
|
|
|
{
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 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.
|
|
|
|
|
/// </summary>
|
2017-11-24 12:10:51 +08:00
|
|
|
public partial class V1NetworkPolicyIngressRule
|
2017-10-19 19:53:02 +00:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2017-11-24 12:10:51 +08:00
|
|
|
/// Initializes a new instance of the V1NetworkPolicyIngressRule class.
|
2017-10-19 19:53:02 +00:00
|
|
|
/// </summary>
|
2017-11-24 12:10:51 +08:00
|
|
|
public V1NetworkPolicyIngressRule()
|
2017-10-19 19:53:02 +00:00
|
|
|
{
|
|
|
|
|
CustomInit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-11-24 12:10:51 +08:00
|
|
|
/// Initializes a new instance of the V1NetworkPolicyIngressRule class.
|
2017-10-19 19:53:02 +00:00
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fromProperty">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
|
2019-10-02 15:16:08 -07:00
|
|
|
/// source). If this field is present and contains at least one item,
|
2017-10-19 19:53:02 +00:00
|
|
|
/// this rule allows traffic only if the traffic matches at least one
|
|
|
|
|
/// item in the from list.</param>
|
|
|
|
|
/// <param name="ports">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.</param>
|
2017-11-24 12:10:51 +08:00
|
|
|
public V1NetworkPolicyIngressRule(IList<V1NetworkPolicyPeer> fromProperty = default(IList<V1NetworkPolicyPeer>), IList<V1NetworkPolicyPort> ports = default(IList<V1NetworkPolicyPort>))
|
2017-10-19 19:53:02 +00:00
|
|
|
{
|
|
|
|
|
FromProperty = fromProperty;
|
|
|
|
|
Ports = ports;
|
|
|
|
|
CustomInit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// An initialization method that performs custom operations like setting defaults
|
|
|
|
|
/// </summary>
|
|
|
|
|
partial void CustomInit();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 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
|
2019-10-02 15:16:08 -07:00
|
|
|
/// this field is present and contains at least one item, this rule
|
2017-10-19 19:53:02 +00:00
|
|
|
/// allows traffic only if the traffic matches at least one item in the
|
|
|
|
|
/// from list.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty(PropertyName = "from")]
|
2017-11-24 12:10:51 +08:00
|
|
|
public IList<V1NetworkPolicyPeer> FromProperty { get; set; }
|
2017-10-19 19:53:02 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 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.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty(PropertyName = "ports")]
|
2017-11-24 12:10:51 +08:00
|
|
|
public IList<V1NetworkPolicyPort> Ports { get; set; }
|
2017-10-19 19:53:02 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|