com.nutanix.dp1.mic.microseg.v4.operation.PolicyMetadata 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.operation;
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.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.nutanix.dp1.mic.deserializers.MicDeserializerUtils.*;
/**
* The meta information about a Flow Network Security Policy.
* The info captures the secured Categories, state of policy, policy type, last modified time,
* previewId and options.
* The PreviewId can be used to fetch the complete FNS Next-Gen policy preview using Preview GET API.
* A sample call would look like
* ```
* /microseg/v4.0.a1/operation/policy-preview/8f094d6c-d7b2-32c2-8223-462c6c5e06db
* ```
*
*/
@Data
@lombok.extern.slf4j.Slf4j
public class PolicyMetadata implements java.io.Serializable, MicObjectTypeTypedObject {
public PolicyMetadata() {
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 = "PolicyMetadataBuilder")
public PolicyMetadata(String description, java.util.List securedGroupCategoryReferences, com.nutanix.dp1.mic.microseg.v4.config.SecurityPolicyState state, java.time.OffsetDateTime lastUpdateTime, com.nutanix.dp1.mic.microseg.v4.operation.SecurityPolicyType type, String previewReference, com.nutanix.dp1.mic.microseg.v4.operation.SecurityPolicyOptions options, String name) {
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.setDescription(description);
this.setSecuredGroupCategoryReferences(securedGroupCategoryReferences);
this.setState(state);
this.setLastUpdateTime(lastUpdateTime);
this.setType(type);
this.setPreviewReference(previewReference);
this.setOptions(options);
this.setName(name);
}
protected String initialize$objectType() {
return "microseg.v4.operation.PolicyMetadata";
}
protected String initialize$fv() {
return "v4.r0.b1";
}
@JsonAnySetter
private void setUndeserializedFields(String name, String value) {
$unknownFields.put(name, value);
}
private OffsetDateTime lastUpdateTime = null;
/**
* Last update time for the network security policy.
*/
public void setLastUpdateTime(OffsetDateTime lastUpdateTime) {
if (this.lastUpdateTime == null) {
this.lastUpdateTime = lastUpdateTime;
}
else {
log.warn("Read-only property lastUpdateTime already contains a non-null value and cannot be set again");
}
}
/**
* A user defined annotation for a policy metadata during upgrade.
*/
@javax.validation.constraints.Size(max = 512)
@JsonProperty("description")
public String description = null;
/**
* List of categories external IDs being secured by the Flow Network Security Policy.
*/
@javax.validation.constraints.Size(min = 1, max = 64)
@JsonProperty("securedGroupCategoryReferences")
public List securedGroupCategoryReferences = null;
/**
*
*/
@JsonProperty("state")
public com.nutanix.dp1.mic.microseg.v4.config.SecurityPolicyState state = null;
/**
*
*/
@JsonProperty("type")
public com.nutanix.dp1.mic.microseg.v4.operation.SecurityPolicyType type = null;
/**
* This is a system generated identifier which can be used to preview the complete FNS Next-Gen
policy corresponding with a FNS policy using Preview GET API.
A sample call would look like
```
/microseg/v4.0.a1/operation/policy-preview/8f094d6c-d7b2-32c2-8223-462c6c5e06db
```
*/
@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("previewReference")
public String previewReference = null;
/**
*
*/
@JsonProperty("options")
public com.nutanix.dp1.mic.microseg.v4.operation.SecurityPolicyOptions options = null;
/**
* Name of the network security policy.
*/
@JsonProperty("name")
public String name = 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;
}