
com.infobip.model.MmsInboundLinkSegment Maven / Gradle / Ivy
/*
* This class is auto generated from the Infobip OpenAPI specification
* through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
* powered by the OpenAPI Generator (https://openapi-generator.tech).
*
* Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
* or contact us @ [email protected].
*/
package com.infobip.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* Represents MmsInboundLinkSegment model.
*/
public class MmsInboundLinkSegment extends MmsInboundSegment {
private String contentType;
private String url;
/**
* Constructs a new {@link MmsInboundLinkSegment} instance.
*/
public MmsInboundLinkSegment() {
super("LINK");
}
/**
* Sets contentType.
*
* Field description:
* Content type of the message segment, e.g. `image/jpeg`.
*
* @param contentType
* @return This {@link MmsInboundLinkSegment instance}.
*/
public MmsInboundLinkSegment contentType(String contentType) {
this.contentType = contentType;
return this;
}
/**
* Returns contentType.
*
* Field description:
* Content type of the message segment, e.g. `image/jpeg`.
*
* @return contentType
*/
@JsonProperty("contentType")
public String getContentType() {
return contentType;
}
/**
* Sets contentType.
*
* Field description:
* Content type of the message segment, e.g. `image/jpeg`.
*
* @param contentType
*/
@JsonProperty("contentType")
public void setContentType(String contentType) {
this.contentType = contentType;
}
/**
* Sets url.
*
* Field description:
* URL from which content can be downloaded.
*
* @param url
* @return This {@link MmsInboundLinkSegment instance}.
*/
public MmsInboundLinkSegment url(String url) {
this.url = url;
return this;
}
/**
* Returns url.
*
* Field description:
* URL from which content can be downloaded.
*
* @return url
*/
@JsonProperty("url")
public String getUrl() {
return url;
}
/**
* Sets url.
*
* Field description:
* URL from which content can be downloaded.
*
* @param url
*/
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MmsInboundLinkSegment mmsInboundLinkSegment = (MmsInboundLinkSegment) o;
return Objects.equals(this.contentType, mmsInboundLinkSegment.contentType)
&& Objects.equals(this.url, mmsInboundLinkSegment.url)
&& super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(contentType, url, super.hashCode());
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class MmsInboundLinkSegment {")
.append(newLine)
.append(" ")
.append(toIndentedString(super.toString()))
.append(newLine)
.append(" contentType: ")
.append(toIndentedString(contentType))
.append(newLine)
.append(" url: ")
.append(toIndentedString(url))
.append(newLine)
.append("}")
.toString();
}
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
String lineSeparator = System.lineSeparator();
String lineSeparatorFollowedByIndentation = lineSeparator + " ";
return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
}
}