diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/mailgun/v1/EmailsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/mailgun/v1/EmailsSteps.java index 6159bc26..d3445ba9 100644 --- a/client/src/test/java/com/sinch/sdk/e2e/domains/mailgun/v1/EmailsSteps.java +++ b/client/src/test/java/com/sinch/sdk/e2e/domains/mailgun/v1/EmailsSteps.java @@ -4,8 +4,7 @@ import com.sinch.sdk.domains.mailgun.api.v1.EmailsService; import com.sinch.sdk.domains.mailgun.models.v1.emails.request.SendEmailRequest; import com.sinch.sdk.domains.mailgun.models.v1.emails.request.SendMimeEmailRequest; -import com.sinch.sdk.domains.mailgun.models.v1.emails.response.ExceededQueueQuotaRegular; -import com.sinch.sdk.domains.mailgun.models.v1.emails.response.ExceededQueueQuotaScheduled; +import com.sinch.sdk.domains.mailgun.models.v1.emails.response.ExceededQueueQuota; import com.sinch.sdk.domains.mailgun.models.v1.emails.response.GetStoredEmailResponse; import com.sinch.sdk.domains.mailgun.models.v1.emails.response.QueueStatusDisabledDetails; import com.sinch.sdk.domains.mailgun.models.v1.emails.response.SendEmailResponse; @@ -160,15 +159,15 @@ public void getSendingQueuesStatusResult() { SendingQueuesStatusResponse expected = SendingQueuesStatusResponse.builder() .setRegular( - ExceededQueueQuotaRegular.builder() + ExceededQueueQuota.builder() .setIsDisabled(false) - .setDisabled( + .setDetails( QueueStatusDisabledDetails.builder().setUntil("").setReason("").build()) .build()) .setScheduled( - ExceededQueueQuotaScheduled.builder() + ExceededQueueQuota.builder() .setIsDisabled(false) - .setDisabled( + .setDetails( QueueStatusDisabledDetails.builder().setUntil("").setReason("").build()) .build()) .build(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequest.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequest.java index 51449e61..2f0d8441 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequest.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequest.java @@ -318,8 +318,8 @@ public static String valueOf(TrackingClicksEnum e) { Boolean getRequireTls(); /** - * If skip activated, the certificate and hostname of the resolved MX Host will not - * be verified when trying to establish a TLS connection. If not, Mailgun will verify the + * If true, the certificate and hostname of the resolved MX Host will not be verified + * when trying to establish a TLS connection. If false, Mailgun will verify the * certificate and hostname. If either one can not be verified, a TLS connection will not be * established. The default is false * @@ -341,6 +341,45 @@ public static String valueOf(TrackingClicksEnum e) { */ String getSendingIpPool(); + /** + * If you send long emails that experience truncation or other rendering issues at the recipient, + * you can ensure opens are being tracked accurately with placement of the tracking pixel at the + * top of your emails + */ + public class TrackingPixelLocationTopEnum + extends EnumDynamic { + public static final TrackingPixelLocationTopEnum YES = new TrackingPixelLocationTopEnum("yes"); + public static final TrackingPixelLocationTopEnum NO = new TrackingPixelLocationTopEnum("no"); + public static final TrackingPixelLocationTopEnum TRUE = + new TrackingPixelLocationTopEnum("true"); + public static final TrackingPixelLocationTopEnum FALSE = + new TrackingPixelLocationTopEnum("false"); + public static final TrackingPixelLocationTopEnum HTMLONLY = + new TrackingPixelLocationTopEnum("htmlonly"); + + private static final EnumSupportDynamic ENUM_SUPPORT = + new EnumSupportDynamic<>( + TrackingPixelLocationTopEnum.class, + TrackingPixelLocationTopEnum::new, + Arrays.asList(YES, NO, TRUE, FALSE, HTMLONLY)); + + private TrackingPixelLocationTopEnum(String value) { + super(value); + } + + public static Stream values() { + return ENUM_SUPPORT.values(); + } + + public static TrackingPixelLocationTopEnum from(String value) { + return ENUM_SUPPORT.from(value); + } + + public static String valueOf(TrackingPixelLocationTopEnum e) { + return ENUM_SUPPORT.valueOf(e); + } + } + /** * If you send long emails that experience truncation or other rendering issues at the recipient, * you can ensure opens are being tracked accurately with placement of the tracking pixel at the @@ -348,7 +387,7 @@ public static String valueOf(TrackingClicksEnum e) { * * @return trackingPixelLocationTop */ - String getTrackingPixelLocationTop(); + TrackingPixelLocationTopEnum getTrackingPixelLocationTop(); /** * A valid JSON-encoded dictionary, where key is a plain recipient address and value is a @@ -639,7 +678,7 @@ interface Builder extends AdditionalProperties.Builder { * @return Current builder * @see #getTrackingPixelLocationTop */ - Builder setTrackingPixelLocationTop(String trackingPixelLocationTop); + Builder setTrackingPixelLocationTop(TrackingPixelLocationTopEnum trackingPixelLocationTop); /** * see getter diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestImpl.java index 28f9167d..8ccf830d 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestImpl.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestImpl.java @@ -133,7 +133,7 @@ public class SendEmailRequestImpl implements SendEmailRequest { public static final String PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP = "o:tracking-pixel-location-top"; - private OptionalValue trackingPixelLocationTop; + private OptionalValue trackingPixelLocationTop; public static final String PROPERTY_RECIPIENT_VARIABLES = "recipient-variables"; @@ -177,7 +177,7 @@ protected SendEmailRequestImpl( OptionalValue skipVerification, OptionalValue sendingIp, OptionalValue sendingIpPool, - OptionalValue trackingPixelLocationTop, + OptionalValue trackingPixelLocationTop, OptionalValue recipientVariables, OptionalValue> additionalProperties) { this.from = from; @@ -484,12 +484,12 @@ public OptionalValue sendingIpPool() { return sendingIpPool; } - public String getTrackingPixelLocationTop() { + public TrackingPixelLocationTopEnum getTrackingPixelLocationTop() { return trackingPixelLocationTop.orElse(null); } @Property(PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP) - public OptionalValue trackingPixelLocationTop() { + public OptionalValue trackingPixelLocationTop() { return trackingPixelLocationTop; } @@ -730,7 +730,7 @@ static class Builder implements SendEmailRequest.Builder { OptionalValue skipVerification = OptionalValue.empty(); OptionalValue sendingIp = OptionalValue.empty(); OptionalValue sendingIpPool = OptionalValue.empty(); - OptionalValue trackingPixelLocationTop = OptionalValue.empty(); + OptionalValue trackingPixelLocationTop = OptionalValue.empty(); OptionalValue recipientVariables = OptionalValue.empty(); OptionalValue> additionalProperties = OptionalValue.empty(); @@ -909,7 +909,8 @@ public Builder setSendingIpPool(String sendingIpPool) { } @Property(value = PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP) - public Builder setTrackingPixelLocationTop(String trackingPixelLocationTop) { + public Builder setTrackingPixelLocationTop( + TrackingPixelLocationTopEnum trackingPixelLocationTop) { this.trackingPixelLocationTop = OptionalValue.of(trackingPixelLocationTop); return this; } diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequest.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequest.java index 503d16ba..ecc281ae 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequest.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequest.java @@ -57,7 +57,7 @@ public interface SendMimeEmailRequest extends AdditionalProperties { String getTemplateVersion(); /** - * Render template in case of template sending + * Render template in the text part of the message in case of template sending * * @return templateText */ @@ -256,8 +256,8 @@ public static String valueOf(TrackingClicksEnum e) { Boolean getRequireTls(); /** - * If skip activated, the certificate and hostname of the resolved MX Host will not - * be verified when trying to establish a TLS connection. If not, Mailgun will verify the + * If true, the certificate and hostname of the resolved MX Host will not be verified + * when trying to establish a TLS connection. If false, Mailgun will verify the * certificate and hostname. If either one can not be verified, a TLS connection will not be * established. The default is false * @@ -279,6 +279,45 @@ public static String valueOf(TrackingClicksEnum e) { */ String getSendingIpPool(); + /** + * If you send long emails that experience truncation or other rendering issues at the recipient, + * you can ensure opens are being tracked accurately with placement of the tracking pixel at the + * top of your emails + */ + public class TrackingPixelLocationTopEnum + extends EnumDynamic { + public static final TrackingPixelLocationTopEnum YES = new TrackingPixelLocationTopEnum("yes"); + public static final TrackingPixelLocationTopEnum NO = new TrackingPixelLocationTopEnum("no"); + public static final TrackingPixelLocationTopEnum TRUE = + new TrackingPixelLocationTopEnum("true"); + public static final TrackingPixelLocationTopEnum FALSE = + new TrackingPixelLocationTopEnum("false"); + public static final TrackingPixelLocationTopEnum HTMLONLY = + new TrackingPixelLocationTopEnum("htmlonly"); + + private static final EnumSupportDynamic ENUM_SUPPORT = + new EnumSupportDynamic<>( + TrackingPixelLocationTopEnum.class, + TrackingPixelLocationTopEnum::new, + Arrays.asList(YES, NO, TRUE, FALSE, HTMLONLY)); + + private TrackingPixelLocationTopEnum(String value) { + super(value); + } + + public static Stream values() { + return ENUM_SUPPORT.values(); + } + + public static TrackingPixelLocationTopEnum from(String value) { + return ENUM_SUPPORT.from(value); + } + + public static String valueOf(TrackingPixelLocationTopEnum e) { + return ENUM_SUPPORT.valueOf(e); + } + } + /** * If you send long emails that experience truncation or other rendering issues at the recipient, * you can ensure opens are being tracked accurately with placement of the tracking pixel at the @@ -286,7 +325,7 @@ public static String valueOf(TrackingClicksEnum e) { * * @return trackingPixelLocationTop */ - String getTrackingPixelLocationTop(); + TrackingPixelLocationTopEnum getTrackingPixelLocationTop(); /** * A valid JSON-encoded dictionary, where key is a plain recipient address and value is a @@ -505,7 +544,7 @@ interface Builder extends AdditionalProperties.Builder { * @return Current builder * @see #getTrackingPixelLocationTop */ - Builder setTrackingPixelLocationTop(String trackingPixelLocationTop); + Builder setTrackingPixelLocationTop(TrackingPixelLocationTopEnum trackingPixelLocationTop); /** * see getter diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestImpl.java index 11eeb8ac..ae9a1c3f 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestImpl.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestImpl.java @@ -101,7 +101,7 @@ public class SendMimeEmailRequestImpl implements SendMimeEmailRequest { public static final String PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP = "o:tracking-pixel-location-top"; - private OptionalValue trackingPixelLocationTop; + private OptionalValue trackingPixelLocationTop; public static final String PROPERTY_RECIPIENT_VARIABLES = "recipient-variables"; @@ -137,7 +137,7 @@ protected SendMimeEmailRequestImpl( OptionalValue skipVerification, OptionalValue sendingIp, OptionalValue sendingIpPool, - OptionalValue trackingPixelLocationTop, + OptionalValue trackingPixelLocationTop, OptionalValue recipientVariables, OptionalValue> additionalProperties) { this.to = to; @@ -364,12 +364,12 @@ public OptionalValue sendingIpPool() { return sendingIpPool; } - public String getTrackingPixelLocationTop() { + public TrackingPixelLocationTopEnum getTrackingPixelLocationTop() { return trackingPixelLocationTop.orElse(null); } @Property(PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP) - public OptionalValue trackingPixelLocationTop() { + public OptionalValue trackingPixelLocationTop() { return trackingPixelLocationTop; } @@ -581,7 +581,7 @@ static class Builder implements SendMimeEmailRequest.Builder { OptionalValue skipVerification = OptionalValue.empty(); OptionalValue sendingIp = OptionalValue.empty(); OptionalValue sendingIpPool = OptionalValue.empty(); - OptionalValue trackingPixelLocationTop = OptionalValue.empty(); + OptionalValue trackingPixelLocationTop = OptionalValue.empty(); OptionalValue recipientVariables = OptionalValue.empty(); OptionalValue> additionalProperties = OptionalValue.empty(); @@ -712,7 +712,8 @@ public Builder setSendingIpPool(String sendingIpPool) { } @Property(value = PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP) - public Builder setTrackingPixelLocationTop(String trackingPixelLocationTop) { + public Builder setTrackingPixelLocationTop( + TrackingPixelLocationTopEnum trackingPixelLocationTop) { this.trackingPixelLocationTop = OptionalValue.of(trackingPixelLocationTop); return this; } diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaRegular.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuota.java similarity index 68% rename from openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaRegular.java rename to openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuota.java index 114fad71..e19167dd 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaRegular.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuota.java @@ -12,23 +12,23 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -/** ExceededQueueQuotaRegular */ -@JsonDeserialize(builder = ExceededQueueQuotaRegularImpl.Builder.class) -public interface ExceededQueueQuotaRegular { +/** ExceededQueueQuota */ +@JsonDeserialize(builder = ExceededQueueQuotaImpl.Builder.class) +public interface ExceededQueueQuota { /** - * Get disabled + * Get isDisabled * - * @return disabled + * @return isDisabled */ - QueueStatusDisabledDetails getDisabled(); + Boolean getIsDisabled(); /** - * Get isDisabled + * Get details * - * @return isDisabled + * @return details */ - Boolean getIsDisabled(); + QueueStatusDisabledDetails getDetails(); /** * Getting builder @@ -36,7 +36,7 @@ public interface ExceededQueueQuotaRegular { * @return New Builder instance */ static Builder builder() { - return new ExceededQueueQuotaRegularImpl.Builder(); + return new ExceededQueueQuotaImpl.Builder(); } /** Dedicated Builder */ @@ -45,26 +45,26 @@ interface Builder { /** * see getter * - * @param disabled see getter + * @param isDisabled see getter * @return Current builder - * @see #getDisabled + * @see #getIsDisabled */ - Builder setDisabled(QueueStatusDisabledDetails disabled); + Builder setIsDisabled(Boolean isDisabled); /** * see getter * - * @param isDisabled see getter + * @param details see getter * @return Current builder - * @see #getIsDisabled + * @see #getDetails */ - Builder setIsDisabled(Boolean isDisabled); + Builder setDetails(QueueStatusDisabledDetails details); /** * Create instance * * @return The instance build with current builder values */ - ExceededQueueQuotaRegular build(); + ExceededQueueQuota build(); } } diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaRegularImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaImpl.java similarity index 63% rename from openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaRegularImpl.java rename to openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaImpl.java index 5cf08180..051af9d6 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaRegularImpl.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaImpl.java @@ -10,39 +10,28 @@ import java.util.Objects; @JsonPropertyOrder({ - ExceededQueueQuotaRegularImpl.JSON_PROPERTY_DISABLED, - ExceededQueueQuotaRegularImpl.JSON_PROPERTY_IS_DISABLED + ExceededQueueQuotaImpl.JSON_PROPERTY_IS_DISABLED, + ExceededQueueQuotaImpl.JSON_PROPERTY_DISABLED }) @JsonFilter("uninitializedFilter") @JsonInclude(value = JsonInclude.Include.CUSTOM) -public class ExceededQueueQuotaRegularImpl implements ExceededQueueQuotaRegular { +public class ExceededQueueQuotaImpl implements ExceededQueueQuota { private static final long serialVersionUID = 1L; - public static final String JSON_PROPERTY_DISABLED = "disabled"; - - private OptionalValue disabled; - public static final String JSON_PROPERTY_IS_DISABLED = "is_disabled"; private OptionalValue isDisabled; - public ExceededQueueQuotaRegularImpl() {} + public static final String JSON_PROPERTY_DISABLED = "disabled"; - protected ExceededQueueQuotaRegularImpl( - OptionalValue disabled, OptionalValue isDisabled) { - this.disabled = disabled; - this.isDisabled = isDisabled; - } + private OptionalValue details; - @JsonIgnore - public QueueStatusDisabledDetails getDisabled() { - return disabled.orElse(null); - } + public ExceededQueueQuotaImpl() {} - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OptionalValue disabled() { - return disabled; + protected ExceededQueueQuotaImpl( + OptionalValue isDisabled, OptionalValue details) { + this.isDisabled = isDisabled; + this.details = details; } @JsonIgnore @@ -56,6 +45,17 @@ public OptionalValue isDisabled() { return isDisabled; } + @JsonIgnore + public QueueStatusDisabledDetails getDetails() { + return details.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OptionalValue details() { + return details; + } + /** * Return true if this github.com-mailgun-domains-httpapi-ExceededQueueQuotaJSON object is equal * to o. @@ -68,25 +68,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExceededQueueQuotaRegularImpl githubComMailgunDomainsHttpapiExceededQueueQuotaJSON = - (ExceededQueueQuotaRegularImpl) o; + ExceededQueueQuotaImpl githubComMailgunDomainsHttpapiExceededQueueQuotaJSON = + (ExceededQueueQuotaImpl) o; return Objects.equals( - this.disabled, githubComMailgunDomainsHttpapiExceededQueueQuotaJSON.disabled) + this.isDisabled, githubComMailgunDomainsHttpapiExceededQueueQuotaJSON.isDisabled) && Objects.equals( - this.isDisabled, githubComMailgunDomainsHttpapiExceededQueueQuotaJSON.isDisabled); + this.details, githubComMailgunDomainsHttpapiExceededQueueQuotaJSON.details); } @Override public int hashCode() { - return Objects.hash(disabled, isDisabled); + return Objects.hash(isDisabled, details); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExceededQueueQuotaRegularImpl {\n"); - sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); + sb.append("class ExceededQueueQuotaImpl {\n"); sb.append(" isDisabled: ").append(toIndentedString(isDisabled)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append("}"); return sb.toString(); } @@ -102,15 +102,9 @@ private String toIndentedString(Object o) { } @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements ExceededQueueQuotaRegular.Builder { - OptionalValue disabled = OptionalValue.empty(); + static class Builder implements ExceededQueueQuota.Builder { OptionalValue isDisabled = OptionalValue.empty(); - - @JsonProperty(JSON_PROPERTY_DISABLED) - public Builder setDisabled(QueueStatusDisabledDetails disabled) { - this.disabled = OptionalValue.of(disabled); - return this; - } + OptionalValue details = OptionalValue.empty(); @JsonProperty(JSON_PROPERTY_IS_DISABLED) public Builder setIsDisabled(Boolean isDisabled) { @@ -118,8 +112,14 @@ public Builder setIsDisabled(Boolean isDisabled) { return this; } - public ExceededQueueQuotaRegular build() { - return new ExceededQueueQuotaRegularImpl(disabled, isDisabled); + @JsonProperty(JSON_PROPERTY_DISABLED) + public Builder setDetails(QueueStatusDisabledDetails details) { + this.details = OptionalValue.of(details); + return this; + } + + public ExceededQueueQuota build() { + return new ExceededQueueQuotaImpl(isDisabled, details); } } } diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaScheduled.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaScheduled.java deleted file mode 100644 index e19d5458..00000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaScheduled.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Mailgun API - * - * OpenAPI document version: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit the class manually. - */ - -package com.sinch.sdk.domains.mailgun.models.v1.emails.response; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -/** ExceededQueueQuotaScheduled */ -@JsonDeserialize(builder = ExceededQueueQuotaScheduledImpl.Builder.class) -public interface ExceededQueueQuotaScheduled { - - /** - * Get disabled - * - * @return disabled - */ - QueueStatusDisabledDetails getDisabled(); - - /** - * Get isDisabled - * - * @return isDisabled - */ - Boolean getIsDisabled(); - - /** - * Getting builder - * - * @return New Builder instance - */ - static Builder builder() { - return new ExceededQueueQuotaScheduledImpl.Builder(); - } - - /** Dedicated Builder */ - interface Builder { - - /** - * see getter - * - * @param disabled see getter - * @return Current builder - * @see #getDisabled - */ - Builder setDisabled(QueueStatusDisabledDetails disabled); - - /** - * see getter - * - * @param isDisabled see getter - * @return Current builder - * @see #getIsDisabled - */ - Builder setIsDisabled(Boolean isDisabled); - - /** - * Create instance - * - * @return The instance build with current builder values - */ - ExceededQueueQuotaScheduled build(); - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaScheduledImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaScheduledImpl.java deleted file mode 100644 index 5ae6fd28..00000000 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/ExceededQueueQuotaScheduledImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.sinch.sdk.domains.mailgun.models.v1.emails.response; - -import com.fasterxml.jackson.annotation.JsonFilter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.sinch.sdk.core.models.OptionalValue; -import java.util.Objects; - -@JsonPropertyOrder({ - ExceededQueueQuotaScheduledImpl.JSON_PROPERTY_DISABLED, - ExceededQueueQuotaScheduledImpl.JSON_PROPERTY_IS_DISABLED -}) -@JsonFilter("uninitializedFilter") -@JsonInclude(value = JsonInclude.Include.CUSTOM) -public class ExceededQueueQuotaScheduledImpl implements ExceededQueueQuotaScheduled { - private static final long serialVersionUID = 1L; - - public static final String JSON_PROPERTY_DISABLED = "disabled"; - - private OptionalValue disabled; - - public static final String JSON_PROPERTY_IS_DISABLED = "is_disabled"; - - private OptionalValue isDisabled; - - public ExceededQueueQuotaScheduledImpl() {} - - protected ExceededQueueQuotaScheduledImpl( - OptionalValue disabled, OptionalValue isDisabled) { - this.disabled = disabled; - this.isDisabled = isDisabled; - } - - @JsonIgnore - public QueueStatusDisabledDetails getDisabled() { - return disabled.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_DISABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OptionalValue disabled() { - return disabled; - } - - @JsonIgnore - public Boolean getIsDisabled() { - return isDisabled.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_IS_DISABLED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue isDisabled() { - return isDisabled; - } - - /** - * Return true if this github_com_mailgun_domains_httpapi_GetDomainSendingQueuesResp_scheduled - * object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExceededQueueQuotaScheduledImpl - githubComMailgunDomainsHttpapiGetDomainSendingQueuesRespScheduled = - (ExceededQueueQuotaScheduledImpl) o; - return Objects.equals( - this.disabled, - githubComMailgunDomainsHttpapiGetDomainSendingQueuesRespScheduled.disabled) - && Objects.equals( - this.isDisabled, - githubComMailgunDomainsHttpapiGetDomainSendingQueuesRespScheduled.isDisabled); - } - - @Override - public int hashCode() { - return Objects.hash(disabled, isDisabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExceededQueueQuotaScheduledImpl {\n"); - sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); - sb.append(" isDisabled: ").append(toIndentedString(isDisabled)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - @JsonPOJOBuilder(withPrefix = "set") - static class Builder implements ExceededQueueQuotaScheduled.Builder { - OptionalValue disabled = OptionalValue.empty(); - OptionalValue isDisabled = OptionalValue.empty(); - - @JsonProperty(JSON_PROPERTY_DISABLED) - public Builder setDisabled(QueueStatusDisabledDetails disabled) { - this.disabled = OptionalValue.of(disabled); - return this; - } - - @JsonProperty(JSON_PROPERTY_IS_DISABLED) - public Builder setIsDisabled(Boolean isDisabled) { - this.isDisabled = OptionalValue.of(isDisabled); - return this; - } - - public ExceededQueueQuotaScheduled build() { - return new ExceededQueueQuotaScheduledImpl(disabled, isDisabled); - } - } -} diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetails.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetails.java index a9ef2324..b7421899 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetails.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetails.java @@ -17,18 +17,18 @@ public interface QueueStatusDisabledDetails { /** - * Get reason + * Get until * - * @return reason + * @return until */ - String getReason(); + String getUntil(); /** - * Get until + * Get reason * - * @return until + * @return reason */ - String getUntil(); + String getReason(); /** * Getting builder @@ -45,20 +45,20 @@ interface Builder { /** * see getter * - * @param reason see getter + * @param until see getter * @return Current builder - * @see #getReason + * @see #getUntil */ - Builder setReason(String reason); + Builder setUntil(String until); /** * see getter * - * @param until see getter + * @param reason see getter * @return Current builder - * @see #getUntil + * @see #getReason */ - Builder setUntil(String until); + Builder setReason(String reason); /** * Create instance diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetailsImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetailsImpl.java index 3bf80142..9cbf9124 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetailsImpl.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/QueueStatusDisabledDetailsImpl.java @@ -10,50 +10,50 @@ import java.util.Objects; @JsonPropertyOrder({ - QueueStatusDisabledDetailsImpl.JSON_PROPERTY_REASON, - QueueStatusDisabledDetailsImpl.JSON_PROPERTY_UNTIL + QueueStatusDisabledDetailsImpl.JSON_PROPERTY_UNTIL, + QueueStatusDisabledDetailsImpl.JSON_PROPERTY_REASON }) @JsonFilter("uninitializedFilter") @JsonInclude(value = JsonInclude.Include.CUSTOM) public class QueueStatusDisabledDetailsImpl implements QueueStatusDisabledDetails { private static final long serialVersionUID = 1L; - public static final String JSON_PROPERTY_REASON = "reason"; - - private OptionalValue reason; - public static final String JSON_PROPERTY_UNTIL = "until"; private OptionalValue until; + public static final String JSON_PROPERTY_REASON = "reason"; + + private OptionalValue reason; + public QueueStatusDisabledDetailsImpl() {} protected QueueStatusDisabledDetailsImpl( - OptionalValue reason, OptionalValue until) { - this.reason = reason; + OptionalValue until, OptionalValue reason) { this.until = until; + this.reason = reason; } @JsonIgnore - public String getReason() { - return reason.orElse(null); + public String getUntil() { + return until.orElse(null); } - @JsonProperty(JSON_PROPERTY_REASON) + @JsonProperty(JSON_PROPERTY_UNTIL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue reason() { - return reason; + public OptionalValue until() { + return until; } @JsonIgnore - public String getUntil() { - return until.orElse(null); + public String getReason() { + return reason.orElse(null); } - @JsonProperty(JSON_PROPERTY_UNTIL) + @JsonProperty(JSON_PROPERTY_REASON) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue until() { - return until; + public OptionalValue reason() { + return reason; } /** @@ -71,22 +71,22 @@ public boolean equals(Object o) { QueueStatusDisabledDetailsImpl githubComMailgunDomainsHttpapiExceededQueueQuotaDisabledJSON = (QueueStatusDisabledDetailsImpl) o; return Objects.equals( - this.reason, githubComMailgunDomainsHttpapiExceededQueueQuotaDisabledJSON.reason) + this.until, githubComMailgunDomainsHttpapiExceededQueueQuotaDisabledJSON.until) && Objects.equals( - this.until, githubComMailgunDomainsHttpapiExceededQueueQuotaDisabledJSON.until); + this.reason, githubComMailgunDomainsHttpapiExceededQueueQuotaDisabledJSON.reason); } @Override public int hashCode() { - return Objects.hash(reason, until); + return Objects.hash(until, reason); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QueueStatusDisabledDetailsImpl {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" until: ").append(toIndentedString(until)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append("}"); return sb.toString(); } @@ -103,14 +103,8 @@ private String toIndentedString(Object o) { @JsonPOJOBuilder(withPrefix = "set") static class Builder implements QueueStatusDisabledDetails.Builder { - OptionalValue reason = OptionalValue.empty(); OptionalValue until = OptionalValue.empty(); - - @JsonProperty(JSON_PROPERTY_REASON) - public Builder setReason(String reason) { - this.reason = OptionalValue.of(reason); - return this; - } + OptionalValue reason = OptionalValue.empty(); @JsonProperty(JSON_PROPERTY_UNTIL) public Builder setUntil(String until) { @@ -118,8 +112,14 @@ public Builder setUntil(String until) { return this; } + @JsonProperty(JSON_PROPERTY_REASON) + public Builder setReason(String reason) { + this.reason = OptionalValue.of(reason); + return this; + } + public QueueStatusDisabledDetails build() { - return new QueueStatusDisabledDetailsImpl(reason, until); + return new QueueStatusDisabledDetailsImpl(until, reason); } } } diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponse.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponse.java index f300ed01..4dd34806 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponse.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponse.java @@ -17,18 +17,18 @@ public interface SendingQueuesStatusResponse { /** - * Get scheduled + * Get regular * - * @return scheduled + * @return regular */ - ExceededQueueQuotaScheduled getScheduled(); + ExceededQueueQuota getRegular(); /** - * Get regular + * Get scheduled * - * @return regular + * @return scheduled */ - ExceededQueueQuotaRegular getRegular(); + ExceededQueueQuota getScheduled(); /** * Getting builder @@ -45,20 +45,20 @@ interface Builder { /** * see getter * - * @param scheduled see getter + * @param regular see getter * @return Current builder - * @see #getScheduled + * @see #getRegular */ - Builder setScheduled(ExceededQueueQuotaScheduled scheduled); + Builder setRegular(ExceededQueueQuota regular); /** * see getter * - * @param regular see getter + * @param scheduled see getter * @return Current builder - * @see #getRegular + * @see #getScheduled */ - Builder setRegular(ExceededQueueQuotaRegular regular); + Builder setScheduled(ExceededQueueQuota scheduled); /** * Create instance diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseImpl.java b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseImpl.java index 04572a4c..4ede35fc 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseImpl.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseImpl.java @@ -10,51 +10,50 @@ import java.util.Objects; @JsonPropertyOrder({ - SendingQueuesStatusResponseImpl.JSON_PROPERTY_SCHEDULED, - SendingQueuesStatusResponseImpl.JSON_PROPERTY_REGULAR + SendingQueuesStatusResponseImpl.JSON_PROPERTY_REGULAR, + SendingQueuesStatusResponseImpl.JSON_PROPERTY_SCHEDULED }) @JsonFilter("uninitializedFilter") @JsonInclude(value = JsonInclude.Include.CUSTOM) public class SendingQueuesStatusResponseImpl implements SendingQueuesStatusResponse { private static final long serialVersionUID = 1L; - public static final String JSON_PROPERTY_SCHEDULED = "scheduled"; + public static final String JSON_PROPERTY_REGULAR = "regular"; - private OptionalValue scheduled; + private OptionalValue regular; - public static final String JSON_PROPERTY_REGULAR = "regular"; + public static final String JSON_PROPERTY_SCHEDULED = "scheduled"; - private OptionalValue regular; + private OptionalValue scheduled; public SendingQueuesStatusResponseImpl() {} protected SendingQueuesStatusResponseImpl( - OptionalValue scheduled, - OptionalValue regular) { - this.scheduled = scheduled; + OptionalValue regular, OptionalValue scheduled) { this.regular = regular; + this.scheduled = scheduled; } @JsonIgnore - public ExceededQueueQuotaScheduled getScheduled() { - return scheduled.orElse(null); + public ExceededQueueQuota getRegular() { + return regular.orElse(null); } - @JsonProperty(JSON_PROPERTY_SCHEDULED) + @JsonProperty(JSON_PROPERTY_REGULAR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue scheduled() { - return scheduled; + public OptionalValue regular() { + return regular; } @JsonIgnore - public ExceededQueueQuotaRegular getRegular() { - return regular.orElse(null); + public ExceededQueueQuota getScheduled() { + return scheduled.orElse(null); } - @JsonProperty(JSON_PROPERTY_REGULAR) + @JsonProperty(JSON_PROPERTY_SCHEDULED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OptionalValue regular() { - return regular; + public OptionalValue scheduled() { + return scheduled; } /** @@ -72,22 +71,22 @@ public boolean equals(Object o) { SendingQueuesStatusResponseImpl githubComMailgunDomainsHttpapiGetDomainSendingQueuesResp = (SendingQueuesStatusResponseImpl) o; return Objects.equals( - this.scheduled, githubComMailgunDomainsHttpapiGetDomainSendingQueuesResp.scheduled) + this.regular, githubComMailgunDomainsHttpapiGetDomainSendingQueuesResp.regular) && Objects.equals( - this.regular, githubComMailgunDomainsHttpapiGetDomainSendingQueuesResp.regular); + this.scheduled, githubComMailgunDomainsHttpapiGetDomainSendingQueuesResp.scheduled); } @Override public int hashCode() { - return Objects.hash(scheduled, regular); + return Objects.hash(regular, scheduled); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SendingQueuesStatusResponseImpl {\n"); - sb.append(" scheduled: ").append(toIndentedString(scheduled)).append("\n"); sb.append(" regular: ").append(toIndentedString(regular)).append("\n"); + sb.append(" scheduled: ").append(toIndentedString(scheduled)).append("\n"); sb.append("}"); return sb.toString(); } @@ -104,23 +103,23 @@ private String toIndentedString(Object o) { @JsonPOJOBuilder(withPrefix = "set") static class Builder implements SendingQueuesStatusResponse.Builder { - OptionalValue scheduled = OptionalValue.empty(); - OptionalValue regular = OptionalValue.empty(); + OptionalValue regular = OptionalValue.empty(); + OptionalValue scheduled = OptionalValue.empty(); - @JsonProperty(JSON_PROPERTY_SCHEDULED) - public Builder setScheduled(ExceededQueueQuotaScheduled scheduled) { - this.scheduled = OptionalValue.of(scheduled); + @JsonProperty(JSON_PROPERTY_REGULAR) + public Builder setRegular(ExceededQueueQuota regular) { + this.regular = OptionalValue.of(regular); return this; } - @JsonProperty(JSON_PROPERTY_REGULAR) - public Builder setRegular(ExceededQueueQuotaRegular regular) { - this.regular = OptionalValue.of(regular); + @JsonProperty(JSON_PROPERTY_SCHEDULED) + public Builder setScheduled(ExceededQueueQuota scheduled) { + this.scheduled = OptionalValue.of(scheduled); return this; } public SendingQueuesStatusResponse build() { - return new SendingQueuesStatusResponseImpl(scheduled, regular); + return new SendingQueuesStatusResponseImpl(regular, scheduled); } } } diff --git a/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestTest.java b/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestTest.java index 153afd8f..1e99b561 100644 --- a/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestTest.java +++ b/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendEmailRequestTest.java @@ -7,6 +7,7 @@ import com.sinch.sdk.core.http.HttpMapper; import com.sinch.sdk.domains.mailgun.models.v1.emails.request.SendEmailRequest.TrackingClicksEnum; import com.sinch.sdk.domains.mailgun.models.v1.emails.request.SendEmailRequest.TrackingEnum; +import com.sinch.sdk.domains.mailgun.models.v1.emails.request.SendEmailRequest.TrackingPixelLocationTopEnum; import java.io.File; import java.time.Instant; import java.util.Arrays; @@ -61,7 +62,7 @@ public class SendEmailRequestTest extends BaseTest { "o:skip-verification","true", "o:sending-ip","192.168.0.10", "o:sending-ip-pool","sending pool ID", - "o:tracking-pixel-location-top","foo", + "o:tracking-pixel-location-top","htmlonly", "recipient-variables","{\"cc-dest@sinch.com\": {\"variable1\": \"value1\"}}" // spotless:on ); @@ -97,7 +98,7 @@ public class SendEmailRequestTest extends BaseTest { .setSkipVerification(true) .setSendingIp("192.168.0.10") .setSendingIpPool("sending pool ID") - .setTrackingPixelLocationTop("foo") + .setTrackingPixelLocationTop(TrackingPixelLocationTopEnum.HTMLONLY) .setRecipientVariables("{\"cc-dest@sinch.com\": {\"variable1\": \"value1\"}}") .setTemplate("template value") .build(); diff --git a/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestTest.java b/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestTest.java index cc56a56c..00025812 100644 --- a/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestTest.java +++ b/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/request/SendMimeEmailRequestTest.java @@ -6,6 +6,7 @@ import com.sinch.sdk.core.databind.multipart.ObjectMapperTest; import com.sinch.sdk.core.http.HttpMapper; import com.sinch.sdk.domains.mailgun.models.v1.emails.request.SendMimeEmailRequest.TrackingClicksEnum; +import com.sinch.sdk.domains.mailgun.models.v1.emails.request.SendMimeEmailRequest.TrackingPixelLocationTopEnum; import java.io.File; import java.time.Instant; import java.util.Arrays; @@ -52,7 +53,7 @@ public class SendMimeEmailRequestTest extends BaseTest { "o:skip-verification","false", "o:sending-ip","192.168.0.10", "o:sending-ip-pool","sending pool ID", - "o:tracking-pixel-location-top","foo", + "o:tracking-pixel-location-top","htmlonly", "recipient-variables","{\"cc-dest@sinch.com\": {\"variable1\": \"value1\"}}" // spotless:on ); @@ -80,7 +81,7 @@ public class SendMimeEmailRequestTest extends BaseTest { .setSkipVerification(false) .setSendingIp("192.168.0.10") .setSendingIpPool("sending pool ID") - .setTrackingPixelLocationTop("foo") + .setTrackingPixelLocationTop(TrackingPixelLocationTopEnum.HTMLONLY) .setRecipientVariables("{\"cc-dest@sinch.com\": {\"variable1\": \"value1\"}}") .setTemplate("template value") .build(); diff --git a/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseTest.java b/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseTest.java index 67d00ea5..0205f89c 100644 --- a/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseTest.java +++ b/openapi-contracts/src/test/java/com/sinch/sdk/domains/mailgun/models/v1/emails/response/SendingQueuesStatusResponseTest.java @@ -12,18 +12,18 @@ public class SendingQueuesStatusResponseTest extends BaseTest { public static SendingQueuesStatusResponse expectedSendingQueuesStatusResponse = SendingQueuesStatusResponse.builder() .setRegular( - ExceededQueueQuotaRegular.builder() + ExceededQueueQuota.builder() .setIsDisabled(true) - .setDisabled( + .setDetails( QueueStatusDisabledDetails.builder() .setUntil("Mon, 24 Jan 2006 16:00:00 MST") .setReason("You have too many messages in regular queue") .build()) .build()) .setScheduled( - ExceededQueueQuotaScheduled.builder() + ExceededQueueQuota.builder() .setIsDisabled(true) - .setDisabled( + .setDetails( QueueStatusDisabledDetails.builder() .setUntil("Mon, 12 Jan 2006 15:04:05 MST") .setReason("You have too many messages in scheduled queue")