View Javadoc
1   /*
2    * Copyright (c) 2023. Roland T. Lichti, Kaiserpfalz EDV-Service.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16   */
17  
18  package de.kaiserpfalzedv.services.sms77.model;
19  
20  import com.fasterxml.jackson.annotation.JsonInclude;
21  
22  import lombok.AllArgsConstructor;
23  import lombok.EqualsAndHashCode;
24  import lombok.Getter;
25  import lombok.NoArgsConstructor;
26  import lombok.ToString;
27  import lombok.experimental.SuperBuilder;
28  import lombok.extern.jackson.Jacksonized;
29  
30  /**
31   * <p>SmsResult -- .</p>
32   *
33   * <pre>{
34   *           "success": "100",
35   *           "total_price": 0.075,
36   *           "balance": 0.125,
37   *           "debug": "false",
38   *           "sms_type": "direct",
39   *           "messages": [
40   *             {
41   *               "id": "77196885479",
42   *               "sender": "D12",
43   *               "recipient": "491234567890",
44   *               "text": "T02",
45   *               "encoding": "gsm",
46   *               "label": null,
47   *               "parts": 1,
48   *               "udh": null,
49   *               "is_binary": false,
50   *               "price": 0.075,
51   *               "success": true,
52   *               "error": null,
53   *               "error_text": null
54   *             },
55   *             {
56   *               "id": "77196885479",
57   *               "sender": "D12",
58   *               "recipient": "492345678901",
59   *               "text": "T02",
60   *               "encoding": "gsm",
61   *               "label": null,
62   *               "parts": 1,
63   *               "udh": null,
64   *               "is_binary": false,
65   *               "price": 0.075,
66   *               "success": true,
67   *               "error": null,
68   *               "error_text": null
69   *             }
70   *           ]
71   * }</pre>
72   *
73   * @author rlichti {@literal <rlichti@kaiserpfalz-edv.de>}
74   * @since 1.0.0  2023-01-22
75   */
76  @Jacksonized
77  @SuperBuilder(toBuilder = true)
78  @AllArgsConstructor
79  @NoArgsConstructor
80  @Getter
81  @ToString(onlyExplicitlyIncluded = true)
82  @EqualsAndHashCode(onlyExplicitlyIncluded = true)
83  @JsonInclude(JsonInclude.Include.NON_ABSENT)
84  public class SmsResult {
85      private String success;
86      private Double total_price;
87      private Double balance;
88      private String debug;
89      private String sms_type;
90  
91      /**
92       * <p>MessageResult -- The resulf of a single SMS.</p>
93       *
94       * @author rlichti {@literal <rlichti@kaiserpfalz-edv.de>}
95       * @since 1.0.0  2023-01-22
96       */
97      @Jacksonized
98      @SuperBuilder(toBuilder = true)
99      @AllArgsConstructor
100     @NoArgsConstructor
101     @Getter
102     @ToString(onlyExplicitlyIncluded = true)
103     @EqualsAndHashCode(onlyExplicitlyIncluded = true)
104     @JsonInclude(JsonInclude.Include.NON_ABSENT)
105     public static class MessageResult {
106         private String id;
107         private String sender;
108         private String recipient;
109         private String text;
110         private String encoding;
111         private String label;
112         private Integer parts;
113         private String udh;
114         private boolean is_binary;
115         private Double price;
116         private boolean success;
117         private Integer error;
118         private String error_text;
119     }
120 }