Skip to content

Commit 101cb16

Browse files
SDK regeneration
1 parent 3d4d226 commit 101cb16

File tree

192 files changed

+3685
-3800
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+3685
-3800
lines changed

reference.md

Lines changed: 231 additions & 94 deletions
Large diffs are not rendered by default.

src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ public class AsyncConnectionsClient {
3030

3131
protected final Supplier<AsyncDirectoryProvisioningClient> directoryProvisioningClient;
3232

33+
protected final Supplier<AsyncScimConfigurationClient> scimConfigurationClient;
34+
3335
protected final Supplier<AsyncClientsClient> clientsClient;
3436

3537
protected final Supplier<AsyncKeysClient> keysClient;
3638

37-
protected final Supplier<AsyncScimConfigurationClient> scimConfigurationClient;
38-
3939
protected final Supplier<AsyncUsersClient> usersClient;
4040

4141
public AsyncConnectionsClient(ClientOptions clientOptions) {
4242
this.clientOptions = clientOptions;
4343
this.rawClient = new AsyncRawConnectionsClient(clientOptions);
4444
this.directoryProvisioningClient = Suppliers.memoize(() -> new AsyncDirectoryProvisioningClient(clientOptions));
45+
this.scimConfigurationClient = Suppliers.memoize(() -> new AsyncScimConfigurationClient(clientOptions));
4546
this.clientsClient = Suppliers.memoize(() -> new AsyncClientsClient(clientOptions));
4647
this.keysClient = Suppliers.memoize(() -> new AsyncKeysClient(clientOptions));
47-
this.scimConfigurationClient = Suppliers.memoize(() -> new AsyncScimConfigurationClient(clientOptions));
4848
this.usersClient = Suppliers.memoize(() -> new AsyncUsersClient(clientOptions));
4949
}
5050

@@ -250,6 +250,10 @@ public AsyncDirectoryProvisioningClient directoryProvisioning() {
250250
return this.directoryProvisioningClient.get();
251251
}
252252

253+
public AsyncScimConfigurationClient scimConfiguration() {
254+
return this.scimConfigurationClient.get();
255+
}
256+
253257
public AsyncClientsClient clients() {
254258
return this.clientsClient.get();
255259
}
@@ -258,10 +262,6 @@ public AsyncKeysClient keys() {
258262
return this.keysClient.get();
259263
}
260264

261-
public AsyncScimConfigurationClient scimConfiguration() {
262-
return this.scimConfigurationClient.get();
263-
}
264-
265265
public AsyncUsersClient users() {
266266
return this.usersClient.get();
267267
}

src/main/java/com/auth0/client/mgmt/ConnectionsClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ public class ConnectionsClient {
2929

3030
protected final Supplier<DirectoryProvisioningClient> directoryProvisioningClient;
3131

32+
protected final Supplier<ScimConfigurationClient> scimConfigurationClient;
33+
3234
protected final Supplier<ClientsClient> clientsClient;
3335

3436
protected final Supplier<KeysClient> keysClient;
3537

36-
protected final Supplier<ScimConfigurationClient> scimConfigurationClient;
37-
3838
protected final Supplier<UsersClient> usersClient;
3939

4040
public ConnectionsClient(ClientOptions clientOptions) {
4141
this.clientOptions = clientOptions;
4242
this.rawClient = new RawConnectionsClient(clientOptions);
4343
this.directoryProvisioningClient = Suppliers.memoize(() -> new DirectoryProvisioningClient(clientOptions));
44+
this.scimConfigurationClient = Suppliers.memoize(() -> new ScimConfigurationClient(clientOptions));
4445
this.clientsClient = Suppliers.memoize(() -> new ClientsClient(clientOptions));
4546
this.keysClient = Suppliers.memoize(() -> new KeysClient(clientOptions));
46-
this.scimConfigurationClient = Suppliers.memoize(() -> new ScimConfigurationClient(clientOptions));
4747
this.usersClient = Suppliers.memoize(() -> new UsersClient(clientOptions));
4848
}
4949

@@ -248,6 +248,10 @@ public DirectoryProvisioningClient directoryProvisioning() {
248248
return this.directoryProvisioningClient.get();
249249
}
250250

251+
public ScimConfigurationClient scimConfiguration() {
252+
return this.scimConfigurationClient.get();
253+
}
254+
251255
public ClientsClient clients() {
252256
return this.clientsClient.get();
253257
}
@@ -256,10 +260,6 @@ public KeysClient keys() {
256260
return this.keysClient.get();
257261
}
258262

259-
public ScimConfigurationClient scimConfiguration() {
260-
return this.scimConfigurationClient.get();
261-
}
262-
263263
public UsersClient users() {
264264
return this.usersClient.get();
265265
}

src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateTestNotificationRequestContent.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public String getTo() {
4545
return to;
4646
}
4747

48+
/**
49+
* @return Medium to use to send the notification
50+
*/
4851
@JsonProperty("delivery_method")
4952
public Optional<PhoneProviderDeliveryMethodEnum> getDeliveryMethod() {
5053
return deliveryMethod;
@@ -96,6 +99,9 @@ public interface _FinalStage {
9699

97100
_FinalStage additionalProperties(Map<String, Object> additionalProperties);
98101

102+
/**
103+
* <p>Medium to use to send the notification</p>
104+
*/
99105
_FinalStage deliveryMethod(Optional<PhoneProviderDeliveryMethodEnum> deliveryMethod);
100106

101107
_FinalStage deliveryMethod(PhoneProviderDeliveryMethodEnum deliveryMethod);
@@ -131,12 +137,19 @@ public _FinalStage to(@NotNull String to) {
131137
return this;
132138
}
133139

140+
/**
141+
* <p>Medium to use to send the notification</p>
142+
* @return Reference to {@code this} so that method calls can be chained together.
143+
*/
134144
@java.lang.Override
135145
public _FinalStage deliveryMethod(PhoneProviderDeliveryMethodEnum deliveryMethod) {
136146
this.deliveryMethod = Optional.ofNullable(deliveryMethod);
137147
return this;
138148
}
139149

150+
/**
151+
* <p>Medium to use to send the notification</p>
152+
*/
140153
@java.lang.Override
141154
@JsonSetter(value = "delivery_method", nulls = Nulls.SKIP)
142155
public _FinalStage deliveryMethod(Optional<PhoneProviderDeliveryMethodEnum> deliveryMethod) {

src/main/java/com/auth0/client/mgmt/connections/AsyncKeysClient.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import com.auth0.client.mgmt.core.OptionalNullable;
88
import com.auth0.client.mgmt.core.RequestOptions;
99
import com.auth0.client.mgmt.types.ConnectionKey;
10+
import com.auth0.client.mgmt.types.PostConnectionKeysRequestContent;
11+
import com.auth0.client.mgmt.types.PostConnectionsKeysResponseContentItem;
1012
import com.auth0.client.mgmt.types.RotateConnectionKeysRequestContent;
1113
import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent;
1214
import java.util.List;
@@ -43,6 +45,37 @@ public CompletableFuture<List<ConnectionKey>> get(String id, RequestOptions requ
4345
return this.rawClient.get(id, requestOptions).thenApply(response -> response.body());
4446
}
4547

48+
/**
49+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
50+
*/
51+
public CompletableFuture<List<PostConnectionsKeysResponseContentItem>> create(String id) {
52+
return this.rawClient.create(id).thenApply(response -> response.body());
53+
}
54+
55+
/**
56+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
57+
*/
58+
public CompletableFuture<List<PostConnectionsKeysResponseContentItem>> create(
59+
String id, RequestOptions requestOptions) {
60+
return this.rawClient.create(id, requestOptions).thenApply(response -> response.body());
61+
}
62+
63+
/**
64+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
65+
*/
66+
public CompletableFuture<List<PostConnectionsKeysResponseContentItem>> create(
67+
String id, OptionalNullable<PostConnectionKeysRequestContent> request) {
68+
return this.rawClient.create(id, request).thenApply(response -> response.body());
69+
}
70+
71+
/**
72+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
73+
*/
74+
public CompletableFuture<List<PostConnectionsKeysResponseContentItem>> create(
75+
String id, OptionalNullable<PostConnectionKeysRequestContent> request, RequestOptions requestOptions) {
76+
return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body());
77+
}
78+
4679
/**
4780
* Rotates the connection keys for the Okta or OIDC connection strategies.
4881
*/

src/main/java/com/auth0/client/mgmt/connections/AsyncRawKeysClient.java

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
import com.auth0.client.mgmt.core.OptionalNullable;
1313
import com.auth0.client.mgmt.core.RequestOptions;
1414
import com.auth0.client.mgmt.errors.BadRequestError;
15+
import com.auth0.client.mgmt.errors.ConflictError;
1516
import com.auth0.client.mgmt.errors.ForbiddenError;
1617
import com.auth0.client.mgmt.errors.NotFoundError;
1718
import com.auth0.client.mgmt.errors.TooManyRequestsError;
1819
import com.auth0.client.mgmt.errors.UnauthorizedError;
1920
import com.auth0.client.mgmt.types.ConnectionKey;
21+
import com.auth0.client.mgmt.types.PostConnectionKeysRequestContent;
22+
import com.auth0.client.mgmt.types.PostConnectionsKeysResponseContentItem;
2023
import com.auth0.client.mgmt.types.RotateConnectionKeysRequestContent;
2124
import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent;
2225
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -135,6 +138,134 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
135138
return future;
136139
}
137140

141+
/**
142+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
143+
*/
144+
public CompletableFuture<ManagementApiHttpResponse<List<PostConnectionsKeysResponseContentItem>>> create(
145+
String id) {
146+
return create(id, OptionalNullable.<PostConnectionKeysRequestContent>absent());
147+
}
148+
149+
/**
150+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
151+
*/
152+
public CompletableFuture<ManagementApiHttpResponse<List<PostConnectionsKeysResponseContentItem>>> create(
153+
String id, RequestOptions requestOptions) {
154+
return create(id, OptionalNullable.<PostConnectionKeysRequestContent>absent(), requestOptions);
155+
}
156+
157+
/**
158+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
159+
*/
160+
public CompletableFuture<ManagementApiHttpResponse<List<PostConnectionsKeysResponseContentItem>>> create(
161+
String id, OptionalNullable<PostConnectionKeysRequestContent> request) {
162+
return create(id, request, null);
163+
}
164+
165+
/**
166+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
167+
*/
168+
public CompletableFuture<ManagementApiHttpResponse<List<PostConnectionsKeysResponseContentItem>>> create(
169+
String id, OptionalNullable<PostConnectionKeysRequestContent> request, RequestOptions requestOptions) {
170+
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
171+
.newBuilder()
172+
.addPathSegments("connections")
173+
.addPathSegment(id)
174+
.addPathSegments("keys");
175+
if (requestOptions != null) {
176+
requestOptions.getQueryParameters().forEach((_key, _value) -> {
177+
httpUrl.addQueryParameter(_key, _value);
178+
});
179+
}
180+
RequestBody body;
181+
try {
182+
body = RequestBody.create("", null);
183+
if (request.isPresent()) {
184+
body = RequestBody.create(
185+
ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
186+
}
187+
} catch (JsonProcessingException e) {
188+
throw new ManagementException("Failed to serialize request", e);
189+
}
190+
Request okhttpRequest = new Request.Builder()
191+
.url(httpUrl.build())
192+
.method("POST", body)
193+
.headers(Headers.of(clientOptions.headers(requestOptions)))
194+
.addHeader("Content-Type", "application/json")
195+
.addHeader("Accept", "application/json")
196+
.build();
197+
OkHttpClient client = clientOptions.httpClient();
198+
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
199+
client = clientOptions.httpClientWithTimeout(requestOptions);
200+
}
201+
CompletableFuture<ManagementApiHttpResponse<List<PostConnectionsKeysResponseContentItem>>> future =
202+
new CompletableFuture<>();
203+
client.newCall(okhttpRequest).enqueue(new Callback() {
204+
@Override
205+
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
206+
try (ResponseBody responseBody = response.body()) {
207+
String responseBodyString = responseBody != null ? responseBody.string() : "{}";
208+
if (response.isSuccessful()) {
209+
future.complete(new ManagementApiHttpResponse<>(
210+
ObjectMappers.JSON_MAPPER.readValue(
211+
responseBodyString,
212+
new TypeReference<List<PostConnectionsKeysResponseContentItem>>() {}),
213+
response));
214+
return;
215+
}
216+
try {
217+
switch (response.code()) {
218+
case 400:
219+
future.completeExceptionally(new BadRequestError(
220+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
221+
response));
222+
return;
223+
case 401:
224+
future.completeExceptionally(new UnauthorizedError(
225+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
226+
response));
227+
return;
228+
case 403:
229+
future.completeExceptionally(new ForbiddenError(
230+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
231+
response));
232+
return;
233+
case 404:
234+
future.completeExceptionally(new NotFoundError(
235+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
236+
response));
237+
return;
238+
case 409:
239+
future.completeExceptionally(new ConflictError(
240+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
241+
response));
242+
return;
243+
case 429:
244+
future.completeExceptionally(new TooManyRequestsError(
245+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
246+
response));
247+
return;
248+
}
249+
} catch (JsonProcessingException ignored) {
250+
// unable to map error response, throwing generic error
251+
}
252+
Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
253+
future.completeExceptionally(new ManagementApiException(
254+
"Error with status code " + response.code(), response.code(), errorBody, response));
255+
return;
256+
} catch (IOException e) {
257+
future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
258+
}
259+
}
260+
261+
@Override
262+
public void onFailure(@NotNull Call call, @NotNull IOException e) {
263+
future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
264+
}
265+
});
266+
return future;
267+
}
268+
138269
/**
139270
* Rotates the connection keys for the Okta or OIDC connection strategies.
140271
*/

0 commit comments

Comments
 (0)