Skip to content

Commit

Permalink
refactor (Mailgun) Generated sources
Browse files Browse the repository at this point in the history
  • Loading branch information
JPPortier committed Dec 17, 2024
1 parent 936f5b8 commit ef1127d
Show file tree
Hide file tree
Showing 12 changed files with 241 additions and 360 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ public static String valueOf(TrackingClicksEnum e) {
Boolean getRequireTls();

/**
* If <code>skip</code> 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 <code>true</code>, the certificate and hostname of the resolved MX Host will not be verified
* when trying to establish a TLS connection. If <code>false</code>, Mailgun will verify the
* certificate and hostname. If either one can not be verified, a TLS connection will not be
* established. The default is <code>false</code>
*
Expand All @@ -341,14 +341,53 @@ 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<String, TrackingPixelLocationTopEnum> {
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<String, TrackingPixelLocationTopEnum> ENUM_SUPPORT =
new EnumSupportDynamic<>(
TrackingPixelLocationTopEnum.class,
TrackingPixelLocationTopEnum::new,
Arrays.asList(YES, NO, TRUE, FALSE, HTMLONLY));

private TrackingPixelLocationTopEnum(String value) {
super(value);
}

public static Stream<TrackingPixelLocationTopEnum> 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
* top of your emails
*
* @return trackingPixelLocationTop
*/
String getTrackingPixelLocationTop();
TrackingPixelLocationTopEnum getTrackingPixelLocationTop();

/**
* A valid JSON-encoded dictionary, where key is a plain recipient address and value is a
Expand Down Expand Up @@ -639,7 +678,7 @@ interface Builder extends AdditionalProperties.Builder {
* @return Current builder
* @see #getTrackingPixelLocationTop
*/
Builder setTrackingPixelLocationTop(String trackingPixelLocationTop);
Builder setTrackingPixelLocationTop(TrackingPixelLocationTopEnum trackingPixelLocationTop);

/**
* see getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> trackingPixelLocationTop;
private OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop;

public static final String PROPERTY_RECIPIENT_VARIABLES = "recipient-variables";

Expand Down Expand Up @@ -177,7 +177,7 @@ protected SendEmailRequestImpl(
OptionalValue<Boolean> skipVerification,
OptionalValue<String> sendingIp,
OptionalValue<String> sendingIpPool,
OptionalValue<String> trackingPixelLocationTop,
OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop,
OptionalValue<String> recipientVariables,
OptionalValue<Map<String, Object>> additionalProperties) {
this.from = from;
Expand Down Expand Up @@ -484,12 +484,12 @@ public OptionalValue<String> sendingIpPool() {
return sendingIpPool;
}

public String getTrackingPixelLocationTop() {
public TrackingPixelLocationTopEnum getTrackingPixelLocationTop() {
return trackingPixelLocationTop.orElse(null);
}

@Property(PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP)
public OptionalValue<String> trackingPixelLocationTop() {
public OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop() {
return trackingPixelLocationTop;
}

Expand Down Expand Up @@ -730,7 +730,7 @@ static class Builder implements SendEmailRequest.Builder {
OptionalValue<Boolean> skipVerification = OptionalValue.empty();
OptionalValue<String> sendingIp = OptionalValue.empty();
OptionalValue<String> sendingIpPool = OptionalValue.empty();
OptionalValue<String> trackingPixelLocationTop = OptionalValue.empty();
OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop = OptionalValue.empty();
OptionalValue<String> recipientVariables = OptionalValue.empty();
OptionalValue<Map<String, Object>> additionalProperties = OptionalValue.empty();

Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -256,8 +256,8 @@ public static String valueOf(TrackingClicksEnum e) {
Boolean getRequireTls();

/**
* If <code>skip</code> 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 <code>true</code>, the certificate and hostname of the resolved MX Host will not be verified
* when trying to establish a TLS connection. If <code>false</code>, Mailgun will verify the
* certificate and hostname. If either one can not be verified, a TLS connection will not be
* established. The default is <code>false</code>
*
Expand All @@ -279,14 +279,53 @@ 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<String, TrackingPixelLocationTopEnum> {
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<String, TrackingPixelLocationTopEnum> ENUM_SUPPORT =
new EnumSupportDynamic<>(
TrackingPixelLocationTopEnum.class,
TrackingPixelLocationTopEnum::new,
Arrays.asList(YES, NO, TRUE, FALSE, HTMLONLY));

private TrackingPixelLocationTopEnum(String value) {
super(value);
}

public static Stream<TrackingPixelLocationTopEnum> 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
* top of your emails
*
* @return trackingPixelLocationTop
*/
String getTrackingPixelLocationTop();
TrackingPixelLocationTopEnum getTrackingPixelLocationTop();

/**
* A valid JSON-encoded dictionary, where key is a plain recipient address and value is a
Expand Down Expand Up @@ -505,7 +544,7 @@ interface Builder extends AdditionalProperties.Builder {
* @return Current builder
* @see #getTrackingPixelLocationTop
*/
Builder setTrackingPixelLocationTop(String trackingPixelLocationTop);
Builder setTrackingPixelLocationTop(TrackingPixelLocationTopEnum trackingPixelLocationTop);

/**
* see getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> trackingPixelLocationTop;
private OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop;

public static final String PROPERTY_RECIPIENT_VARIABLES = "recipient-variables";

Expand Down Expand Up @@ -137,7 +137,7 @@ protected SendMimeEmailRequestImpl(
OptionalValue<Boolean> skipVerification,
OptionalValue<String> sendingIp,
OptionalValue<String> sendingIpPool,
OptionalValue<String> trackingPixelLocationTop,
OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop,
OptionalValue<String> recipientVariables,
OptionalValue<Map<String, Object>> additionalProperties) {
this.to = to;
Expand Down Expand Up @@ -364,12 +364,12 @@ public OptionalValue<String> sendingIpPool() {
return sendingIpPool;
}

public String getTrackingPixelLocationTop() {
public TrackingPixelLocationTopEnum getTrackingPixelLocationTop() {
return trackingPixelLocationTop.orElse(null);
}

@Property(PROPERTY_O_COLON_TRACKING_PIXEL_LOCATION_TOP)
public OptionalValue<String> trackingPixelLocationTop() {
public OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop() {
return trackingPixelLocationTop;
}

Expand Down Expand Up @@ -581,7 +581,7 @@ static class Builder implements SendMimeEmailRequest.Builder {
OptionalValue<Boolean> skipVerification = OptionalValue.empty();
OptionalValue<String> sendingIp = OptionalValue.empty();
OptionalValue<String> sendingIpPool = OptionalValue.empty();
OptionalValue<String> trackingPixelLocationTop = OptionalValue.empty();
OptionalValue<TrackingPixelLocationTopEnum> trackingPixelLocationTop = OptionalValue.empty();
OptionalValue<String> recipientVariables = OptionalValue.empty();
OptionalValue<Map<String, Object>> additionalProperties = OptionalValue.empty();

Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@

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
*
* @return New Builder instance
*/
static Builder builder() {
return new ExceededQueueQuotaRegularImpl.Builder();
return new ExceededQueueQuotaImpl.Builder();
}

/** Dedicated Builder */
Expand All @@ -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();
}
}
Loading

0 comments on commit ef1127d

Please sign in to comment.