Skip to content

Commit f9bb0b6

Browse files
committed
Updated sources
1 parent f822e43 commit f9bb0b6

File tree

13 files changed

+414
-6
lines changed

13 files changed

+414
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Add following repository and dependency to your project's POM
3737
<dependency>
3838
<groupId>com.groupdocs</groupId>
3939
<artifactId>groupdocs-conversion-cloud</artifactId>
40-
<version>20.2</version>
40+
<version>20.3</version>
4141
<scope>compile</scope>
4242
</dependency>
4343
```
@@ -50,7 +50,7 @@ At first generate the JAR by executing:
5050

5151
Then manually install the following JARs:
5252

53-
* target/groupdocs-conversion-cloud-20.2.jar
53+
* target/groupdocs-conversion-cloud-20.3.jar
5454
* target/lib/*.jar
5555

5656
## Getting Started

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>groupdocs-conversion-cloud</artifactId>
66
<packaging>jar</packaging>
77
<name>groupdocs-conversion-cloud</name>
8-
<version>20.2</version>
8+
<version>20.3</version>
99
<url>https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-java</url>
1010
<description>Java library for communicating with the GroupDocs.Conversion Cloud API</description>
1111
<scm>

src/main/java/com/groupdocs/cloud/conversion/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public ApiClient(Configuration configuration) {
9797
this.json = new JSON();
9898

9999
// Set default User-Agent.
100-
setUserAgent("java-sdk/20.2");
100+
setUserAgent("java-sdk/20.3");
101101

102102
// Set connection timeout
103103
setConnectTimeout(configuration.getTimeout());

src/main/java/com/groupdocs/cloud/conversion/model/EmailLoadOptions.java

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@
3333
import com.google.gson.annotations.SerializedName;
3434
import com.google.gson.stream.JsonReader;
3535
import com.google.gson.stream.JsonWriter;
36+
import com.groupdocs.cloud.conversion.model.FieldLabel;
3637
import com.groupdocs.cloud.conversion.model.LoadOptions;
3738
import io.swagger.annotations.ApiModel;
3839
import io.swagger.annotations.ApiModelProperty;
3940
import java.io.IOException;
41+
import java.util.ArrayList;
42+
import java.util.List;
4043

4144
/**
4245
* Options for loading Email documents
@@ -67,6 +70,12 @@ public class EmailLoadOptions extends LoadOptions {
6770
@SerializedName("convertAttachments")
6871
private Boolean convertAttachments = null;
6972

73+
@SerializedName("fieldLabels")
74+
private List<FieldLabel> fieldLabels = null;
75+
76+
@SerializedName("preserveOriginalDate")
77+
private Boolean preserveOriginalDate = null;
78+
7079
public EmailLoadOptions displayHeader(Boolean displayHeader) {
7180
this.displayHeader = displayHeader;
7281
return this;
@@ -211,6 +220,50 @@ public void setConvertAttachments(Boolean convertAttachments) {
211220
this.convertAttachments = convertAttachments;
212221
}
213222

223+
public EmailLoadOptions fieldLabels(List<FieldLabel> fieldLabels) {
224+
this.fieldLabels = fieldLabels;
225+
return this;
226+
}
227+
228+
public EmailLoadOptions addFieldLabelsItem(FieldLabel fieldLabelsItem) {
229+
if (this.fieldLabels == null) {
230+
this.fieldLabels = new ArrayList<FieldLabel>();
231+
}
232+
this.fieldLabels.add(fieldLabelsItem);
233+
return this;
234+
}
235+
236+
/**
237+
* The mapping between email message field and field text representation
238+
* @return fieldLabels
239+
**/
240+
@ApiModelProperty(value = "The mapping between email message field and field text representation")
241+
public List<FieldLabel> getFieldLabels() {
242+
return fieldLabels;
243+
}
244+
245+
public void setFieldLabels(List<FieldLabel> fieldLabels) {
246+
this.fieldLabels = fieldLabels;
247+
}
248+
249+
public EmailLoadOptions preserveOriginalDate(Boolean preserveOriginalDate) {
250+
this.preserveOriginalDate = preserveOriginalDate;
251+
return this;
252+
}
253+
254+
/**
255+
* Defines whether need to keep original date header string in mail message when saving or not (Default value is true)
256+
* @return preserveOriginalDate
257+
**/
258+
@ApiModelProperty(required = true, value = "Defines whether need to keep original date header string in mail message when saving or not (Default value is true)")
259+
public Boolean getPreserveOriginalDate() {
260+
return preserveOriginalDate;
261+
}
262+
263+
public void setPreserveOriginalDate(Boolean preserveOriginalDate) {
264+
this.preserveOriginalDate = preserveOriginalDate;
265+
}
266+
214267

215268
@Override
216269
public boolean equals(java.lang.Object o) {
@@ -229,12 +282,14 @@ public boolean equals(java.lang.Object o) {
229282
Objects.equals(this.displayBccEmailAddress, emailLoadOptions.displayBccEmailAddress) &&
230283
Objects.equals(this.timeZoneOffset, emailLoadOptions.timeZoneOffset) &&
231284
Objects.equals(this.convertAttachments, emailLoadOptions.convertAttachments) &&
285+
Objects.equals(this.fieldLabels, emailLoadOptions.fieldLabels) &&
286+
Objects.equals(this.preserveOriginalDate, emailLoadOptions.preserveOriginalDate) &&
232287
super.equals(o);
233288
}
234289

235290
@Override
236291
public int hashCode() {
237-
return Objects.hash(displayHeader, displayFromEmailAddress, displayEmailAddress, displayToEmailAddress, displayCcEmailAddress, displayBccEmailAddress, timeZoneOffset, convertAttachments, super.hashCode());
292+
return Objects.hash(displayHeader, displayFromEmailAddress, displayEmailAddress, displayToEmailAddress, displayCcEmailAddress, displayBccEmailAddress, timeZoneOffset, convertAttachments, fieldLabels, preserveOriginalDate, super.hashCode());
238293
}
239294

240295

@@ -251,6 +306,8 @@ public String toString() {
251306
sb.append(" displayBccEmailAddress: ").append(toIndentedString(displayBccEmailAddress)).append("\n");
252307
sb.append(" timeZoneOffset: ").append(toIndentedString(timeZoneOffset)).append("\n");
253308
sb.append(" convertAttachments: ").append(toIndentedString(convertAttachments)).append("\n");
309+
sb.append(" fieldLabels: ").append(toIndentedString(fieldLabels)).append("\n");
310+
sb.append(" preserveOriginalDate: ").append(toIndentedString(preserveOriginalDate)).append("\n");
254311
sb.append("}");
255312
return sb.toString();
256313
}

src/main/java/com/groupdocs/cloud/conversion/model/EmlLoadOptions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929

3030
import java.util.Objects;
3131
import com.groupdocs.cloud.conversion.model.EmailLoadOptions;
32+
import com.groupdocs.cloud.conversion.model.FieldLabel;
3233
import io.swagger.annotations.ApiModel;
34+
import java.util.List;
3335

3436
/**
3537
* Eml load options

src/main/java/com/groupdocs/cloud/conversion/model/EmlxLoadOptions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929

3030
import java.util.Objects;
3131
import com.groupdocs.cloud.conversion.model.EmailLoadOptions;
32+
import com.groupdocs.cloud.conversion.model.FieldLabel;
3233
import io.swagger.annotations.ApiModel;
34+
import java.util.List;
3335

3436
/**
3537
* Emlx load options
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
/**
2+
* --------------------------------------------------------------------------------------------------------------------
3+
* <copyright company="Aspose Pty Ltd" file="FieldLabel.java">
4+
* Copyright (c) 2003-2020 Aspose Pty Ltd
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------------------------------------------
26+
*/
27+
28+
package com.groupdocs.cloud.conversion.model;
29+
30+
import java.util.Objects;
31+
import com.google.gson.TypeAdapter;
32+
import com.google.gson.annotations.JsonAdapter;
33+
import com.google.gson.annotations.SerializedName;
34+
import com.google.gson.stream.JsonReader;
35+
import com.google.gson.stream.JsonWriter;
36+
import io.swagger.annotations.ApiModel;
37+
import io.swagger.annotations.ApiModelProperty;
38+
import java.io.IOException;
39+
40+
/**
41+
* Represents field label
42+
*/
43+
@ApiModel(description = "Represents field label ")
44+
public class FieldLabel {
45+
/**
46+
* The field name
47+
*/
48+
@JsonAdapter(FieldEnum.Adapter.class)
49+
public enum FieldEnum {
50+
START("Start"),
51+
52+
TABFIELD("TabField"),
53+
54+
SUBJECT("Subject"),
55+
56+
SHOWTIMEAS("ShowTimeAs"),
57+
58+
SENT("Sent"),
59+
60+
REQUIREDATTENDEES("RequiredAttendees"),
61+
62+
RECURRENCEPATTERN("RecurrencePattern"),
63+
64+
RECURRENCE("Recurrence"),
65+
66+
PAGEHEADER("PageHeader"),
67+
68+
ORGANIZER("Organizer"),
69+
70+
LOCATION("Location"),
71+
72+
IMPORTANCE("Importance"),
73+
74+
FROM("From"),
75+
76+
END("End"),
77+
78+
BCC("Bcc"),
79+
80+
ATTACHMENTS("Attachments"),
81+
82+
TO("To");
83+
84+
private String value;
85+
86+
FieldEnum(String value) {
87+
this.value = value;
88+
}
89+
90+
public String getValue() {
91+
return value;
92+
}
93+
94+
@Override
95+
public String toString() {
96+
return String.valueOf(value);
97+
}
98+
99+
public static FieldEnum fromValue(String text) {
100+
for (FieldEnum b : FieldEnum.values()) {
101+
if (String.valueOf(b.value).equals(text)) {
102+
return b;
103+
}
104+
}
105+
return null;
106+
}
107+
108+
public static class Adapter extends TypeAdapter<FieldEnum> {
109+
@Override
110+
public void write(final JsonWriter jsonWriter, final FieldEnum enumeration) throws IOException {
111+
jsonWriter.value(enumeration.getValue());
112+
}
113+
114+
@Override
115+
public FieldEnum read(final JsonReader jsonReader) throws IOException {
116+
String value = jsonReader.nextString();
117+
return FieldEnum.fromValue(String.valueOf(value));
118+
}
119+
}
120+
}
121+
122+
@SerializedName("field")
123+
private FieldEnum field = null;
124+
125+
@SerializedName("label")
126+
private String label = null;
127+
128+
public FieldLabel field(FieldEnum field) {
129+
this.field = field;
130+
return this;
131+
}
132+
133+
/**
134+
* The field name
135+
* @return field
136+
**/
137+
@ApiModelProperty(required = true, value = "The field name")
138+
public FieldEnum getField() {
139+
return field;
140+
}
141+
142+
public void setField(FieldEnum field) {
143+
this.field = field;
144+
}
145+
146+
public FieldLabel label(String label) {
147+
this.label = label;
148+
return this;
149+
}
150+
151+
/**
152+
* The label e.g. \&quot;Sender\&quot;
153+
* @return label
154+
**/
155+
@ApiModelProperty(value = "The label e.g. \"Sender\"")
156+
public String getLabel() {
157+
return label;
158+
}
159+
160+
public void setLabel(String label) {
161+
this.label = label;
162+
}
163+
164+
165+
@Override
166+
public boolean equals(java.lang.Object o) {
167+
if (this == o) {
168+
return true;
169+
}
170+
if (o == null || getClass() != o.getClass()) {
171+
return false;
172+
}
173+
FieldLabel fieldLabel = (FieldLabel) o;
174+
return Objects.equals(this.field, fieldLabel.field) &&
175+
Objects.equals(this.label, fieldLabel.label);
176+
}
177+
178+
@Override
179+
public int hashCode() {
180+
return Objects.hash(field, label);
181+
}
182+
183+
184+
@Override
185+
public String toString() {
186+
StringBuilder sb = new StringBuilder();
187+
sb.append("class FieldLabel {\n");
188+
189+
sb.append(" field: ").append(toIndentedString(field)).append("\n");
190+
sb.append(" label: ").append(toIndentedString(label)).append("\n");
191+
sb.append("}");
192+
return sb.toString();
193+
}
194+
195+
/**
196+
* Convert the given object to string with each line indented by 4 spaces
197+
* (except the first line).
198+
*/
199+
private String toIndentedString(java.lang.Object o) {
200+
if (o == null) {
201+
return "null";
202+
}
203+
return o.toString().replace("\n", "\n ");
204+
}
205+
206+
}
207+

0 commit comments

Comments
 (0)