com.nutanix.dp1.mic.microseg.v4.config.ApplicationRuleSpec Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microseg-java-client Show documentation
Show all versions of microseg-java-client Show documentation
Manage Network Security Policy configuration of Nutanix clusters.
The newest version!
/*
* Generated file ..
*
* Product version: 4.0.1-beta-1
*
* Part of the Nutanix Microseg Versioned APIs
*
* (c) 2024 Nutanix Inc. All rights reserved
*
*/
package com.nutanix.dp1.mic.microseg.v4.config;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.AccessLevel;
import com.nutanix.devplatform.models.PrettyModeViews.*;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.stream.Collectors;
import com.nutanix.dp1.mic.deserializers.MicObjectTypeTypedObject;
import javax.validation.constraints.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.nutanix.dp1.mic.deserializers.MicDeserializerUtils.*;
/**
* A rule for specifying allowed traffic for an application.
*/
@Data
@lombok.extern.slf4j.Slf4j
public class ApplicationRuleSpec implements java.io.Serializable, MicObjectTypeTypedObject {
public ApplicationRuleSpec() {
this.$objectType = this.initialize$objectType();
this.$reserved = new java.util.LinkedHashMap<>();
this.$reserved.put("$fv", this.initialize$fv());
this.$unknownFields = new java.util.LinkedHashMap<>();
}
@lombok.Builder(builderMethodName = "ApplicationRuleSpecBuilder")
public ApplicationRuleSpec(java.util.List securedGroupCategoryReferences, com.nutanix.dp1.mic.microseg.v4.config.AllowType srcAllowSpec, com.nutanix.dp1.mic.microseg.v4.config.AllowType destAllowSpec, java.util.List srcCategoryReferences, java.util.List destCategoryReferences, com.nutanix.dp1.mic.common.v1.config.IPv4Address srcSubnet, com.nutanix.dp1.mic.common.v1.config.IPv4Address destSubnet, java.util.List srcAddressGroupReferences, java.util.List destAddressGroupReferences, java.util.List serviceGroupReferences, Boolean isAllProtocolAllowed, java.util.List tcpServices, java.util.List udpServices, java.util.List icmpServices, String networkFunctionChainReference) {
this.$objectType = this.initialize$objectType();
this.$reserved = new java.util.LinkedHashMap<>();
this.$reserved.put("$fv", this.initialize$fv());
this.$unknownFields = new java.util.LinkedHashMap<>();
this.setSecuredGroupCategoryReferences(securedGroupCategoryReferences);
this.setSrcAllowSpec(srcAllowSpec);
this.setDestAllowSpec(destAllowSpec);
this.setSrcCategoryReferences(srcCategoryReferences);
this.setDestCategoryReferences(destCategoryReferences);
this.setSrcSubnet(srcSubnet);
this.setDestSubnet(destSubnet);
this.setSrcAddressGroupReferences(srcAddressGroupReferences);
this.setDestAddressGroupReferences(destAddressGroupReferences);
this.setServiceGroupReferences(serviceGroupReferences);
this.setIsAllProtocolAllowed(isAllProtocolAllowed);
this.setTcpServices(tcpServices);
this.setUdpServices(udpServices);
this.setIcmpServices(icmpServices);
this.setNetworkFunctionChainReference(networkFunctionChainReference);
}
protected String initialize$objectType() {
return "microseg.v4.config.ApplicationRuleSpec";
}
protected String initialize$fv() {
return "v4.r0.b1";
}
@JsonAnySetter
private void setUndeserializedFields(String name, String value) {
$unknownFields.put(name, value);
}
/**
* A set of network endpoints which is protected by a Network Security Policy and defined as a list of categories.
*/
@javax.validation.constraints.Size(min = 1, max = 10)
@JsonProperty("securedGroupCategoryReferences")
public List securedGroupCategoryReferences = null;
/**
*
*/
@JsonProperty("srcAllowSpec")
public com.nutanix.dp1.mic.microseg.v4.config.AllowType srcAllowSpec = null;
/**
*
*/
@JsonProperty("destAllowSpec")
public com.nutanix.dp1.mic.microseg.v4.config.AllowType destAllowSpec = null;
/**
* List of categories that define a set of network endpoints as inbound.
*/
@javax.validation.constraints.Size(min = 1, max = 10)
@JsonProperty("srcCategoryReferences")
public List srcCategoryReferences = null;
/**
* List of categories that define a set of network endpoints as outbound.
*/
@javax.validation.constraints.Size(min = 1, max = 10)
@JsonProperty("destCategoryReferences")
public List destCategoryReferences = null;
/**
*
*/
@JsonProperty("srcSubnet")
public com.nutanix.dp1.mic.common.v1.config.IPv4Address srcSubnet = null;
/**
*
*/
@JsonProperty("destSubnet")
public com.nutanix.dp1.mic.common.v1.config.IPv4Address destSubnet = null;
/**
* A list of address group references.
*/
@javax.validation.constraints.Size(min = 1, max = 1)
@JsonProperty("srcAddressGroupReferences")
public List srcAddressGroupReferences = null;
/**
* A list of address group references.
*/
@javax.validation.constraints.Size(min = 1, max = 1)
@JsonProperty("destAddressGroupReferences")
public List destAddressGroupReferences = null;
/**
*
*/
@javax.validation.constraints.Size(min = 0, max = 160)
@JsonProperty("serviceGroupReferences")
public List serviceGroupReferences = null;
/**
* Denotes if rule allows traffic for all protocol.
*/
@JsonProperty("isAllProtocolAllowed")
public Boolean isAllProtocolAllowed = null;
/**
*
*/
@javax.validation.constraints.Size(min = 0, max = 160)
@JsonProperty("tcpServices")
public List tcpServices = null;
/**
*
*/
@javax.validation.constraints.Size(min = 0, max = 160)
@JsonProperty("udpServices")
public List udpServices = null;
/**
* Icmp Type Code List.
*/
@javax.validation.constraints.Size(min = 0, max = 160)
@JsonProperty("icmpServices")
public List icmpServices = null;
/**
* A reference to the network function chain in the rule.
*/
@javax.validation.constraints.Pattern(regexp="^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")
@JsonProperty("networkFunctionChainReference")
public String networkFunctionChainReference = null;
@Getter
@JsonView({StandardView.class})
protected final Map $reserved;
@Getter
@JsonView({StandardView.class})
protected final String $objectType;
@Getter
@JsonView({StandardView.class})
protected final Map $unknownFields;
}