com.sinch.sdk.domains.sms.models.dto.v1.MediaBodyDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
/*
* API Overview | Sinch
* Sinch SMS API is one of the easiest APIs we offer and enables you to add fast and reliable global SMS to your applications. Send single messages, scheduled batch messages, use available message templates and more.
*
* The version of the OpenAPI document: v1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.sinch.sdk.domains.sms.models.dto.v1;
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 java.util.Objects;
/** The message content, including a URL to the media file */
@JsonPropertyOrder({MediaBodyDto.JSON_PROPERTY_URL, MediaBodyDto.JSON_PROPERTY_MESSAGE})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class MediaBodyDto {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_URL = "url";
private String url;
private boolean urlDefined = false;
public static final String JSON_PROPERTY_MESSAGE = "message";
private String message;
private boolean messageDefined = false;
public MediaBodyDto() {}
public MediaBodyDto url(String url) {
this.url = url;
this.urlDefined = true;
return this;
}
/**
* URL to the media file
*
* @return url
*/
@JsonProperty(JSON_PROPERTY_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getUrl() {
return url;
}
@JsonIgnore
public boolean getUrlDefined() {
return urlDefined;
}
@JsonProperty(JSON_PROPERTY_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setUrl(String url) {
this.url = url;
this.urlDefined = true;
}
public MediaBodyDto message(String message) {
this.message = message;
this.messageDefined = true;
return this;
}
/**
* The message text. Text only media messages will be rejected, please use SMS instead.
*
* @return message
*/
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMessage() {
return message;
}
@JsonIgnore
public boolean getMessageDefined() {
return messageDefined;
}
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMessage(String message) {
this.message = message;
this.messageDefined = true;
}
/** Return true if this MediaBody object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MediaBodyDto mediaBody = (MediaBodyDto) o;
return Objects.equals(this.url, mediaBody.url)
&& Objects.equals(this.message, mediaBody.message);
}
@Override
public int hashCode() {
return Objects.hash(url, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MediaBodyDto {\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).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 ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy