Skip to content

Commit d3f4f88

Browse files
committed
[Librarian] Regenerated @ d9b0f7b0297f064eec2f219b29fd4193559c54f3 405f363a58346c6557d4194de16d9911b797e208
1 parent 38394f5 commit d3f4f88

File tree

8 files changed

+413
-57
lines changed

8 files changed

+413
-57
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
twilio-java changelog
22
=====================
33

4+
[2025-01-13] Version 10.6.7
5+
---------------------------
6+
**Messaging**
7+
- Adds validity period Default value in service resource documentation
8+
9+
410
[2025-01-09] Version 10.6.6
511
---------------------------
612
**Numbers**

src/main/java/com/twilio/rest/iam/v1/NewApiKey.java renamed to src/main/java/com/twilio/rest/iam/v1/Key.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,28 @@
3636

3737
@JsonIgnoreProperties(ignoreUnknown = true)
3838
@ToString
39-
public class NewApiKey extends Resource {
39+
public class Key extends Resource {
4040

4141
private static final long serialVersionUID = 217181042856619L;
4242

43-
public static NewApiKeyCreator creator(final String accountSid) {
44-
return new NewApiKeyCreator(accountSid);
43+
public static KeyCreator creator(final String accountSid) {
44+
return new KeyCreator(accountSid);
4545
}
4646

4747
/**
48-
* Converts a JSON String into a NewApiKey object using the provided ObjectMapper.
48+
* Converts a JSON String into a Key object using the provided ObjectMapper.
4949
*
5050
* @param json Raw JSON String
5151
* @param objectMapper Jackson ObjectMapper
52-
* @return NewApiKey object represented by the provided JSON
52+
* @return Key object represented by the provided JSON
5353
*/
54-
public static NewApiKey fromJson(
54+
public static Key fromJson(
5555
final String json,
5656
final ObjectMapper objectMapper
5757
) {
5858
// Convert all checked exceptions to Runtime
5959
try {
60-
return objectMapper.readValue(json, NewApiKey.class);
60+
return objectMapper.readValue(json, Key.class);
6161
} catch (final JsonMappingException | JsonParseException e) {
6262
throw new ApiException(e.getMessage(), e);
6363
} catch (final IOException e) {
@@ -66,20 +66,20 @@ public static NewApiKey fromJson(
6666
}
6767

6868
/**
69-
* Converts a JSON InputStream into a NewApiKey object using the provided
69+
* Converts a JSON InputStream into a Key object using the provided
7070
* ObjectMapper.
7171
*
7272
* @param json Raw JSON InputStream
7373
* @param objectMapper Jackson ObjectMapper
74-
* @return NewApiKey object represented by the provided JSON
74+
* @return Key object represented by the provided JSON
7575
*/
76-
public static NewApiKey fromJson(
76+
public static Key fromJson(
7777
final InputStream json,
7878
final ObjectMapper objectMapper
7979
) {
8080
// Convert all checked exceptions to Runtime
8181
try {
82-
return objectMapper.readValue(json, NewApiKey.class);
82+
return objectMapper.readValue(json, Key.class);
8383
} catch (final JsonMappingException | JsonParseException e) {
8484
throw new ApiException(e.getMessage(), e);
8585
} catch (final IOException e) {
@@ -95,7 +95,7 @@ public static NewApiKey fromJson(
9595
private final Map<String, Object> policy;
9696

9797
@JsonCreator
98-
private NewApiKey(
98+
private Key(
9999
@JsonProperty("sid") final String sid,
100100
@JsonProperty("friendly_name") final String friendlyName,
101101
@JsonProperty("date_created") final String dateCreated,
@@ -145,7 +145,7 @@ public boolean equals(final Object o) {
145145
return false;
146146
}
147147

148-
NewApiKey other = (NewApiKey) o;
148+
Key other = (Key) o;
149149

150150
return (
151151
Objects.equals(sid, other.sid) &&

src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java renamed to src/main/java/com/twilio/rest/iam/v1/KeyCreator.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@
2929
import java.util.Map;
3030
import java.util.Map;
3131

32-
public class NewApiKeyCreator extends Creator<NewApiKey> {
32+
public class KeyCreator extends Creator<Key> {
3333

3434
private String accountSid;
3535
private String friendlyName;
36-
private NewApiKey.Keytype keyType;
36+
private Key.Keytype keyType;
3737
private Map<String, Object> policy;
3838

39-
public NewApiKeyCreator(final String accountSid) {
39+
public KeyCreator(final String accountSid) {
4040
this.accountSid = accountSid;
4141
}
4242

43-
public NewApiKeyCreator setAccountSid(final String accountSid) {
43+
public KeyCreator setAccountSid(final String accountSid) {
4444
this.accountSid = accountSid;
4545
return this;
4646
}
4747

48-
public NewApiKeyCreator setFriendlyName(final String friendlyName) {
48+
public KeyCreator setFriendlyName(final String friendlyName) {
4949
this.friendlyName = friendlyName;
5050
return this;
5151
}
5252

53-
public NewApiKeyCreator setKeyType(final NewApiKey.Keytype keyType) {
53+
public KeyCreator setKeyType(final Key.Keytype keyType) {
5454
this.keyType = keyType;
5555
return this;
5656
}
5757

58-
public NewApiKeyCreator setPolicy(final Map<String, Object> policy) {
58+
public KeyCreator setPolicy(final Map<String, Object> policy) {
5959
this.policy = policy;
6060
return this;
6161
}
6262

6363
@Override
64-
public NewApiKey create(final TwilioRestClient client) {
64+
public Key create(final TwilioRestClient client) {
6565
String path = "/v1/Keys";
6666

6767
path =
@@ -77,7 +77,7 @@ public NewApiKey create(final TwilioRestClient client) {
7777
Response response = client.request(request);
7878
if (response == null) {
7979
throw new ApiConnectionException(
80-
"NewApiKey creation failed: Unable to connect to server"
80+
"Key creation failed: Unable to connect to server"
8181
);
8282
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
8383
RestException restException = RestException.fromJson(
@@ -93,10 +93,7 @@ public NewApiKey create(final TwilioRestClient client) {
9393
throw new ApiException(restException);
9494
}
9595

96-
return NewApiKey.fromJson(
97-
response.getStream(),
98-
client.getObjectMapper()
99-
);
96+
return Key.fromJson(response.getStream(), client.getObjectMapper());
10097
}
10198

10299
private void addPostParams(final Request request) {
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
/*
2+
* This code was generated by
3+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
*
7+
* Twilio - Marketplace
8+
* This is the public Twilio REST API.
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator.
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
package com.twilio.rest.marketplace.v1;
16+
17+
import com.fasterxml.jackson.annotation.JsonCreator;
18+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19+
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import com.fasterxml.jackson.core.JsonParseException;
21+
import com.fasterxml.jackson.databind.JsonMappingException;
22+
import com.fasterxml.jackson.databind.ObjectMapper;
23+
import com.twilio.base.Resource;
24+
import com.twilio.exception.ApiConnectionException;
25+
import com.twilio.exception.ApiException;
26+
import java.io.IOException;
27+
import java.io.InputStream;
28+
import java.net.URI;
29+
import java.util.List;
30+
import java.util.Map;
31+
import java.util.Map;
32+
import java.util.Objects;
33+
import lombok.ToString;
34+
import lombok.ToString;
35+
36+
@JsonIgnoreProperties(ignoreUnknown = true)
37+
@ToString
38+
public class ModuleData extends Resource {
39+
40+
private static final long serialVersionUID = 132859226086963L;
41+
42+
public static ModuleDataCreator creator() {
43+
return new ModuleDataCreator();
44+
}
45+
46+
public static ModuleDataFetcher fetcher() {
47+
return new ModuleDataFetcher();
48+
}
49+
50+
/**
51+
* Converts a JSON String into a ModuleData object using the provided ObjectMapper.
52+
*
53+
* @param json Raw JSON String
54+
* @param objectMapper Jackson ObjectMapper
55+
* @return ModuleData object represented by the provided JSON
56+
*/
57+
public static ModuleData fromJson(
58+
final String json,
59+
final ObjectMapper objectMapper
60+
) {
61+
// Convert all checked exceptions to Runtime
62+
try {
63+
return objectMapper.readValue(json, ModuleData.class);
64+
} catch (final JsonMappingException | JsonParseException e) {
65+
throw new ApiException(e.getMessage(), e);
66+
} catch (final IOException e) {
67+
throw new ApiConnectionException(e.getMessage(), e);
68+
}
69+
}
70+
71+
/**
72+
* Converts a JSON InputStream into a ModuleData object using the provided
73+
* ObjectMapper.
74+
*
75+
* @param json Raw JSON InputStream
76+
* @param objectMapper Jackson ObjectMapper
77+
* @return ModuleData object represented by the provided JSON
78+
*/
79+
public static ModuleData fromJson(
80+
final InputStream json,
81+
final ObjectMapper objectMapper
82+
) {
83+
// Convert all checked exceptions to Runtime
84+
try {
85+
return objectMapper.readValue(json, ModuleData.class);
86+
} catch (final JsonMappingException | JsonParseException e) {
87+
throw new ApiException(e.getMessage(), e);
88+
} catch (final IOException e) {
89+
throw new ApiConnectionException(e.getMessage(), e);
90+
}
91+
}
92+
93+
private final URI url;
94+
private final String sid;
95+
private final Map<String, Object> description;
96+
private final Map<String, Object> support;
97+
private final Map<String, Object> policies;
98+
private final Map<String, Object> moduleInfo;
99+
private final Map<String, Object> documentation;
100+
private final Map<String, Object> configuration;
101+
private final Map<String, Object> pricing;
102+
private final List<Map<String, Object>> listings;
103+
104+
@JsonCreator
105+
private ModuleData(
106+
@JsonProperty("url") final URI url,
107+
@JsonProperty("sid") final String sid,
108+
@JsonProperty("description") final Map<String, Object> description,
109+
@JsonProperty("support") final Map<String, Object> support,
110+
@JsonProperty("policies") final Map<String, Object> policies,
111+
@JsonProperty("module_info") final Map<String, Object> moduleInfo,
112+
@JsonProperty("documentation") final Map<String, Object> documentation,
113+
@JsonProperty("configuration") final Map<String, Object> configuration,
114+
@JsonProperty("pricing") final Map<String, Object> pricing,
115+
@JsonProperty("listings") final List<Map<String, Object>> listings
116+
) {
117+
this.url = url;
118+
this.sid = sid;
119+
this.description = description;
120+
this.support = support;
121+
this.policies = policies;
122+
this.moduleInfo = moduleInfo;
123+
this.documentation = documentation;
124+
this.configuration = configuration;
125+
this.pricing = pricing;
126+
this.listings = listings;
127+
}
128+
129+
public final URI getUrl() {
130+
return this.url;
131+
}
132+
133+
public final String getSid() {
134+
return this.sid;
135+
}
136+
137+
public final Map<String, Object> getDescription() {
138+
return this.description;
139+
}
140+
141+
public final Map<String, Object> getSupport() {
142+
return this.support;
143+
}
144+
145+
public final Map<String, Object> getPolicies() {
146+
return this.policies;
147+
}
148+
149+
public final Map<String, Object> getModuleInfo() {
150+
return this.moduleInfo;
151+
}
152+
153+
public final Map<String, Object> getDocumentation() {
154+
return this.documentation;
155+
}
156+
157+
public final Map<String, Object> getConfiguration() {
158+
return this.configuration;
159+
}
160+
161+
public final Map<String, Object> getPricing() {
162+
return this.pricing;
163+
}
164+
165+
public final List<Map<String, Object>> getListings() {
166+
return this.listings;
167+
}
168+
169+
@Override
170+
public boolean equals(final Object o) {
171+
if (this == o) {
172+
return true;
173+
}
174+
175+
if (o == null || getClass() != o.getClass()) {
176+
return false;
177+
}
178+
179+
ModuleData other = (ModuleData) o;
180+
181+
return (
182+
Objects.equals(url, other.url) &&
183+
Objects.equals(sid, other.sid) &&
184+
Objects.equals(description, other.description) &&
185+
Objects.equals(support, other.support) &&
186+
Objects.equals(policies, other.policies) &&
187+
Objects.equals(moduleInfo, other.moduleInfo) &&
188+
Objects.equals(documentation, other.documentation) &&
189+
Objects.equals(configuration, other.configuration) &&
190+
Objects.equals(pricing, other.pricing) &&
191+
Objects.equals(listings, other.listings)
192+
);
193+
}
194+
195+
@Override
196+
public int hashCode() {
197+
return Objects.hash(
198+
url,
199+
sid,
200+
description,
201+
support,
202+
policies,
203+
moduleInfo,
204+
documentation,
205+
configuration,
206+
pricing,
207+
listings
208+
);
209+
}
210+
}

0 commit comments

Comments
 (0)