|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | +package org.apache.camel.component.telegram.model; |
| 19 | + |
| 20 | +import java.io.Serializable; |
| 21 | + |
| 22 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 23 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 24 | + |
| 25 | +/** |
| 26 | + * Message is a voice message, information about the file. |
| 27 | + * |
| 28 | + * @see <a href="https://core.telegram.org/bots/api#voice">https://core.telegram.org/bots/api#voice</a> |
| 29 | + */ |
| 30 | +@JsonIgnoreProperties(ignoreUnknown = true) |
| 31 | +public class IncomingVoice implements Serializable { |
| 32 | + |
| 33 | + private static final long serialVersionUID = 8346607899859789612L; |
| 34 | + |
| 35 | + @JsonProperty("file_id") |
| 36 | + private String fileId; |
| 37 | + |
| 38 | + @JsonProperty("file_unique_id") |
| 39 | + private String fileUniqueId; |
| 40 | + |
| 41 | + private Integer duration; |
| 42 | + |
| 43 | + @JsonProperty("mime_type") |
| 44 | + private String mimeType; |
| 45 | + |
| 46 | + @JsonProperty("file_size") |
| 47 | + private Long fileSize; |
| 48 | + |
| 49 | + public IncomingVoice() { |
| 50 | + } |
| 51 | + |
| 52 | + public String getFileId() { |
| 53 | + return fileId; |
| 54 | + } |
| 55 | + |
| 56 | + public void setFileId(String fileId) { |
| 57 | + this.fileId = fileId; |
| 58 | + } |
| 59 | + |
| 60 | + public String getFileUniqueId() { |
| 61 | + return fileUniqueId; |
| 62 | + } |
| 63 | + |
| 64 | + public void setFileUniqueId(String fileUniqueId) { |
| 65 | + this.fileUniqueId = fileUniqueId; |
| 66 | + } |
| 67 | + |
| 68 | + public Integer getDuration() { |
| 69 | + return duration; |
| 70 | + } |
| 71 | + |
| 72 | + public void setDuration(Integer duration) { |
| 73 | + this.duration = duration; |
| 74 | + } |
| 75 | + |
| 76 | + public String getMimeType() { |
| 77 | + return mimeType; |
| 78 | + } |
| 79 | + |
| 80 | + public void setMimeType(String mimeType) { |
| 81 | + this.mimeType = mimeType; |
| 82 | + } |
| 83 | + |
| 84 | + public Long getFileSize() { |
| 85 | + return fileSize; |
| 86 | + } |
| 87 | + |
| 88 | + public void setFileSize(Long fileSize) { |
| 89 | + this.fileSize = fileSize; |
| 90 | + } |
| 91 | + |
| 92 | + @Override |
| 93 | + public String toString() { |
| 94 | + final StringBuilder sb = new StringBuilder("IncomingVoice{"); |
| 95 | + sb.append("fileId='").append(fileId).append('\''); |
| 96 | + sb.append(", fileUniqueId=").append(fileUniqueId); |
| 97 | + sb.append(", duration=").append(duration); |
| 98 | + sb.append(", mimeType=").append(mimeType); |
| 99 | + sb.append(", fileSize=").append(fileSize); |
| 100 | + sb.append('}'); |
| 101 | + return sb.toString(); |
| 102 | + } |
| 103 | +} |
0 commit comments