![JAR search and dependency download from the Maven repository](/logo.png)
com.nutanix.dp1.dat.dataprotection.v4.config.ComputeChangedRegionsResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataprotection-java-client Show documentation
Show all versions of dataprotection-java-client Show documentation
Business Continuity with full spectrum of Disaster Recovery and Backup solution. Spanning across Single PC, Cross AZ, MultiSite. Configuration of Recovery points, Protection policies, Recovery Plans. Execution and monitoring of back up and recovery orchestrations on OnPrem as well as Cloud.
/*
* Generated file ..
*
* Product version: 4.0.1-beta-1
*
* Part of the Nutanix Dataprotection Versioned APIs
*
* (c) 2024 Nutanix Inc. All rights reserved
*
*/
package com.nutanix.dp1.dat.dataprotection.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.dat.deserializers.DatObjectTypeTypedObject;
import javax.validation.constraints.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.nutanix.dp1.dat.deserializers.DatDeserializerUtils.*;
/**
* Response parameters for the compute changed regions. It is a chunk-encoded stream for the redirect request. It can contain a redirect IP, a certificate, or the actual changed regions. If the response contains a redirect IP, the client must re-send the request to the specified IP. The certificate needs to be set as NTNX_IGW_SESSION cookie in the header.
*/
@Data
@lombok.extern.slf4j.Slf4j
public class ComputeChangedRegionsResponse implements java.io.Serializable, DatObjectTypeTypedObject {
public ComputeChangedRegionsResponse() {
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 = "ComputeChangedRegionsResponseBuilder")
public ComputeChangedRegionsResponse(Object response) {
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.setResponseInWrapper(response);
}
protected String initialize$objectType() {
return "dataprotection.v4.config.ComputeChangedRegionsResponse";
}
protected String initialize$fv() {
return "v4.r0.b1";
}
@JsonAnySetter
private void setUndeserializedFields(String name, String value) {
$unknownFields.put(name, value);
}
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
@Getter
private String $responseItemDiscriminator = null;
@Data
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = OneOfResponseWrapper.OneOfResponseWrapperJsonDeserializer.class)
public static class OneOfResponseWrapper {
public OneOfResponseWrapper() {
}
public OneOfResponseWrapper(com.nutanix.dp1.dat.dataprotection.v4.config.RegionResponse data) {
this.oneOfType0 = data;
this.discriminator = data.get$objectType();
this.$objectType = data.get$objectType();
}
public OneOfResponseWrapper(com.nutanix.dp1.dat.dataprotection.v4.config.RedirectionResponse data) {
this.oneOfType1 = data;
this.discriminator = data.get$objectType();
this.$objectType = data.get$objectType();
}
@com.nutanix.dp1.dat.annotations.DatJsonDeserializer
private static class OneOfResponseWrapperJsonDeserializer extends com.nutanix.dp1.dat.deserializers.DatOneOfDeserializer {
private static final com.fasterxml.jackson.databind.type.TypeFactory TYPE_FACTORY = com.fasterxml.jackson.databind.type.TypeFactory.defaultInstance();
private static final com.fasterxml.jackson.databind.JavaType ONE_OF_TYPE0 = TYPE_FACTORY.constructType(com.nutanix.dp1.dat.dataprotection.v4.config.RegionResponse.class);
private static final com.fasterxml.jackson.databind.JavaType ONE_OF_TYPE1 = TYPE_FACTORY.constructType(com.nutanix.dp1.dat.dataprotection.v4.config.RedirectionResponse.class);
public OneOfResponseWrapperJsonDeserializer() {
super(TYPE_FACTORY.constructType(OneOfResponseWrapper.class));
}
@Override
protected void setDataObject(OneOfResponseWrapper oneOfObject, Object nestedObject) {
if (oneOfObject == null) {
throw new IllegalArgumentException("Instance of OneOfResponseWrapper provided is null");
}
if(ONE_OF_TYPE0.getRawClass().isAssignableFrom(nestedObject.getClass())) {
oneOfObject.setValue(nestedObject);
if (oneOfObject.getValue() != null) {
return;
}
}
if(ONE_OF_TYPE1.getRawClass().isAssignableFrom(nestedObject.getClass())) {
oneOfObject.setValue(nestedObject);
if (oneOfObject.getValue() != null) {
return;
}
}
throw new IllegalArgumentException("Attempting to set unsupported object type in OneOfResponseWrapper:" + nestedObject.getClass().getName());
}
public String getPackagePrefix() {
return "com.nutanix.dp1.dat";
}
}
@com.fasterxml.jackson.annotation.JsonIgnore
@lombok.Getter(lombok.AccessLevel.NONE)
@lombok.Setter(lombok.AccessLevel.NONE)
private com.nutanix.dp1.dat.dataprotection.v4.config.RegionResponse oneOfType0;
@com.fasterxml.jackson.annotation.JsonIgnore
@lombok.Getter(lombok.AccessLevel.NONE)
@lombok.Setter(lombok.AccessLevel.NONE)
private com.nutanix.dp1.dat.dataprotection.v4.config.RedirectionResponse oneOfType1;
@lombok.Setter(lombok.AccessLevel.NONE)
private String discriminator;
@com.fasterxml.jackson.annotation.JsonIgnore
@lombok.Setter(lombok.AccessLevel.NONE)
private String $objectType;
@com.fasterxml.jackson.annotation.JsonGetter
public Object getValue() {
if(oneOfType0 != null && oneOfType0.get$objectType().equals(this.discriminator)) {
return this.oneOfType0;
}
if(oneOfType1 != null && oneOfType1.get$objectType().equals(this.discriminator)) {
return this.oneOfType1;
}
throw new IllegalArgumentException("Unrecognized discriminator:" + this.discriminator);
}
public void setValue(Object value) {
if(value == null) {
log.warn("null passed to setValue function. OneOf's value will not be set.");
return;
}
if (value instanceof com.nutanix.dp1.dat.dataprotection.v4.config.RegionResponse) {
this.oneOfType0 = (com.nutanix.dp1.dat.dataprotection.v4.config.RegionResponse) value;
this.discriminator = this.oneOfType0.get$objectType();
this.$objectType = this.oneOfType0.get$objectType();
return;
}
if (value instanceof com.nutanix.dp1.dat.dataprotection.v4.config.RedirectionResponse) {
this.oneOfType1 = (com.nutanix.dp1.dat.dataprotection.v4.config.RedirectionResponse) value;
this.discriminator = this.oneOfType1.get$objectType();
this.$objectType = this.oneOfType1.get$objectType();
return;
}
throw new IllegalArgumentException("Attempting to set unsupported object type in OneOfResponseWrapper:" + value.getClass().getName());
}
}
private OneOfResponseWrapper response = null;
/**
* @deprecated
* @param value one of wrapper instance
*/
public void setResponse(OneOfResponseWrapper value) {
log.warn("Deprecating this method, please use setDataInWrapper instead");
if (value == null) {
return;
}
this.response = value;
this.$responseItemDiscriminator = this.response.getDiscriminator();
}
/**
* @param value value of one of field response
*/
@com.fasterxml.jackson.annotation.JsonIgnore
public void setResponseInWrapper(Object value) {
if (value == null) {
return;
}
if (this.response == null) {
this.response = new OneOfResponseWrapper();
}
this.response.setValue(value);
this.$responseItemDiscriminator = this.response.getDiscriminator();
}
/**
* Get response in one of possible types :
*
* - com.nutanix.dp1.dat.dataprotection.v4.config.RegionResponse
* - com.nutanix.dp1.dat.dataprotection.v4.config.RedirectionResponse
*
* @return Object
*/
@com.fasterxml.jackson.databind.annotation.JsonSerialize(using = com.nutanix.dp1.dat.serializers.DatOneOfSerializer.class)
public Object getResponse() {
if (this.response == null) {
log.debug("OneOf property response was never set. Returning null...");
return null;
}
return this.response.getValue();
}
@Getter
@JsonView({StandardView.class})
protected final Map $reserved;
@Getter
@JsonView({StandardView.class})
protected final String $objectType;
@Getter
@JsonView({StandardView.class})
protected final Map $unknownFields;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy