diff --git a/src/main/java/com/spotinst/sdkjava/enums/aws/elastigroup/Route53RecordSetType.java b/src/main/java/com/spotinst/sdkjava/enums/aws/elastigroup/Route53RecordSetType.java new file mode 100644 index 000000000..361b656b8 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/enums/aws/elastigroup/Route53RecordSetType.java @@ -0,0 +1,38 @@ +package com.spotinst.sdkjava.enums.aws.elastigroup; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public enum Route53RecordSetType { + + A("a"), + CNAME("cname"); + + private static final Logger LOGGER = LoggerFactory.getLogger(Route53RecordSetType.class); + private String name; + + Route53RecordSetType(String name) { + this.name = name; + } + + public static Route53RecordSetType fromName(String name) { + Route53RecordSetType retVal = null; + + for (Route53RecordSetType signalNameEnum : Route53RecordSetType.values()) { + if (name.equalsIgnoreCase(signalNameEnum.name)) { + retVal = signalNameEnum; + break; + } + } + + if (retVal == null) { + LOGGER.error("Tried to create signal name enum for: " + name + ", but we don't support such type "); + } + + return retVal; + } + + public String getName() { + return name; + } +} diff --git a/src/main/java/com/spotinst/sdkjava/model/ApiAutoScale.java b/src/main/java/com/spotinst/sdkjava/model/ApiAutoScale.java index abc7c0745..cca075564 100644 --- a/src/main/java/com/spotinst/sdkjava/model/ApiAutoScale.java +++ b/src/main/java/com/spotinst/sdkjava/model/ApiAutoScale.java @@ -5,6 +5,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.spotinst.sdkjava.client.rest.IPartialUpdateEntity; +import com.spotinst.sdkjava.model.api.elastigroup.aws.ApiConstraints; +import com.spotinst.sdkjava.model.bl.elastigroup.aws.Constraints; import java.util.HashSet; import java.util.List; @@ -24,6 +26,7 @@ public class ApiAutoScale implements IPartialUpdateEntity { private Boolean isAutoConfig; private Boolean shouldScaleDownNonServiceTasks; private List attributes; + private List constraints; //endregion //region Constructor @@ -41,6 +44,15 @@ public void setIsSet(Set isSet) { this.isSet = isSet; } + public List getConstraints() { + return constraints; + } + + public void setConstraints(List constraints) { + isSet.add("constraints"); + this.constraints = constraints; + } + public Boolean getIsEnabled() { return isEnabled; } @@ -106,6 +118,11 @@ public void setAttributes(List attributes) { //endregion //region isSet methods + // Is constraints Set boolean method + @JsonIgnore + public boolean isConstraintsSet() { + return isSet.contains("constraints"); + } // Is isEnabled Set boolean method @JsonIgnore public boolean isIsEnabledSet() { diff --git a/src/main/java/com/spotinst/sdkjava/model/ApiThirdPartiesIntegration.java b/src/main/java/com/spotinst/sdkjava/model/ApiThirdPartiesIntegration.java index 91b271d47..9262318b5 100644 --- a/src/main/java/com/spotinst/sdkjava/model/ApiThirdPartiesIntegration.java +++ b/src/main/java/com/spotinst/sdkjava/model/ApiThirdPartiesIntegration.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.spotinst.sdkjava.client.rest.IPartialUpdateEntity; import com.spotinst.sdkjava.model.api.elastigroup.aws.ApiElasticBeanstalk; +import com.spotinst.sdkjava.model.api.elastigroup.aws.ApiNomad; +import com.spotinst.sdkjava.model.api.elastigroup.aws.ApiRoute53; import java.util.HashSet; import java.util.Set; @@ -16,10 +18,12 @@ class ApiThirdPartiesIntegration implements IPartialUpdateEntity { //region Members @JsonIgnore - private Set isSet; - private ApiEcs ecs; - private ApiCodeDeploy codeDeploy; - private ApiElasticBeanstalk elasticBeanstalk; + private Set isSet; + private ApiEcs ecs; + private ApiCodeDeploy codeDeploy; + private ApiElasticBeanstalk elasticBeanstalk; + private ApiRoute53 route53; + private ApiNomad nomad; //endregion //region Constructor @@ -39,6 +43,15 @@ public void setIsSet(Set isSet) { this.isSet = isSet; } + public ApiNomad getNomad() { + return nomad; + } + + public void setNomad(ApiNomad nomad) { + isSet.add("nomad"); + this.nomad = nomad; + } + public ApiEcs getEcs() { return ecs; } @@ -67,8 +80,21 @@ public void setElasticBeanstalk(ApiElasticBeanstalk elasticBeanstalk) { this.elasticBeanstalk = elasticBeanstalk; } + public ApiRoute53 getRoute53() { + return route53; + } + + public void setRoute53(ApiRoute53 route53) { + this.route53 = route53; + } + //endregion //region isSet methods + // Is nomad Set boolean method + @JsonIgnore + public boolean isNomadSet() { + return isSet.contains("nomad"); + } // Is ecs Set boolean method @JsonIgnore public boolean isEcsSet() { @@ -86,6 +112,12 @@ public boolean isCodeDeploySet() { public boolean isElasticBeanstalkSet() { return isSet.contains("elasticBeanstalk"); } + + // Is route53 Set boolean method + @JsonIgnore + public boolean isRoute53Set() { + return isSet.contains("route53"); + } //endregion } diff --git a/src/main/java/com/spotinst/sdkjava/model/ElastigroupAutoScaleSpecification.java b/src/main/java/com/spotinst/sdkjava/model/ElastigroupAutoScaleSpecification.java index 6f4202398..d6af4eca5 100644 --- a/src/main/java/com/spotinst/sdkjava/model/ElastigroupAutoScaleSpecification.java +++ b/src/main/java/com/spotinst/sdkjava/model/ElastigroupAutoScaleSpecification.java @@ -1,6 +1,7 @@ package com.spotinst.sdkjava.model; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.spotinst.sdkjava.model.bl.elastigroup.aws.Constraints; import java.util.HashSet; import java.util.List; @@ -17,6 +18,7 @@ public class ElastigroupAutoScaleSpecification { private Boolean isAutoConfig; private Boolean shouldScaleDownNonServiceTasks; private List attributes; + private List constraints; //endregion //region Constructor @@ -35,6 +37,15 @@ public void setIsSet(Set isSet) { this.isSet = isSet; } + public List getConstraints() { + return constraints; + } + + public void setConstraints(List constraints) { + isSet.add("constraints"); + this.constraints = constraints; + } + public Boolean getEnabled() { return isEnabled; } @@ -111,6 +122,11 @@ public static ElastigroupAutoScaleSpecification.Builder get() { return new Builder(); } + public Builder setConstraints(final List constraints) { + AutoScale.setConstraints(constraints); + return this; + } + public Builder setIsEnabled(final Boolean isEnabled) { AutoScale.setIsEnabled(isEnabled); return this; @@ -153,6 +169,11 @@ public ElastigroupAutoScaleSpecification build() { //endregion //region isSet methods + // Is constraints Set boolean method + @JsonIgnore + public boolean isConstraintsSet() { + return isSet.contains("constraints"); + } // Is isEnabled Set boolean method @JsonIgnore public boolean isIsEnabledSet() { diff --git a/src/main/java/com/spotinst/sdkjava/model/ElastigroupConverter.java b/src/main/java/com/spotinst/sdkjava/model/ElastigroupConverter.java index 07a15f8f9..863394b5f 100755 --- a/src/main/java/com/spotinst/sdkjava/model/ElastigroupConverter.java +++ b/src/main/java/com/spotinst/sdkjava/model/ElastigroupConverter.java @@ -140,11 +140,127 @@ private static ApiThirdPartiesIntegration toDal( if (thirdPartiesIntegration.isElasticBeanstalkSet()) { retVal.setElasticBeanstalk(toDal(thirdPartiesIntegration.getElasticBeanstalk())); } + + if(thirdPartiesIntegration.isRoute53Set()){ + retVal.setRoute53(toDal(thirdPartiesIntegration.getRoute53())); + } + if(thirdPartiesIntegration.isNomadSet()){ + retVal.setNomad(toDal(thirdPartiesIntegration.getNomad())); + } } return retVal; } + private static ApiNomad toDal(Nomad nomad){ + ApiNomad apiNomad = null; + + if(nomad != null){ + apiNomad = new ApiNomad(); + + if(nomad.isAclTokenSet()){ + apiNomad.setAclToken(nomad.getAclToken()); + } + if(nomad.isAutoScaleSet()){ + List apiAutoScale= + nomad.getAutoScale().stream().map(ElastigroupConverter::toDal).collect(Collectors.toList()); + apiNomad.setAutoScale(apiAutoScale); + } + if(nomad.isMasterHostSet()){ + apiNomad.setMasterHost(nomad.getMasterHost()); + } + if(nomad.isMasterPortSet()){ + apiNomad.setMasterPort(nomad.getMasterPort()); + } + if(nomad.isTlsConfigSet()){ + apiNomad.setTlsConfig(toDal(nomad.getTlsConfig())); + } + } + return apiNomad; + } + + private static ApiTlsConfig toDal(TlsConfig tlsConfig){ + ApiTlsConfig apiTlsConfig = null; + + if(tlsConfig != null){ + apiTlsConfig = new ApiTlsConfig(); + + if(tlsConfig.isCertificateSet()){ + apiTlsConfig.setCertificate(tlsConfig.getCertificate()); + } + if(tlsConfig.isPrivateKeySet()){ + apiTlsConfig.setPrivateKey(tlsConfig.getPrivateKey()); + } + if(tlsConfig.isTlsEnabledSet()){ + apiTlsConfig.setTlsEnabled(tlsConfig.getTlsEnabled()); + } + } + return apiTlsConfig; + } + + private static ApiRoute53 toDal(Route53 route53){ + ApiRoute53 apiRoute53 = null; + + if(route53 != null){ + apiRoute53 = new ApiRoute53(); + + if(route53.isDomainsSet()){ + List apiRoute53Domains= + route53.getDomains().stream().map(ElastigroupConverter::toDal).collect(Collectors.toList()); + apiRoute53.setDomains(apiRoute53Domains); + } + } + return apiRoute53; + } + + private static ApiRoute53Domains toDal(Route53Domains route53Domains){ + ApiRoute53Domains apiRoute53Domains = null; + + if(route53Domains != null){ + apiRoute53Domains = new ApiRoute53Domains(); + + if(route53Domains.isHostedZoneIdSet()){ + apiRoute53Domains.setHostedZoneId(route53Domains.getHostedZoneId()); + } + + if(route53Domains.isRecordSetsSet()){ + List recordSets= + route53Domains.getRecordSets().stream().map(ElastigroupConverter::toDal).collect(Collectors.toList()); + apiRoute53Domains.setRecordSets(recordSets); + } + + if(route53Domains.isRecordSetTypeSet()){ + apiRoute53Domains.setRecordSetType(apiRoute53Domains.getRecordSetType()); + } + + if(route53Domains.isSpotinstAccountIdSet()){ + apiRoute53Domains.setSpotinstAccountId(apiRoute53Domains.getSpotinstAccountId()); + } + } + return apiRoute53Domains; + } + + private static ApiRecordSets toDal(RecordSets recordSets){ + ApiRecordSets apiRecordSets = null; + + if(recordSets != null){ + apiRecordSets = new ApiRecordSets(); + + if(recordSets.isNameSet()){ + apiRecordSets.setName(recordSets.getName()); + } + + if(recordSets.isUsePublicDnsSet()){ + apiRecordSets.setUsePublicDns(recordSets.isUsePublicDns()); + } + + if(recordSets.isUsePublicIpSet()){ + apiRecordSets.setUsePublicIp(recordSets.isUsePublicIp()); + } + } + return apiRecordSets; + } + private static ApiCodeDeploy toDal(ElastigroupCodeDeploy codeDeploy) { ApiCodeDeploy retVal = null; @@ -389,6 +505,30 @@ private static ApiAutoScale toDal(ElastigroupAutoScaleSpecification autoScale) { retVal.setAttributes(attributesList); } } + if(autoScale.isConstraintsSet()){ + if(autoScale.getConstraints() != null){ + List apiConstraints = + autoScale.getConstraints().stream().map(ElastigroupConverter::toDal) + .collect(Collectors.toList()); + retVal.setConstraints(apiConstraints); + } + } + } + return retVal; + } + + private static ApiConstraints toDal(Constraints constraints){ + ApiConstraints retVal = null; + + if(constraints != null){ + retVal = new ApiConstraints(); + + if(constraints.isKeySet()){ + retVal.setKey(constraints.getKey()); + } + if(constraints.isValueSet()){ + retVal.setValue(constraints.getValue()); + } } return retVal; } @@ -2025,11 +2165,136 @@ private static ElastigroupThirdPartiesIntegrationConfiguration toBl( if (apiThirdPartiesIntegration.isElasticBeanstalkSet()) { blThirdPartiesIntegrationBuilder.setElasticBeanstalk(toBl(apiThirdPartiesIntegration.getElasticBeanstalk())); } + + if(apiThirdPartiesIntegration.isRoute53Set()){ + blThirdPartiesIntegrationBuilder.setRoute53(toBl(apiThirdPartiesIntegration.getRoute53())); + } + + if(apiThirdPartiesIntegration.isNomadSet()){ + blThirdPartiesIntegrationBuilder.setNomad(toBl(apiThirdPartiesIntegration.getNomad())); + } blThirdPartiesIntegration = blThirdPartiesIntegrationBuilder.build(); } return blThirdPartiesIntegration; } + private static Nomad toBl(ApiNomad apiNomad){ + Nomad nomad = null; + + if(apiNomad != null){ + Nomad.Builder nomadBuilder = Nomad.Builder.get(); + + if(apiNomad.isAclTokenSet()){ + nomadBuilder.setAclToken(apiNomad.getAclToken()); + } + if(apiNomad.isAutoScaleSet()){ + List autoScale= + apiNomad.getAutoScale().stream().map(ElastigroupConverter::toBl).collect(Collectors.toList()); + nomadBuilder.setAutoScale(autoScale); + } + if(apiNomad.isMasterHostSet()){ + nomadBuilder.setMasterHost(apiNomad.getMasterHost()); + } + if(apiNomad.isMasterPortSet()){ + nomadBuilder.setMasterPort(apiNomad.getMasterPort()); + } + if(apiNomad.isTlsConfigSet()){ + nomadBuilder.setTlsConfig(toBl(apiNomad.getTlsConfig())); + } + nomad = nomadBuilder.build(); + } + return nomad; + } + + private static TlsConfig toBl(ApiTlsConfig apiTlsConfig){ + TlsConfig tlsConfig = null; + + if(apiTlsConfig != null){ + TlsConfig.Builder tlsConfigBuilder = TlsConfig.Builder.get(); + + if(apiTlsConfig.isCertificateSet()){ + tlsConfigBuilder.setCertificate(apiTlsConfig.getCertificate()); + } + if(apiTlsConfig.isPrivateKeySet()){ + tlsConfigBuilder.setPrivateKey(apiTlsConfig.getPrivateKey()); + } + if(apiTlsConfig.isTlsEnabledSet()){ + tlsConfigBuilder.setTlsEnabled(apiTlsConfig.getTlsEnabled()); + } + + tlsConfig = tlsConfigBuilder.build(); + } + return tlsConfig; + } + + private static Route53 toBl(ApiRoute53 apiRoute53){ + Route53 route53 = null; + + if(apiRoute53 != null){ + Route53.Builder route53Builder = Route53.Builder.get(); + + if(apiRoute53.isDomainsSet()){ + List route53Domains= + apiRoute53.getDomains().stream().map(ElastigroupConverter::toBl).collect(Collectors.toList()); + route53Builder.setDomains(route53Domains); + } + route53 = route53Builder.build(); + } + return route53; + } + + private static Route53Domains toBl(ApiRoute53Domains apiRoute53Domains){ + Route53Domains route53Domains = null; + + if(apiRoute53Domains != null){ + Route53Domains.Builder route53DomainsBuilder = Route53Domains.Builder.get(); + + if(apiRoute53Domains.isHostedZoneIdSet()){ + route53DomainsBuilder.setHostedZoneId(apiRoute53Domains.getHostedZoneId()); + } + + if(apiRoute53Domains.isRecordSetsSet()){ + List recordSets= + apiRoute53Domains.getRecordSets().stream().map(ElastigroupConverter::toBl).collect(Collectors.toList()); + route53DomainsBuilder.setRecordSets(recordSets); + } + + if(apiRoute53Domains.isRecordSetTypeSet()){ + route53DomainsBuilder.setRecordSetType(apiRoute53Domains.getRecordSetType()); + } + + if(apiRoute53Domains.isSpotinstAccountIdSet()){ + route53DomainsBuilder.setSpotinstAccountId(apiRoute53Domains.getSpotinstAccountId()); + } + + route53Domains = route53DomainsBuilder.build(); + } + return route53Domains; + } + + private static RecordSets toBl(ApiRecordSets apiRecordSets){ + RecordSets recordSets = null; + + if(apiRecordSets != null){ + RecordSets.Builder recordSetsBuilder = RecordSets.Builder.get(); + + if(apiRecordSets.isNameSet()){ + recordSetsBuilder.setName(apiRecordSets.getName()); + } + + if(apiRecordSets.isUsePublicDnsSet()){ + recordSetsBuilder.setUsePublicDns(apiRecordSets.isUsePublicDns()); + } + + if(apiRecordSets.isUsePublicIpSet()){ + recordSetsBuilder.setUsePublicIp(apiRecordSets.isUsePublicIp()); + } + + recordSets = recordSetsBuilder.build(); + } + return recordSets; + } + private static ElastigroupCodeDeploy toBl(ApiCodeDeploy apiCodeDeploy) { ElastigroupCodeDeploy blCodeDeploy = null; @@ -2287,11 +2552,36 @@ private static ElastigroupAutoScaleSpecification toBl(ApiAutoScale apiAutoScale) blAutoScaleBuilder.setAttributes(attributesSpecificationList); } } + if(apiAutoScale.isConstraintsSet()){ + if(apiAutoScale.getConstraints() != null){ + List constraintsList = apiAutoScale.getConstraints().stream().map(ElastigroupConverter::toBl) + .collect(Collectors.toList()); + blAutoScaleBuilder.setConstraints(constraintsList); + } + } + blAutoScale = blAutoScaleBuilder.build(); } return blAutoScale; } + private static Constraints toBl(ApiConstraints constraints){ + Constraints retVal = null; + + if(constraints != null){ + Constraints.Builder constraintsBuilder = Constraints.Builder.get(); + + if(constraints.isKeySet()){ + constraintsBuilder.setKey(constraints.getKey()); + } + if(constraints.isValueSet()){ + constraintsBuilder.setValue(constraints.getValue()); + } + retVal = constraintsBuilder.build(); + } + return retVal; + } + private static ElastigroupHeadroomSpecification toBl(ApiHeadroom apiHeadroom) { ElastigroupHeadroomSpecification blHeadroom = null; diff --git a/src/main/java/com/spotinst/sdkjava/model/ElastigroupThirdPartiesIntegrationConfiguration.java b/src/main/java/com/spotinst/sdkjava/model/ElastigroupThirdPartiesIntegrationConfiguration.java index 485cc9362..082892655 100644 --- a/src/main/java/com/spotinst/sdkjava/model/ElastigroupThirdPartiesIntegrationConfiguration.java +++ b/src/main/java/com/spotinst/sdkjava/model/ElastigroupThirdPartiesIntegrationConfiguration.java @@ -2,6 +2,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.spotinst.sdkjava.model.bl.elastigroup.aws.ElasticBeanstalk; +import com.spotinst.sdkjava.model.bl.elastigroup.aws.Nomad; +import com.spotinst.sdkjava.model.bl.elastigroup.aws.Route53; import java.util.HashSet; import java.util.Set; @@ -14,6 +16,8 @@ public class ElastigroupThirdPartiesIntegrationConfiguration { private ElastigroupEcsSpecification ecs; private ElastigroupCodeDeploy codeDeploy; private ElasticBeanstalk elasticBeanstalk; + private Route53 route53; + private Nomad nomad; //endregion //region Constructor @@ -25,6 +29,25 @@ private ElastigroupThirdPartiesIntegrationConfiguration() { //region Getters & Setters + + public Nomad getNomad() { + return nomad; + } + + public void setNomad(Nomad nomad) { + isSet.add("nomad"); + this.nomad = nomad; + } + + public Route53 getRoute53() { + return route53; + } + + public void setRoute53(Route53 route53) { + isSet.add("route53"); + this.route53 = route53; + } + public ElastigroupEcsSpecification getEcs() { return ecs; } @@ -73,6 +96,11 @@ public static Builder get() { return new Builder(); } + public Builder setNomad(final Nomad nomad) { + ThirdPartiesIntegration.setNomad(nomad); + return this; + } + public Builder setEcs(final ElastigroupEcsSpecification ecs) { ThirdPartiesIntegration.setEcs(ecs); return this; @@ -88,6 +116,11 @@ public Builder setElasticBeanstalk(final ElasticBeanstalk elasticBeanstalk) { return this; } + public Builder setRoute53(final Route53 route53) { + ThirdPartiesIntegration.setRoute53(route53); + return this; + } + public ElastigroupThirdPartiesIntegrationConfiguration build() { return ThirdPartiesIntegration; } @@ -95,6 +128,11 @@ public ElastigroupThirdPartiesIntegrationConfiguration build() { //endregion //region isSet methods + // Is nomad Set boolean method + @JsonIgnore + public boolean isNomadSet() { + return isSet.contains("nomad"); + } // Is ecs Set boolean method @JsonIgnore public boolean isEcsSet() { @@ -113,6 +151,10 @@ public boolean isElasticBeanstalkSet() { return isSet.contains("elasticBeanstalk"); } + // Is route53 Set boolean method + @JsonIgnore + public boolean isRoute53Set() { + return isSet.contains("route53"); + } //endregion - } diff --git a/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiConstraints.java b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiConstraints.java new file mode 100644 index 000000000..444604d26 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiConstraints.java @@ -0,0 +1,72 @@ +package com.spotinst.sdkjava.model.api.elastigroup.aws; + +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.HashSet; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonFilter("PartialUpdateEntityFilter") +public class ApiConstraints implements IPartialUpdateEntity { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String key; + private String value; + //endregion + + //region Constructor + + public ApiConstraints() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + isSet.add("key"); + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + isSet.add("value"); + this.value = value; + } + + //endregion + //region isSet methods + // Is key Set boolean method + @JsonIgnore + public boolean isKeySet() { + return isSet.contains("key"); + } + + // Is value Set boolean method + @JsonIgnore + public boolean isValueSet() { + return isSet.contains("value"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiNomad.java b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiNomad.java new file mode 100644 index 000000000..0075ec006 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiNomad.java @@ -0,0 +1,121 @@ +package com.spotinst.sdkjava.model.api.elastigroup.aws; + +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 com.spotinst.sdkjava.model.ApiAutoScale; +import com.spotinst.sdkjava.model.ElastigroupAutoScaleSpecification; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonFilter("PartialUpdateEntityFilter") +public class ApiNomad implements IPartialUpdateEntity { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String aclToken; + private List autoScale; + private String masterHost; + private Integer masterPort; + private ApiTlsConfig tlsConfig; + //endregion + + //region Constructor + + public ApiNomad() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getAclToken() { + return aclToken; + } + + public void setAclToken(String aclToken) { + isSet.add("aclToken"); + this.aclToken = aclToken; + } + + public List getAutoScale() { + return autoScale; + } + + public void setAutoScale(List autoScale) { + isSet.add("autoScale"); + this.autoScale = autoScale; + } + + public String getMasterHost() { + return masterHost; + } + + public void setMasterHost(String masterHost) { + isSet.add("masterHost"); + this.masterHost = masterHost; + } + + public Integer getMasterPort() { + return masterPort; + } + + public void setMasterPort(Integer masterPort) { + isSet.add("masterPort"); + this.masterPort = masterPort; + } + + public ApiTlsConfig getTlsConfig() { + return tlsConfig; + } + + public void setTlsConfig(ApiTlsConfig tlsConfig) { + isSet.add("tlsConfig"); + this.tlsConfig = tlsConfig; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region isSet methods + // Is aclToken Set boolean method + @JsonIgnore + public boolean isAclTokenSet() { + return isSet.contains("aclToken"); + } + // Is autoScale Set boolean method + @JsonIgnore + public boolean isAutoScaleSet() { + return isSet.contains("autoScale"); + } + // Is masterHost Set boolean method + @JsonIgnore + public boolean isMasterHostSet() { + return isSet.contains("masterHost"); + } + // Is masterPort Set boolean method + @JsonIgnore + public boolean isMasterPortSet() { + return isSet.contains("masterPort"); + } + // Is tlsConfig Set boolean method + @JsonIgnore + public boolean isTlsConfigSet() { + return isSet.contains("tlsConfig"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRecordSets.java b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRecordSets.java new file mode 100644 index 000000000..b926853a0 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRecordSets.java @@ -0,0 +1,90 @@ +package com.spotinst.sdkjava.model.api.elastigroup.aws; + +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.HashSet; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonFilter("PartialUpdateEntityFilter") +public class ApiRecordSets implements IPartialUpdateEntity { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String name; + private boolean usePublicDns; + private boolean usePublicIp; + //endregion + + //region Constructor + + public ApiRecordSets() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getName() { + return name; + } + + public void setName(String name) { + isSet.add("name"); + this.name = name; + } + + public boolean isUsePublicDns() { + return usePublicDns; + } + + public void setUsePublicDns(boolean usePublicDns) { + isSet.add("usePublicDns"); + this.usePublicDns = usePublicDns; + } + + public boolean isUsePublicIp() { + return usePublicIp; + } + + public void setUsePublicIp(boolean usePublicIp) { + isSet.add("usePublicIp"); + this.usePublicIp = usePublicIp; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region isSet methods + // Is name Set boolean method + @JsonIgnore + public boolean isNameSet() { + return isSet.contains("name"); + } + + // Is usePublicDns Set boolean method + @JsonIgnore + public boolean isUsePublicDnsSet() { + return isSet.contains("usePublicDns"); + } + + // Is usePublicIp Set boolean method + @JsonIgnore + public boolean isUsePublicIpSet() { + return isSet.contains("usePublicIp"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRoute53.java b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRoute53.java new file mode 100644 index 000000000..0b7b5e67c --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRoute53.java @@ -0,0 +1,59 @@ +package com.spotinst.sdkjava.model.api.elastigroup.aws; + +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.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonFilter("PartialUpdateEntityFilter") +public class ApiRoute53 implements IPartialUpdateEntity { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private List domains; + //endregion + + //region Constructor + + public ApiRoute53() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public List getDomains() { + return domains; + } + + public void setDomains(List domains) { + isSet.add("domains"); + this.domains = domains; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region isSet methods + // Is domains Set boolean method + @JsonIgnore + public boolean isDomainsSet() { + return isSet.contains("domains"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRoute53Domains.java b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRoute53Domains.java new file mode 100644 index 000000000..dbe9b64c4 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiRoute53Domains.java @@ -0,0 +1,146 @@ +package com.spotinst.sdkjava.model.api.elastigroup.aws; + +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 com.spotinst.sdkjava.enums.aws.elastigroup.Route53RecordSetType; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonFilter("PartialUpdateEntityFilter") +public class ApiRoute53Domains implements IPartialUpdateEntity { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String hostedZoneId; + private List recordSets; + private Route53RecordSetType recordSetType; + private String spotinstAccountId; + //endregion + + //region Constructor + + public ApiRoute53Domains() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getHostedZoneId() { + return hostedZoneId; + } + + public void setHostedZoneId(String hostedZoneId) { + isSet.add("hostedZoneId"); + this.hostedZoneId = hostedZoneId; + } + + public List getRecordSets() { + return recordSets; + } + + public void setRecordSets(List recordSets) { + isSet.add("recordSets"); + this.recordSets = recordSets; + } + + public Route53RecordSetType getRecordSetType() { + return recordSetType; + } + + public void setRecordSetType(Route53RecordSetType recordSetType) { + isSet.add("recordSetType"); + this.recordSetType = recordSetType; + } + + public String getSpotinstAccountId() { + return spotinstAccountId; + } + + public void setSpotinstAccountId(String spotinstAccountId) { + isSet.add("spotinstAccountId"); + this.spotinstAccountId = spotinstAccountId; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region Builder class + public static class Builder { + private ApiRoute53Domains route53; + + private Builder() { + this.route53 = new ApiRoute53Domains(); + } + + public static Builder get() { + return new Builder(); + } + + public Builder setHostedZoneId(final String hostedZoneId) { + route53.setHostedZoneId(hostedZoneId); + return this; + } + + public Builder setRecordSets(final List recordSets) { + route53.setRecordSets(recordSets); + return this; + } + + public Builder setRecordSetType(final Route53RecordSetType recordSetType) { + route53.setRecordSetType(recordSetType); + return this; + } + + public Builder setSpotinstAccountId(final String spotinstAccountId) { + route53.setSpotinstAccountId(spotinstAccountId); + return this; + } + + public ApiRoute53Domains build() { + return route53; + } + } + //endregion + + //region isSet methods + // Is hostedZoneId Set boolean method + @JsonIgnore + public boolean isHostedZoneIdSet() { + return isSet.contains("hostedZoneId"); + } + + // Is recordSets Set boolean method + @JsonIgnore + public boolean isRecordSetsSet() { + return isSet.contains("recordSets"); + } + + // Is recordSetType Set boolean method + @JsonIgnore + public boolean isRecordSetTypeSet() { + return isSet.contains("recordSetType"); + } + + // Is spotinstAccountId Set boolean method + @JsonIgnore + public boolean isSpotinstAccountIdSet() { + return isSet.contains("spotinstAccountId"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiTlsConfig.java b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiTlsConfig.java new file mode 100644 index 000000000..7729cf26c --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/api/elastigroup/aws/ApiTlsConfig.java @@ -0,0 +1,90 @@ +package com.spotinst.sdkjava.model.api.elastigroup.aws; + +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.HashSet; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonFilter("PartialUpdateEntityFilter") +public class ApiTlsConfig implements IPartialUpdateEntity { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String certificate; + private String privateKey; + private String tlsEnabled; + //endregion + + //region Constructor + + public ApiTlsConfig() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getCertificate() { + return certificate; + } + + public void setCertificate(String certificate) { + isSet.add("certificate"); + this.certificate = certificate; + } + + public String getPrivateKey() { + return privateKey; + } + + public void setPrivateKey(String privateKey) { + isSet.add("privateKey"); + this.privateKey = privateKey; + } + + public String getTlsEnabled() { + return tlsEnabled; + } + + public void setTlsEnabled(String tlsEnabled) { + isSet.add("tlsEnabled"); + this.tlsEnabled = tlsEnabled; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + + //region isSet methods + // Is certificate Set boolean method + @JsonIgnore + public boolean isCertificateSet() { + return isSet.contains("certificate"); + } + // Is privateKey Set boolean method + @JsonIgnore + public boolean isPrivateKeySet() { + return isSet.contains("privateKey"); + } + // Is tlsEnabled Set boolean method + @JsonIgnore + public boolean isTlsEnabledSet() { + return isSet.contains("tlsEnabled"); + } + + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Constraints.java b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Constraints.java new file mode 100644 index 000000000..77c132957 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Constraints.java @@ -0,0 +1,99 @@ +package com.spotinst.sdkjava.model.bl.elastigroup.aws; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.spotinst.sdkjava.model.ApiAutoScale; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Constraints { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String key; + private String value; + //endregion + + //region Constructor + + private Constraints() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + isSet.add("key"); + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + isSet.add("value"); + this.value = value; + } + + //endregion + //region Builder class + public static class Builder { + private Constraints constraints; + + private Builder() { + this.constraints = new Constraints(); + } + + public static Builder get() { + return new Builder(); + } + + public Builder setKey(final String key) { + constraints.setKey(key); + return this; + } + + public Builder setValue(final String value) { + constraints.setValue(value); + return this; + } + + public Constraints build() { + return constraints; + } + } + //endregion + + //region isSet methods + // Is key Set boolean method + @JsonIgnore + public boolean isKeySet() { + return isSet.contains("key"); + } + + // Is value Set boolean method + @JsonIgnore + public boolean isValueSet() { + return isSet.contains("value"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Nomad.java b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Nomad.java new file mode 100644 index 000000000..db93a0fa1 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Nomad.java @@ -0,0 +1,161 @@ +package com.spotinst.sdkjava.model.bl.elastigroup.aws; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.spotinst.sdkjava.model.ApiAutoScale; +import com.spotinst.sdkjava.model.ElastigroupAutoScaleSpecification; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Nomad { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String aclToken; + private List autoScale; + private String masterHost; + private Integer masterPort; + private TlsConfig tlsConfig; + //endregion + + //region Constructor + + private Nomad() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getAclToken() { + return aclToken; + } + + public void setAclToken(String aclToken) { + isSet.add("aclToken"); + this.aclToken = aclToken; + } + + public List getAutoScale() { + return autoScale; + } + + public void setAutoScale(List autoScale) { + isSet.add("autoScale"); + this.autoScale = autoScale; + } + + public String getMasterHost() { + return masterHost; + } + + public void setMasterHost(String masterHost) { + isSet.add("masterHost"); + this.masterHost = masterHost; + } + + public Integer getMasterPort() { + return masterPort; + } + + public void setMasterPort(Integer masterPort) { + isSet.add("masterPort"); + this.masterPort = masterPort; + } + + public TlsConfig getTlsConfig() { + return tlsConfig; + } + + public void setTlsConfig(TlsConfig tlsConfig) { + isSet.add("tlsConfig"); + this.tlsConfig = tlsConfig; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region Builder class + public static class Builder { + private Nomad nomad; + + private Builder() { + this.nomad = new Nomad(); + } + + public static Builder get() { + return new Builder(); + } + + public Builder setAclToken(final String aclToken) { + nomad.setAclToken(aclToken); + return this; + } + + public Builder setAutoScale(final List autoScale) { + nomad.setAutoScale(autoScale); + return this; + } + + public Builder setMasterHost(final String masterHost) { + nomad.setMasterHost(masterHost); + return this; + } + + public Builder setMasterPort(final Integer masterPort) { + nomad.setMasterPort(masterPort); + return this; + } + + public Builder setTlsConfig(final TlsConfig tlsConfig) { + nomad.setTlsConfig(tlsConfig); + return this; + } + + public Nomad build() { + return nomad; + } + } + //endregion + + //region isSet methods + // Is aclToken Set boolean method + @JsonIgnore + public boolean isAclTokenSet() { + return isSet.contains("aclToken"); + } + // Is autoScale Set boolean method + @JsonIgnore + public boolean isAutoScaleSet() { + return isSet.contains("autoScale"); + } + // Is masterHost Set boolean method + @JsonIgnore + public boolean isMasterHostSet() { + return isSet.contains("masterHost"); + } + // Is masterPort Set boolean method + @JsonIgnore + public boolean isMasterPortSet() { + return isSet.contains("masterPort"); + } + // Is tlsConfig Set boolean method + @JsonIgnore + public boolean isTlsConfigSet() { + return isSet.contains("tlsConfig"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/RecordSets.java b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/RecordSets.java new file mode 100644 index 000000000..2e64b82c9 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/RecordSets.java @@ -0,0 +1,122 @@ +package com.spotinst.sdkjava.model.bl.elastigroup.aws; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.spotinst.sdkjava.enums.aws.elastigroup.Route53RecordSetType; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RecordSets { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String name; + private boolean usePublicDns; + private boolean usePublicIp; + //endregion + + //region Constructor + + private RecordSets() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getName() { + return name; + } + + public void setName(String name) { + isSet.add("name"); + this.name = name; + } + + public boolean isUsePublicDns() { + return usePublicDns; + } + + public void setUsePublicDns(boolean usePublicDns) { + isSet.add("usePublicDns"); + this.usePublicDns = usePublicDns; + } + + public boolean isUsePublicIp() { + return usePublicIp; + } + + public void setUsePublicIp(boolean usePublicIp) { + isSet.add("usePublicIp"); + this.usePublicIp = usePublicIp; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region Builder class + public static class Builder { + private RecordSets recordSets; + + private Builder() { + this.recordSets = new RecordSets(); + } + + public static Builder get() { + return new Builder(); + } + + public Builder setName(final String name) { + recordSets.setName(name); + return this; + } + + public Builder setUsePublicDns(final boolean usePublicDns) { + recordSets.setUsePublicDns(usePublicDns); + return this; + } + + public Builder setUsePublicIp(final boolean usePublicIp) { + recordSets.setUsePublicIp(usePublicIp); + return this; + } + + public RecordSets build() { + return recordSets; + } + } + //endregion + + //region isSet methods + // Is name Set boolean method + @JsonIgnore + public boolean isNameSet() { + return isSet.contains("name"); + } + + // Is usePublicDns Set boolean method + @JsonIgnore + public boolean isUsePublicDnsSet() { + return isSet.contains("usePublicDns"); + } + + // Is usePublicIp Set boolean method + @JsonIgnore + public boolean isUsePublicIpSet() { + return isSet.contains("usePublicIp"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Route53.java b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Route53.java new file mode 100644 index 000000000..17c8b0ff3 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Route53.java @@ -0,0 +1,81 @@ +package com.spotinst.sdkjava.model.bl.elastigroup.aws; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.spotinst.sdkjava.model.ElastigroupCodeDeploy; +import com.spotinst.sdkjava.model.ElastigroupEcsSpecification; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Route53 { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private List domains; + //endregion + + //region Constructor + + private Route53() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public List getDomains() { + return domains; + } + + public void setDomains(List domains) { + isSet.add("domains"); + this.domains = domains; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region Builder class + public static class Builder { + private Route53 route53; + + private Builder() { + this.route53 = new Route53(); + } + + public static Builder get() { + return new Builder(); + } + + public Builder setDomains(List domains) { + route53.setDomains(domains); + return this; + } + + public com.spotinst.sdkjava.model.bl.elastigroup.aws.Route53 build() { + return route53; + } + } + //endregion + + //region isSet methods + // Is domains Set boolean method + @JsonIgnore + public boolean isDomainsSet() { + return isSet.contains("domains"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Route53Domains.java b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Route53Domains.java new file mode 100644 index 000000000..5467d9107 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/Route53Domains.java @@ -0,0 +1,143 @@ +package com.spotinst.sdkjava.model.bl.elastigroup.aws; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.spotinst.sdkjava.enums.aws.elastigroup.Route53RecordSetType; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Route53Domains { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String hostedZoneId; + private List recordSets; + private Route53RecordSetType recordSetType; + private String spotinstAccountId; + //endregion + + //region Constructor + + private Route53Domains() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getHostedZoneId() { + return hostedZoneId; + } + + public void setHostedZoneId(String hostedZoneId) { + isSet.add("hostedZoneId"); + this.hostedZoneId = hostedZoneId; + } + + public List getRecordSets() { + return recordSets; + } + + public void setRecordSets(List recordSets) { + isSet.add("recordSets"); + this.recordSets = recordSets; + } + + public Route53RecordSetType getRecordSetType() { + return recordSetType; + } + + public void setRecordSetType(Route53RecordSetType recordSetType) { + isSet.add("recordSetType"); + this.recordSetType = recordSetType; + } + + public String getSpotinstAccountId() { + return spotinstAccountId; + } + + public void setSpotinstAccountId(String spotinstAccountId) { + isSet.add("spotinstAccountId"); + this.spotinstAccountId = spotinstAccountId; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region Builder class + public static class Builder { + private Route53Domains route53Domains; + + private Builder() { + this.route53Domains = new Route53Domains(); + } + + public static Builder get() { + return new Builder(); + } + + public Builder setHostedZoneId(final String hostedZoneId) { + route53Domains.setHostedZoneId(hostedZoneId); + return this; + } + + public Builder setRecordSets(final List recordSets) { + route53Domains.setRecordSets(recordSets); + return this; + } + + public Builder setRecordSetType(final Route53RecordSetType recordSetType) { + route53Domains.setRecordSetType(recordSetType); + return this; + } + + public Builder setSpotinstAccountId(final String spotinstAccountId) { + route53Domains.setSpotinstAccountId(spotinstAccountId); + return this; + } + + public Route53Domains build() { + return route53Domains; + } + } + //endregion + + //region isSet methods + // Is hostedZoneId Set boolean method + @JsonIgnore + public boolean isHostedZoneIdSet() { + return isSet.contains("hostedZoneId"); + } + + // Is recordSets Set boolean method + @JsonIgnore + public boolean isRecordSetsSet() { + return isSet.contains("recordSets"); + } + + // Is recordSetType Set boolean method + @JsonIgnore + public boolean isRecordSetTypeSet() { + return isSet.contains("recordSetType"); + } + + // Is spotinstAccountId Set boolean method + @JsonIgnore + public boolean isSpotinstAccountIdSet() { + return isSet.contains("spotinstAccountId"); + } + //endregion +} diff --git a/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/TlsConfig.java b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/TlsConfig.java new file mode 100644 index 000000000..0b8a35250 --- /dev/null +++ b/src/main/java/com/spotinst/sdkjava/model/bl/elastigroup/aws/TlsConfig.java @@ -0,0 +1,120 @@ +package com.spotinst.sdkjava.model.bl.elastigroup.aws; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.spotinst.sdkjava.model.ElastigroupAutoScaleSpecification; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class TlsConfig { + //region Members + // Partial Update support + @JsonIgnore + private Set isSet; + private String certificate; + private String privateKey; + private String tlsEnabled; + //endregion + + //region Constructor + + private TlsConfig() { + isSet = new HashSet<>(); + } + //endregion + + //region Getters & Setters + + + public String getCertificate() { + return certificate; + } + + public void setCertificate(String certificate) { + isSet.add("certificate"); + this.certificate = certificate; + } + + public String getPrivateKey() { + return privateKey; + } + + public void setPrivateKey(String privateKey) { + isSet.add("privateKey"); + this.privateKey = privateKey; + } + + public String getTlsEnabled() { + return tlsEnabled; + } + + public void setTlsEnabled(String tlsEnabled) { + isSet.add("tlsEnabled"); + this.tlsEnabled = tlsEnabled; + } + + public Set getIsSet() { + return isSet; + } + + public void setIsSet(Set isSet) { + this.isSet = isSet; + } + + //endregion + //region Builder class + public static class Builder { + private TlsConfig tlsConfig; + + private Builder() { + this.tlsConfig = new TlsConfig(); + } + + public static Builder get() { + return new Builder(); + } + + public Builder setCertificate(final String certificate) { + tlsConfig.setCertificate(certificate); + return this; + } + + public Builder setPrivateKey(final String privateKey) { + tlsConfig.setPrivateKey(privateKey); + return this; + } + + public Builder setTlsEnabled(final String tlsEnabled) { + tlsConfig.setTlsEnabled(tlsEnabled); + return this; + } + public TlsConfig build() { + return tlsConfig; + } + } + //endregion + + //region isSet methods + // Is certificate Set boolean method + @JsonIgnore + public boolean isCertificateSet() { + return isSet.contains("certificate"); + } + // Is privateKey Set boolean method + @JsonIgnore + public boolean isPrivateKeySet() { + return isSet.contains("privateKey"); + } + // Is tlsEnabled Set boolean method + @JsonIgnore + public boolean isTlsEnabledSet() { + return isSet.contains("tlsEnabled"); + } + + //endregion +}