com.mailgun.model.templates.UpdateTemplateVersionRequest Maven / Gradle / Ivy
Show all versions of mailgun-java Show documentation
package com.mailgun.model.templates;
import com.mailgun.enums.YesNo;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
/**
*
* Request to update template version.
*
*
* @see Templates
*/
@Getter
@ToString
@EqualsAndHashCode
@Builder
public class UpdateTemplateVersionRequest {
/**
*
* (Optional) The new content of the version.
*
*/
String template;
/**
*
* (Optional) New comment for the provided version.
*
*/
String comment;
/**
*
* (Optional) If this flag is set to YES
, this version becomes active.
*
*/
String active;
public static class UpdateTemplateVersionRequestBuilder {
/**
*
* (Optional) If this flag is set to TRUE
, this version becomes active.
*
*
* @param active flag whether the version is active
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTemplateVersionRequest.UpdateTemplateVersionRequestBuilder active(boolean active) {
if (active) {
this.active = YesNo.YES.getValue();
}
return this;
}
}
}