001/*
002 *   Copyright 2024 Vonage
003 *
004 *   Licensed under the Apache License, Version 2.0 (the "License");
005 *   you may not use this file except in compliance with the License.
006 *   You may obtain a copy of the License at
007 *
008 *        http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *   Unless required by applicable law or agreed to in writing, software
011 *   distributed under the License is distributed on an "AS IS" BASIS,
012 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *   See the License for the specific language governing permissions and
014 *   limitations under the License.
015 */
016package com.vonage.client.messages.viber;
017
018import com.vonage.client.messages.MessageType;
019import com.vonage.client.messages.TextMessageRequest;
020
021public final class ViberTextRequest extends ViberRequest implements TextMessageRequest {
022
023        ViberTextRequest(Builder builder) {
024                super(builder, MessageType.TEXT);
025        }
026
027        @Override
028        public String getText() {
029                return super.getText();
030        }
031
032        public static Builder builder() {
033                return new Builder();
034        }
035
036        public static final class Builder extends ViberRequest.Builder<ViberTextRequest, Builder> implements TextMessageRequest.Builder<Builder> {
037
038                Builder() {}
039
040                /**
041                 * (REQUIRED)
042                 * Sets the text field. Must be between 1 and 1000 characters, including unicode.
043                 *
044                 * @param text The text string.
045                 * @return This builder.
046                 */
047                @Override
048                public Builder text(String text) {
049                        return super.text(text);
050                }
051
052                @Override
053                public Builder actionUrl(String actionUrl) {
054                        return super.actionUrl(actionUrl);
055                }
056
057                @Override
058                public Builder actionText(String actionText) {
059                        return super.actionText(actionText);
060                }
061
062                @Override
063                public ViberTextRequest build() {
064                        return new ViberTextRequest(this);
065                }
066        }
067}