com.spotinst.sdkjava.model.api.oceanCD.ApiStrategy Maven / Gradle / Ivy
package com.spotinst.sdkjava.model.api.oceanCD;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.spotinst.sdkjava.client.rest.IPartialUpdateEntity;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonFilter("PartialUpdateEntityFilter")
public class ApiStrategy implements IPartialUpdateEntity {
@JsonIgnore
private Set isSet;
private String name;
private ApiStrategyCanary canary;
private Date createdAt;
private Date updatedAt;
public ApiStrategy() {
isSet = new HashSet<>();
}
public Set getIsSet() {
return isSet;
}
public void setIsSet(Set isSet) {
this.isSet = isSet;
}
public String getName() {
return name;
}
public void setName(String name) {
isSet.add("name");
this.name = name;
}
public ApiStrategyCanary getCanary() {
return canary;
}
public void setCanary(ApiStrategyCanary canary) {
isSet.add("canary");
this.canary = canary;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
isSet.add("createdAt");
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
isSet.add("updatedAt");
this.updatedAt = updatedAt;
}
public static class Builder {
private ApiStrategy createStrategy;
private Builder() {
this.createStrategy = new ApiStrategy();
}
public static Builder get() {
return new Builder();
}
public Builder setName(final String name) {
createStrategy.setName(name);
return this;
}
public Builder setCanary(final ApiStrategyCanary canary) {
createStrategy.setCanary(canary);
return this;
}
public ApiStrategy build() {
return createStrategy;
}
}
@JsonIgnore
public boolean isNameSet() {
return isSet.contains("name");
}
@JsonIgnore
public boolean isCanarySet() {
return isSet.contains("canary");
}
// Is createdAt Set boolean method
@JsonIgnore
public boolean isCreatedAtSet() {
return isSet.contains("createdAt");
}
// Is updatedAt Set boolean method
@JsonIgnore
public boolean isUpdatedAtSet() {
return isSet.contains("updatedAt");
}
}