com.urbanairship.api.createandsend.model.notification.email.VariableDetail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
The Urban Airship Java client library
package com.urbanairship.api.createandsend.model.notification.email;
import java.util.Optional;
/**
* Represents the variable detail in the create and send notification.
*/
public class VariableDetail {
private final Optional key;
private final Optional defaultValue;
private VariableDetail(Builder builder) {
key = Optional.ofNullable(builder.key);
defaultValue = Optional.ofNullable(builder.defaultValue);
}
/**
* VariableDetail Builder
* @return Builder
*/
public static Builder newBuilder() {
return new Builder();
}
/**
* Get the variable you want to add to the template.
* @return Optional String
*/
public Optional getKey() {
return key;
}
/**
* Get the default value for the variable.
* @return Optional String
*/
public Optional getDefaultValue() {
return defaultValue;
}
public static class Builder {
private String key;
private String defaultValue;
/**
* Set the variable you want to add to the template.
* @param key String
* @return VariableDetail Builder
*/
public Builder setKey(String key) {
this.key = key;
return this;
}
/**
* Set the default value for the variable.
* @param defaultValue String
* @return VariableDetail Builder
*/
public Builder setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
return this;
}
public VariableDetail build() {
return new VariableDetail(this);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy