Update generated files

This commit is contained in:
ngrok release bot
2025-08-19 21:34:56 +00:00
parent c4718eb71f
commit 80898a57fe
2 changed files with 127 additions and 20 deletions
+20 -20
View File
@@ -208,8 +208,8 @@ public class Endpoints {
public class ListCallBuilder {
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private Optional<java.util.List<String>> ids = Optional.empty();
private Optional<java.util.List<String>> urls = Optional.empty();
private Optional<java.util.List<String>> id = Optional.empty();
private Optional<java.util.List<String>> url = Optional.empty();
private ListCallBuilder(
) {
@@ -260,46 +260,46 @@ public class Endpoints {
}
/**
* Sets the <code>ids</code> parameter.
* Sets the <code>id</code> parameter.
*
* @param ids the value of the ids parameter as a {@link java.util.List} of {@link String}
* @param id the value of the id parameter as a {@link java.util.List} of {@link String}
* @return the call builder instance
*/
public ListCallBuilder ids(final java.util.List<String> ids) {
this.ids = Optional.of(Objects.requireNonNull(ids, "ids is required"));
public ListCallBuilder id(final java.util.List<String> id) {
this.id = Optional.of(Objects.requireNonNull(id, "id is required"));
return this;
}
/**
* Sets (or unsets) the <code>ids</code> parameter.
* Sets (or unsets) the <code>id</code> parameter.
*
* @param ids the value of the ids parameter as an {@link Optional} of {@link java.util.List} of {@link String}
* @param id the value of the id parameter as an {@link Optional} of {@link java.util.List} of {@link String}
* @return the call builder instance
*/
public ListCallBuilder ids(final Optional<java.util.List<String>> ids) {
this.ids = Objects.requireNonNull(ids, "ids is required");
public ListCallBuilder id(final Optional<java.util.List<String>> id) {
this.id = Objects.requireNonNull(id, "id is required");
return this;
}
/**
* Sets the <code>urls</code> parameter.
* Sets the <code>url</code> parameter.
*
* @param urls the value of the urls parameter as a {@link java.util.List} of {@link String}
* @param url the value of the url parameter as a {@link java.util.List} of {@link String}
* @return the call builder instance
*/
public ListCallBuilder urls(final java.util.List<String> urls) {
this.urls = Optional.of(Objects.requireNonNull(urls, "urls is required"));
public ListCallBuilder url(final java.util.List<String> url) {
this.url = Optional.of(Objects.requireNonNull(url, "url is required"));
return this;
}
/**
* Sets (or unsets) the <code>urls</code> parameter.
* Sets (or unsets) the <code>url</code> parameter.
*
* @param urls the value of the urls parameter as an {@link Optional} of {@link java.util.List} of {@link String}
* @param url the value of the url parameter as an {@link Optional} of {@link java.util.List} of {@link String}
* @return the call builder instance
*/
public ListCallBuilder urls(final Optional<java.util.List<String>> urls) {
this.urls = Objects.requireNonNull(urls, "urls is required");
public ListCallBuilder url(final Optional<java.util.List<String>> url) {
this.url = Objects.requireNonNull(url, "url is required");
return this;
}
@@ -315,8 +315,8 @@ public class Endpoints {
Stream.of(
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
new AbstractMap.SimpleEntry<>("ids", Optional.of(this.ids).filter(ids -> !ids.isEmpty()).map(Function.identity())),
new AbstractMap.SimpleEntry<>("urls", Optional.of(this.urls).filter(urls -> !urls.isEmpty()).map(Function.identity()))
new AbstractMap.SimpleEntry<>("id", Optional.of(this.id).filter(id -> !id.isEmpty()).map(Function.identity())),
new AbstractMap.SimpleEntry<>("url", Optional.of(this.url).filter(url -> !url.isEmpty()).map(Function.identity()))
),
Stream.empty(),
Optional.of(EndpointList.class)
@@ -402,6 +402,113 @@ public class Vaults {
);
}
/**
* A builder object encapsulating state for an unsent GetSecretsByVault API call.
*/
public class GetSecretsByVaultCallBuilder {
private final String id;
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private GetSecretsByVaultCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
}
/**
* Sets the <code>before_id</code> parameter.
*
* @param beforeId the value of the before_id parameter as a {@link String}
* @return the call builder instance
*/
public GetSecretsByVaultCallBuilder beforeId(final String beforeId) {
this.beforeId = Optional.of(Objects.requireNonNull(beforeId, "beforeId is required"));
return this;
}
/**
* Sets (or unsets) the <code>before_id</code> parameter.
*
* @param beforeId the value of the before_id parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public GetSecretsByVaultCallBuilder beforeId(final Optional<String> beforeId) {
this.beforeId = Objects.requireNonNull(beforeId, "beforeId is required");
return this;
}
/**
* Sets the <code>limit</code> parameter.
*
* @param limit the value of the limit parameter as a {@link String}
* @return the call builder instance
*/
public GetSecretsByVaultCallBuilder limit(final String limit) {
this.limit = Optional.of(Objects.requireNonNull(limit, "limit is required"));
return this;
}
/**
* Sets (or unsets) the <code>limit</code> parameter.
*
* @param limit the value of the limit parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public GetSecretsByVaultCallBuilder limit(final Optional<String> limit) {
this.limit = Objects.requireNonNull(limit, "limit is required");
return this;
}
/**
* Initiates the API call asynchronously.
*
* @return a {@link CompletionStage} of a {@link Page} of {@link SecretList}
*/
public CompletionStage<Page<SecretList>> call() {
return apiClient.sendRequest(
NgrokApiClient.HttpMethod.GET,
"/vaults/" + this.id + "/secrets",
Stream.of(
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
),
Stream.empty(),
Optional.of(SecretList.class)
).thenApply(list -> new Page<>(apiClient, list));
}
/**
* Initiates the API call and blocks until it returns.
*
* @return a {@link Page} of {@link SecretList}
* @throws InterruptedException if the thread was interrupted during the call
*/
public Page<SecretList> blockingCall() throws InterruptedException {
try {
return call().toCompletableFuture().get();
} catch (final ExecutionException e) {
throw e.getCause() instanceof RuntimeException ? (RuntimeException) e.getCause() : new RuntimeException(e.getCause().getMessage(), e.getCause());
}
}
}
/**
* Get Secrets by Vault ID
*
* See also <a href="https://ngrok.com/docs/api#api-vaults-get-secrets-by-vault">https://ngrok.com/docs/api#api-vaults-get-secrets-by-vault</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public GetSecretsByVaultCallBuilder getSecretsByVault(
final String id
) {
return new GetSecretsByVaultCallBuilder(
id
);
}
/**
* A builder object encapsulating state for an unsent List API call.
*/