com.yahoo.athenz.msd.TransportPolicyRequest Maven / Gradle / Ivy
The newest version!
//
// This file generated by rdl 1.5.2. Do not modify!
//
package com.yahoo.athenz.msd;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.List;
import com.yahoo.rdl.*;
//
// TransportPolicyRequest - Input to create a transport policy
//
@JsonIgnoreProperties(ignoreUnknown = true)
public class TransportPolicyRequest {
public TransportPolicyTrafficDirection direction;
public String identifier;
public TransportPolicySubject subject;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List conditions;
public List sourcePorts;
public List destinationPorts;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List peers;
public TransportPolicyRequest setDirection(TransportPolicyTrafficDirection direction) {
this.direction = direction;
return this;
}
public TransportPolicyTrafficDirection getDirection() {
return direction;
}
public TransportPolicyRequest setIdentifier(String identifier) {
this.identifier = identifier;
return this;
}
public String getIdentifier() {
return identifier;
}
public TransportPolicyRequest setSubject(TransportPolicySubject subject) {
this.subject = subject;
return this;
}
public TransportPolicySubject getSubject() {
return subject;
}
public TransportPolicyRequest setConditions(List conditions) {
this.conditions = conditions;
return this;
}
public List getConditions() {
return conditions;
}
public TransportPolicyRequest setSourcePorts(List sourcePorts) {
this.sourcePorts = sourcePorts;
return this;
}
public List getSourcePorts() {
return sourcePorts;
}
public TransportPolicyRequest setDestinationPorts(List destinationPorts) {
this.destinationPorts = destinationPorts;
return this;
}
public List getDestinationPorts() {
return destinationPorts;
}
public TransportPolicyRequest setPeers(List peers) {
this.peers = peers;
return this;
}
public List getPeers() {
return peers;
}
@Override
public boolean equals(Object another) {
if (this != another) {
if (another == null || another.getClass() != TransportPolicyRequest.class) {
return false;
}
TransportPolicyRequest a = (TransportPolicyRequest) another;
if (direction == null ? a.direction != null : !direction.equals(a.direction)) {
return false;
}
if (identifier == null ? a.identifier != null : !identifier.equals(a.identifier)) {
return false;
}
if (subject == null ? a.subject != null : !subject.equals(a.subject)) {
return false;
}
if (conditions == null ? a.conditions != null : !conditions.equals(a.conditions)) {
return false;
}
if (sourcePorts == null ? a.sourcePorts != null : !sourcePorts.equals(a.sourcePorts)) {
return false;
}
if (destinationPorts == null ? a.destinationPorts != null : !destinationPorts.equals(a.destinationPorts)) {
return false;
}
if (peers == null ? a.peers != null : !peers.equals(a.peers)) {
return false;
}
}
return true;
}
}