SendMessageRequest.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.communication.sms.implementation.models;
import com.azure.communication.sms.models.SmsSendOptions;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The SendMessageRequest model. */
@Fluent
public final class SendMessageRequest {
/*
* The sender's phone number in E.164 format that is owned by the
* authenticated account.
*/
@JsonProperty(value = "from", required = true)
private String from;
/*
* The recipient's phone number in E.164 format. In this version, a minimum
* of 1 and upto 100 recipients in the list are supported.
*/
@JsonProperty(value = "smsRecipients", required = true)
private List<SmsRecipient> smsRecipients;
/*
* The contents of the message that will be sent to the recipient. The
* allowable content is defined by RFC 5724.
*/
@JsonProperty(value = "message", required = true)
private String message;
/*
* Optional configuration for sending SMS messages.
*/
@JsonProperty(value = "smsSendOptions")
private SmsSendOptions smsSendOptions;
/**
* Get the from property: The sender's phone number in E.164 format that is owned by the authenticated account.
*
* @return the from value.
*/
public String getFrom() {
return this.from;
}
/**
* Set the from property: The sender's phone number in E.164 format that is owned by the authenticated account.
*
* @param from the from value to set.
* @return the SendMessageRequest object itself.
*/
public SendMessageRequest setFrom(String from) {
this.from = from;
return this;
}
/**
* Get the smsRecipients property: The recipient's phone number in E.164 format. In this version, a minimum of 1 and
* upto 100 recipients in the list are supported.
*
* @return the smsRecipients value.
*/
public List<SmsRecipient> getSmsRecipients() {
return this.smsRecipients;
}
/**
* Set the smsRecipients property: The recipient's phone number in E.164 format. In this version, a minimum of 1 and
* upto 100 recipients in the list are supported.
*
* @param smsRecipients the smsRecipients value to set.
* @return the SendMessageRequest object itself.
*/
public SendMessageRequest setSmsRecipients(List<SmsRecipient> smsRecipients) {
this.smsRecipients = smsRecipients;
return this;
}
/**
* Get the message property: The contents of the message that will be sent to the recipient. The allowable content
* is defined by RFC 5724.
*
* @return the message value.
*/
public String getMessage() {
return this.message;
}
/**
* Set the message property: The contents of the message that will be sent to the recipient. The allowable content
* is defined by RFC 5724.
*
* @param message the message value to set.
* @return the SendMessageRequest object itself.
*/
public SendMessageRequest setMessage(String message) {
this.message = message;
return this;
}
/**
* Get the smsSendOptions property: Optional configuration for sending SMS messages.
*
* @return the smsSendOptions value.
*/
public SmsSendOptions getSmsSendOptions() {
return this.smsSendOptions;
}
/**
* Set the smsSendOptions property: Optional configuration for sending SMS messages.
*
* @param smsSendOptions the smsSendOptions value to set.
* @return the SendMessageRequest object itself.
*/
public SendMessageRequest setSmsSendOptions(SmsSendOptions smsSendOptions) {
this.smsSendOptions = smsSendOptions;
return this;
}
}