Skip to content

Commit ccfc43f

Browse files
authored
Add Code128Params.Code128EncodeMode generator parameter (#58)
1 parent d14777f commit ccfc43f

9 files changed

Lines changed: 247 additions & 8 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Freleases.aspose.cloud%2Fjava%2Frepo%2Fcom%2Faspose%2Faspose-barcode-cloud%2Fmaven-metadata.xml)](https://releases.aspose.cloud/java/repo/com/aspose/aspose-barcode-cloud/)
66

77
- API version: 3.0
8-
- SDK version: 23.4.0
8+
- SDK version: 23.5.0
99

1010
## Demo applications
1111

@@ -68,7 +68,7 @@ Add this dependency to your project's POM:
6868
<dependency>
6969
<groupId>com.aspose</groupId>
7070
<artifactId>aspose-barcode-cloud</artifactId>
71-
<version>23.4.0</version>
71+
<version>23.5.0</version>
7272
<scope>compile</scope>
7373
</dependency>
7474
```
@@ -83,7 +83,7 @@ mvn clean package
8383

8484
Then manually install the following JARs:
8585

86-
- `target/aspose-barcode-cloud-23.4.0.jar`
86+
- `target/aspose-barcode-cloud-23.5.0.jar`
8787
- `target/lib/*.jar`
8888

8989
## Getting Started
@@ -203,6 +203,8 @@ Class | Method | HTTP request | Description
203203
- [CodabarSymbol](docs/CodabarSymbol.md)
204204
- [CodablockParams](docs/CodablockParams.md)
205205
- [Code128Emulation](docs/Code128Emulation.md)
206+
- [Code128EncodeMode](docs/Code128EncodeMode.md)
207+
- [Code128Params](docs/Code128Params.md)
206208
- [Code16KParams](docs/Code16KParams.md)
207209
- [CodeLocation](docs/CodeLocation.md)
208210
- [CouponParams](docs/CouponParams.md)

docs/Code128EncodeMode.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# Code128EncodeMode
3+
4+
## Enum
5+
6+
7+
* `AUTO` (value: `"Auto"`)
8+
9+
* `CODEA` (value: `"CodeA"`)
10+
11+
* `CODEB` (value: `"CodeB"`)
12+
13+
* `CODEAB` (value: `"CodeAB"`)
14+
15+
* `CODEC` (value: `"CodeC"`)
16+
17+
* `CODEAC` (value: `"CodeAC"`)
18+
19+
* `CODEBC` (value: `"CodeBC"`)
20+
21+
22+

docs/Code128Params.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# Code128Params
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**encodeMode** | [**Code128EncodeMode**](Code128EncodeMode.md) | Encoding mode for Code128 barcodes. Code 128 specification Default value: Code128EncodeMode.Auto. | [optional]
8+
9+
10+

docs/GeneratorParams.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Name | Type | Description | Notes
5858
**postal** | [**PostalParams**](PostalParams.md) | Postal params. | [optional]
5959
**QR** | [**QrParams**](QrParams.md) | QR params. | [optional]
6060
**patchCode** | [**PatchCodeParams**](PatchCodeParams.md) | PatchCode params. | [optional]
61+
**code128** | [**Code128Params**](Code128Params.md) | Code128 params. | [optional]
6162

6263

6364

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>aspose-barcode-cloud</artifactId>
66
<packaging>jar</packaging>
77
<name>aspose-barcode-cloud</name>
8-
<version>23.4.0</version>
8+
<version>23.5.0</version>
99
<url>https://www.aspose.cloud</url>
1010
<description>Aspose.BarCode Cloud SDK for Java</description>
1111
<scm>

src/main/java/com/aspose/barcode/cloud/ApiClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
public class ApiClient {
5454

5555
public final String apiVersion = "v3.0";
56-
public final String clientVersion = "23.4.0";
56+
public final String clientVersion = "23.5.0";
5757
private String baseUrl = "https://api.aspose.cloud";
5858
private String clientId;
5959
private String clientSecret;
@@ -99,7 +99,7 @@ protected ApiClient() {
9999
json = new JSON();
100100

101101
// Set default User-Agent.
102-
setUserAgent("Swagger-Codegen/23.4.0/java");
102+
setUserAgent("Swagger-Codegen/23.5.0/java");
103103

104104
addDefaultHeader("x-aspose-client", "java sdk");
105105
addDefaultHeader("x-aspose-client-version", clientVersion);
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright company="Aspose" file="Code128EncodeMode.java">
3+
// Copyright (c) 2023 Aspose.BarCode for Cloud
4+
// </copyright>
5+
// <summary>
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files (the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in all
14+
// copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
// SOFTWARE.
23+
// </summary>
24+
// --------------------------------------------------------------------------------------------------------------------
25+
26+
package com.aspose.barcode.cloud.model;
27+
28+
import com.google.gson.TypeAdapter;
29+
import com.google.gson.annotations.JsonAdapter;
30+
import com.google.gson.stream.JsonReader;
31+
import com.google.gson.stream.JsonWriter;
32+
33+
import java.io.IOException;
34+
35+
/** */
36+
@JsonAdapter(Code128EncodeMode.Adapter.class)
37+
public enum Code128EncodeMode {
38+
AUTO("Auto"),
39+
40+
CODEA("CodeA"),
41+
42+
CODEB("CodeB"),
43+
44+
CODEAB("CodeAB"),
45+
46+
CODEC("CodeC"),
47+
48+
CODEAC("CodeAC"),
49+
50+
CODEBC("CodeBC");
51+
52+
private final String value;
53+
54+
Code128EncodeMode(String value) {
55+
this.value = value;
56+
}
57+
58+
public String getValue() {
59+
return value;
60+
}
61+
62+
@Override
63+
public String toString() {
64+
return String.valueOf(value);
65+
}
66+
67+
public static Code128EncodeMode fromValue(String text) {
68+
for (Code128EncodeMode b : Code128EncodeMode.values()) {
69+
if (String.valueOf(b.value).equals(text)) {
70+
return b;
71+
}
72+
}
73+
return null;
74+
}
75+
76+
public static class Adapter extends TypeAdapter<Code128EncodeMode> {
77+
@Override
78+
public void write(final JsonWriter jsonWriter, final Code128EncodeMode enumeration)
79+
throws IOException {
80+
jsonWriter.value(enumeration.getValue());
81+
}
82+
83+
@Override
84+
public Code128EncodeMode read(final JsonReader jsonReader) throws IOException {
85+
String value = jsonReader.nextString();
86+
return Code128EncodeMode.fromValue(String.valueOf(value));
87+
}
88+
}
89+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright company="Aspose" file="Code128Params.java">
3+
// Copyright (c) 2023 Aspose.BarCode for Cloud
4+
// </copyright>
5+
// <summary>
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files (the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in all
14+
// copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
// SOFTWARE.
23+
// </summary>
24+
// --------------------------------------------------------------------------------------------------------------------
25+
26+
package com.aspose.barcode.cloud.model;
27+
28+
import com.google.gson.annotations.SerializedName;
29+
30+
import io.swagger.annotations.ApiModel;
31+
import io.swagger.annotations.ApiModelProperty;
32+
33+
import java.util.Objects;
34+
35+
/** Code128 params. */
36+
@ApiModel(description = "Code128 params.")
37+
public class Code128Params {
38+
@SerializedName(value = "encodeMode")
39+
private Code128EncodeMode encodeMode = null;
40+
41+
/**
42+
* Encoding mode for Code128 barcodes. Code 128 specification Default value:
43+
* Code128EncodeMode.Auto.
44+
*
45+
* @return encodeMode
46+
*/
47+
@ApiModelProperty(
48+
value =
49+
"Encoding mode for Code128 barcodes. Code 128 specification Default value: Code128EncodeMode.Auto.")
50+
public Code128EncodeMode getEncodeMode() {
51+
return encodeMode;
52+
}
53+
54+
public void setEncodeMode(Code128EncodeMode encodeMode) {
55+
this.encodeMode = encodeMode;
56+
}
57+
58+
@Override
59+
public boolean equals(java.lang.Object o) {
60+
if (this == o) {
61+
return true;
62+
}
63+
if (o == null || getClass() != o.getClass()) {
64+
return false;
65+
}
66+
Code128Params code128Params = (Code128Params) o;
67+
return Objects.equals(this.encodeMode, code128Params.encodeMode);
68+
}
69+
70+
@Override
71+
public int hashCode() {
72+
return Objects.hash(encodeMode);
73+
}
74+
75+
@Override
76+
public String toString() {
77+
StringBuilder sb = new StringBuilder();
78+
sb.append("class Code128Params {\n");
79+
80+
sb.append(" encodeMode: ").append(toIndentedString(encodeMode)).append("\n");
81+
sb.append("}");
82+
return sb.toString();
83+
}
84+
85+
/**
86+
* Convert the given object to string with each line indented by 4 spaces (except the first
87+
* line).
88+
*/
89+
private String toIndentedString(java.lang.Object o) {
90+
if (o == null) {
91+
return "null";
92+
}
93+
return o.toString().replace("\n", "\n ");
94+
}
95+
}

src/main/java/com/aspose/barcode/cloud/model/GeneratorParams.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ public class GeneratorParams {
197197
@SerializedName(value = "patchCode")
198198
private PatchCodeParams patchCode = null;
199199

200+
@SerializedName(value = "code128")
201+
private Code128Params code128 = null;
202+
200203
/**
201204
* Type of barcode to generate.
202205
*
@@ -1019,6 +1022,20 @@ public void setPatchCode(PatchCodeParams patchCode) {
10191022
this.patchCode = patchCode;
10201023
}
10211024

1025+
/**
1026+
* Code128 params.
1027+
*
1028+
* @return code128
1029+
*/
1030+
@ApiModelProperty(value = "Code128 params.")
1031+
public Code128Params getCode128() {
1032+
return code128;
1033+
}
1034+
1035+
public void setCode128(Code128Params code128) {
1036+
this.code128 = code128;
1037+
}
1038+
10221039
@Override
10231040
public boolean equals(java.lang.Object o) {
10241041
if (this == o) {
@@ -1081,7 +1098,8 @@ public boolean equals(java.lang.Object o) {
10811098
&& Objects.equals(this.pdf417, generatorParams.pdf417)
10821099
&& Objects.equals(this.postal, generatorParams.postal)
10831100
&& Objects.equals(this.QR, generatorParams.QR)
1084-
&& Objects.equals(this.patchCode, generatorParams.patchCode);
1101+
&& Objects.equals(this.patchCode, generatorParams.patchCode)
1102+
&& Objects.equals(this.code128, generatorParams.code128);
10851103
}
10861104

10871105
@Override
@@ -1140,7 +1158,8 @@ public int hashCode() {
11401158
pdf417,
11411159
postal,
11421160
QR,
1143-
patchCode);
1161+
patchCode,
1162+
code128);
11441163
}
11451164

11461165
@Override
@@ -1206,6 +1225,7 @@ public String toString() {
12061225
sb.append(" postal: ").append(toIndentedString(postal)).append("\n");
12071226
sb.append(" QR: ").append(toIndentedString(QR)).append("\n");
12081227
sb.append(" patchCode: ").append(toIndentedString(patchCode)).append("\n");
1228+
sb.append(" code128: ").append(toIndentedString(code128)).append("\n");
12091229
sb.append("}");
12101230
return sb.toString();
12111231
}

0 commit comments

Comments
 (0)