mirror of
https://github.com/ngrok/ngrok-api-java.git
synced 2026-05-17 16:50:39 +00:00
Update generated files
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<!-- Code generated for API Clients. DO NOT EDIT. -->
|
||||
## 0.15.0
|
||||
* Add support for CEL filtering when listing resources.
|
||||
|
||||
## 0.14.0
|
||||
* Change endpoint filtering query parameters to `id` and `url`.
|
||||
* Add support for getting secrets by vault.
|
||||
|
||||
@@ -288,6 +288,17 @@ public class Ngrok {
|
||||
return new Secrets(this.apiClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a service client for ServiceUsers.
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-service-users">https://ngrok.com/docs/api#api-service-users</a>.
|
||||
*
|
||||
* @return a service client
|
||||
*/
|
||||
public ServiceUsers serviceUsers() {
|
||||
return new ServiceUsers(this.apiClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* An SSH Certificate Authority is a pair of an SSH Certificate and its private
|
||||
* key that can be used to sign other SSH host and user certificates.
|
||||
|
||||
@@ -104,7 +104,7 @@ public class Endpoint {
|
||||
* @param region identifier of the region this endpoint belongs to
|
||||
* @param createdAt timestamp when the endpoint was created in RFC 3339 format
|
||||
* @param updatedAt timestamp when the endpoint was updated in RFC 3339 format
|
||||
* @param publicUrl URL of the hostport served by this endpoint
|
||||
* @param publicUrl deprecated [replaced by URL]: URL of the hostport served by this endpoint
|
||||
* @param proto protocol served by this endpoint. one of <code>http</code>, <code>https</code>, <code>tcp</code>, or <code>tls</code>
|
||||
* @param scheme the value of the <code>scheme</code> parameter as a {@link String}
|
||||
* @param hostport hostport served by this endpoint (hostname:port) -> soon to be deprecated
|
||||
@@ -224,7 +224,7 @@ public class Endpoint {
|
||||
}
|
||||
|
||||
/**
|
||||
* URL of the hostport served by this endpoint
|
||||
* deprecated [replaced by URL]: URL of the hostport served by this endpoint
|
||||
*
|
||||
* @return the value of the property as a {@link java.net.URI}
|
||||
*/
|
||||
|
||||
@@ -45,6 +45,9 @@ public class Secret {
|
||||
@JsonProperty("vault")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final Ref vault;
|
||||
@JsonProperty("vault_name")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final Optional<String> vaultName;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link Secret}.
|
||||
@@ -59,6 +62,7 @@ public class Secret {
|
||||
* @param createdBy Reference to who created this Secret
|
||||
* @param lastUpdatedBy Reference to who created this Secret
|
||||
* @param vault Reference to the vault the secret is stored in
|
||||
* @param vaultName Name of the vault the secret is stored in
|
||||
*/
|
||||
@JsonCreator
|
||||
public Secret(
|
||||
@@ -71,7 +75,8 @@ public class Secret {
|
||||
@JsonProperty("metadata") final Optional<String> metadata,
|
||||
@JsonProperty("created_by") final Ref createdBy,
|
||||
@JsonProperty("last_updated_by") final Ref lastUpdatedBy,
|
||||
@JsonProperty("vault") final Ref vault
|
||||
@JsonProperty("vault") final Ref vault,
|
||||
@JsonProperty("vault_name") final Optional<String> vaultName
|
||||
) {
|
||||
this.id = Objects.requireNonNull(id, "id is required");
|
||||
this.uri = Objects.requireNonNull(uri, "uri is required");
|
||||
@@ -83,6 +88,7 @@ public class Secret {
|
||||
this.createdBy = Objects.requireNonNull(createdBy, "createdBy is required");
|
||||
this.lastUpdatedBy = Objects.requireNonNull(lastUpdatedBy, "lastUpdatedBy is required");
|
||||
this.vault = Objects.requireNonNull(vault, "vault is required");
|
||||
this.vaultName = vaultName != null ? vaultName : Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,6 +181,15 @@ public class Secret {
|
||||
return this.vault;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the vault the secret is stored in
|
||||
*
|
||||
* @return the value of the property as a {@link String} wrapped in an {@link Optional}
|
||||
*/
|
||||
public Optional<String> getVaultName() {
|
||||
return this.vaultName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
@@ -195,7 +210,8 @@ public class Secret {
|
||||
this.metadata.equals(other.metadata)&&
|
||||
this.createdBy.equals(other.createdBy)&&
|
||||
this.lastUpdatedBy.equals(other.lastUpdatedBy)&&
|
||||
this.vault.equals(other.vault);
|
||||
this.vault.equals(other.vault)&&
|
||||
this.vaultName.equals(other.vaultName);
|
||||
|
||||
}
|
||||
|
||||
@@ -211,7 +227,8 @@ public class Secret {
|
||||
this.metadata,
|
||||
this.createdBy,
|
||||
this.lastUpdatedBy,
|
||||
this.vault
|
||||
this.vault,
|
||||
this.vaultName
|
||||
);
|
||||
}
|
||||
|
||||
@@ -228,6 +245,7 @@ public class Secret {
|
||||
"', createdBy='" + this.createdBy +
|
||||
"', lastUpdatedBy='" + this.lastUpdatedBy +
|
||||
"', vault='" + this.vault +
|
||||
"', vaultName='" + this.vaultName.orElse("(null)") +
|
||||
"'}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/* Code generated for API Clients. DO NOT EDIT. */
|
||||
|
||||
package com.ngrok.definitions;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* A class encapsulating the {@link ServiceUser} resource.
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ServiceUser {
|
||||
@JsonProperty("id")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final String id;
|
||||
@JsonProperty("uri")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final java.net.URI uri;
|
||||
@JsonProperty("name")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final String name;
|
||||
@JsonProperty("active")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final boolean active;
|
||||
@JsonProperty("created_at")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final java.time.OffsetDateTime createdAt;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link ServiceUser}.
|
||||
*
|
||||
* @param id unique API key resource identifier
|
||||
* @param uri URI to the API resource of this service user
|
||||
* @param name human-readable name used to identify the service
|
||||
* @param active whether or not the service is active
|
||||
* @param createdAt timestamp when the api key was created, RFC 3339 format
|
||||
*/
|
||||
@JsonCreator
|
||||
public ServiceUser(
|
||||
@JsonProperty("id") final String id,
|
||||
@JsonProperty("uri") final java.net.URI uri,
|
||||
@JsonProperty("name") final String name,
|
||||
@JsonProperty("active") final Boolean active,
|
||||
@JsonProperty("created_at") final java.time.OffsetDateTime createdAt
|
||||
) {
|
||||
this.id = Objects.requireNonNull(id, "id is required");
|
||||
this.uri = Objects.requireNonNull(uri, "uri is required");
|
||||
this.name = Objects.requireNonNull(name, "name is required");
|
||||
this.active = Objects.requireNonNull(active, "active is required");
|
||||
this.createdAt = Objects.requireNonNull(createdAt, "createdAt is required");
|
||||
}
|
||||
|
||||
/**
|
||||
* unique API key resource identifier
|
||||
*
|
||||
* @return the value of the property as a {@link String}
|
||||
*/
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI to the API resource of this service user
|
||||
*
|
||||
* @return the value of the property as a {@link java.net.URI}
|
||||
*/
|
||||
public java.net.URI getUri() {
|
||||
return this.uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* human-readable name used to identify the service
|
||||
*
|
||||
* @return the value of the property as a {@link String}
|
||||
*/
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether or not the service is active
|
||||
*
|
||||
* @return the value of the property as a {@link boolean}
|
||||
*/
|
||||
public boolean getActive() {
|
||||
return this.active;
|
||||
}
|
||||
|
||||
/**
|
||||
* timestamp when the api key was created, RFC 3339 format
|
||||
*
|
||||
* @return the value of the property as a {@link java.time.OffsetDateTime}
|
||||
*/
|
||||
public java.time.OffsetDateTime getCreatedAt() {
|
||||
return this.createdAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ServiceUser other = (ServiceUser) o;
|
||||
return
|
||||
this.id.equals(other.id)&&
|
||||
this.uri.equals(other.uri)&&
|
||||
this.name.equals(other.name)&&
|
||||
this.active == other.active&&
|
||||
this.createdAt.equals(other.createdAt);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
this.id,
|
||||
this.uri,
|
||||
this.name,
|
||||
this.active,
|
||||
this.createdAt
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServiceUser{" +
|
||||
"id='" + this.id +
|
||||
"', uri='" + this.uri +
|
||||
"', name='" + this.name +
|
||||
"', active='" + this.active +
|
||||
"', createdAt='" + this.createdAt +
|
||||
"'}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/* Code generated for API Clients. DO NOT EDIT. */
|
||||
|
||||
package com.ngrok.definitions;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* A class encapsulating the {@link ServiceUserList} resource.
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ServiceUserList implements Pageable {
|
||||
@JsonProperty("service_users")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final java.util.List<ServiceUser> serviceUsers;
|
||||
@JsonProperty("uri")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final java.net.URI uri;
|
||||
@JsonProperty("next_page_uri")
|
||||
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
|
||||
private final Optional<java.net.URI> nextPageUri;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link ServiceUserList}.
|
||||
*
|
||||
* @param serviceUsers the list of all service users on this account
|
||||
* @param uri URI of the service users list API resource
|
||||
* @param nextPageUri URI of the next page, or null if there is no next page
|
||||
*/
|
||||
@JsonCreator
|
||||
public ServiceUserList(
|
||||
@JsonProperty("service_users") final java.util.List<ServiceUser> serviceUsers,
|
||||
@JsonProperty("uri") final java.net.URI uri,
|
||||
@JsonProperty("next_page_uri") final Optional<java.net.URI> nextPageUri
|
||||
) {
|
||||
this.serviceUsers = serviceUsers != null ? serviceUsers : java.util.Collections.emptyList();
|
||||
this.uri = Objects.requireNonNull(uri, "uri is required");
|
||||
this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* the list of all service users on this account
|
||||
*
|
||||
* @return the value of the property as a {@link java.util.List} of {@link ServiceUser}
|
||||
*/
|
||||
public java.util.List<ServiceUser> getServiceUsers() {
|
||||
return this.serviceUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI of the service users list API resource
|
||||
*
|
||||
* @return the value of the property as a {@link java.net.URI}
|
||||
*/
|
||||
public java.net.URI getUri() {
|
||||
return this.uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI of the next page, or null if there is no next page
|
||||
*
|
||||
* @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional}
|
||||
*/
|
||||
public Optional<java.net.URI> getNextPageUri() {
|
||||
return this.nextPageUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ServiceUserList other = (ServiceUserList) o;
|
||||
return
|
||||
this.serviceUsers.equals(other.serviceUsers)&&
|
||||
this.uri.equals(other.uri)&&
|
||||
this.nextPageUri.equals(other.nextPageUri);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
this.serviceUsers,
|
||||
this.uri,
|
||||
this.nextPageUri
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServiceUserList{" +
|
||||
"serviceUsers='" + this.serviceUsers +
|
||||
"', uri='" + this.uri +
|
||||
"', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") +
|
||||
"'}";
|
||||
}
|
||||
}
|
||||
@@ -290,6 +290,7 @@ public class AgentIngresses {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -339,6 +340,28 @@ public class AgentIngresses {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -350,7 +373,8 @@ public class AgentIngresses {
|
||||
"/agent_ingresses",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(AgentIngressList.class)
|
||||
|
||||
@@ -290,6 +290,7 @@ public class ApiKeys {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -339,6 +340,28 @@ public class ApiKeys {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -350,7 +373,8 @@ public class ApiKeys {
|
||||
"/api_keys",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(ApiKeyList.class)
|
||||
|
||||
@@ -246,7 +246,7 @@ public class CertificateAuthorities {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get detailed information about a certficate authority
|
||||
* Get detailed information about a certificate authority
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities-get">https://ngrok.com/docs/api#api-certificate-authorities-get</a>.
|
||||
*
|
||||
@@ -267,6 +267,7 @@ public class CertificateAuthorities {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -316,6 +317,28 @@ public class CertificateAuthorities {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -327,7 +350,8 @@ public class CertificateAuthorities {
|
||||
"/certificate_authorities",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(CertificateAuthorityList.class)
|
||||
|
||||
@@ -341,6 +341,7 @@ public class Credentials {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -390,6 +391,28 @@ public class Credentials {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -401,7 +424,8 @@ public class Credentials {
|
||||
"/credentials",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(CredentialList.class)
|
||||
|
||||
@@ -210,6 +210,7 @@ public class Endpoints {
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<java.util.List<String>> id = Optional.empty();
|
||||
private Optional<java.util.List<String>> url = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -303,6 +304,28 @@ public class Endpoints {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -316,7 +339,8 @@ public class Endpoints {
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.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()))
|
||||
new AbstractMap.SimpleEntry<>("url", Optional.of(this.url).filter(url -> !url.isEmpty()).map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(EndpointList.class)
|
||||
|
||||
@@ -312,6 +312,7 @@ public class EventDestinations {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -361,6 +362,28 @@ public class EventDestinations {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -372,7 +395,8 @@ public class EventDestinations {
|
||||
"/event_destinations",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(EventDestinationList.class)
|
||||
|
||||
@@ -306,6 +306,7 @@ public class EventSubscriptions {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -355,6 +356,28 @@ public class EventSubscriptions {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -366,7 +389,8 @@ public class EventSubscriptions {
|
||||
"/event_subscriptions",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(EventSubscriptionList.class)
|
||||
|
||||
@@ -263,6 +263,7 @@ public class IpPolicies {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -312,6 +313,28 @@ public class IpPolicies {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -323,7 +346,8 @@ public class IpPolicies {
|
||||
"/ip_policies",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(IpPolicyList.class)
|
||||
|
||||
@@ -278,6 +278,7 @@ public class IpPolicyRules {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -327,6 +328,28 @@ public class IpPolicyRules {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -338,7 +361,8 @@ public class IpPolicyRules {
|
||||
"/ip_policy_rules",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(IpPolicyRuleList.class)
|
||||
|
||||
@@ -299,6 +299,7 @@ public class IpRestrictions {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -348,6 +349,28 @@ public class IpRestrictions {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -359,7 +382,8 @@ public class IpRestrictions {
|
||||
"/ip_restrictions",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(IpRestrictionList.class)
|
||||
|
||||
@@ -282,6 +282,7 @@ public class ReservedAddrs {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -331,6 +332,28 @@ public class ReservedAddrs {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -342,7 +365,8 @@ public class ReservedAddrs {
|
||||
"/reserved_addrs",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(ReservedAddrList.class)
|
||||
|
||||
@@ -367,6 +367,7 @@ public class ReservedDomains {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -416,6 +417,28 @@ public class ReservedDomains {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -427,7 +450,8 @@ public class ReservedDomains {
|
||||
"/reserved_domains",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(ReservedDomainList.class)
|
||||
|
||||
@@ -39,12 +39,11 @@ public class Secrets {
|
||||
private Optional<String> value = Optional.empty();
|
||||
private Optional<String> metadata = Optional.empty();
|
||||
private Optional<String> description = Optional.empty();
|
||||
private final String vaultId;
|
||||
private Optional<String> vaultId = Optional.empty();
|
||||
private Optional<String> vaultName = Optional.empty();
|
||||
|
||||
private CreateCallBuilder(
|
||||
final String vaultId
|
||||
) {
|
||||
this.vaultId = Objects.requireNonNull(vaultId, "vaultId is required");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,6 +134,50 @@ public class Secrets {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* unique identifier of the referenced vault
|
||||
*
|
||||
* @param vaultId the value of the vault_id parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder vaultId(final String vaultId) {
|
||||
this.vaultId = Optional.of(Objects.requireNonNull(vaultId, "vaultId is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* unique identifier of the referenced vault
|
||||
*
|
||||
* @param vaultId the value of the vault_id parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder vaultId(final Optional<String> vaultId) {
|
||||
this.vaultId = Objects.requireNonNull(vaultId, "vaultId is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* name of the referenced vault
|
||||
*
|
||||
* @param vaultName the value of the vault_name parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder vaultName(final String vaultName) {
|
||||
this.vaultName = Optional.of(Objects.requireNonNull(vaultName, "vaultName is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* name of the referenced vault
|
||||
*
|
||||
* @param vaultName the value of the vault_name parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder vaultName(final Optional<String> vaultName) {
|
||||
this.vaultName = Objects.requireNonNull(vaultName, "vaultName is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -150,7 +193,8 @@ public class Secrets {
|
||||
new AbstractMap.SimpleEntry<>("value", this.value.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("metadata", this.metadata.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("description", this.description.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("vault_id", Optional.of(this.vaultId))
|
||||
new AbstractMap.SimpleEntry<>("vault_id", this.vaultId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("vault_name", this.vaultName.map(Function.identity()))
|
||||
),
|
||||
Optional.of(Secret.class)
|
||||
);
|
||||
@@ -176,14 +220,11 @@ public class Secrets {
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-secrets-create">https://ngrok.com/docs/api#api-secrets-create</a>.
|
||||
*
|
||||
* @param vaultId unique identifier of the referenced vault
|
||||
* @return a call builder for this API call
|
||||
*/
|
||||
public CreateCallBuilder create(
|
||||
final String vaultId
|
||||
) {
|
||||
return new CreateCallBuilder(
|
||||
vaultId
|
||||
);
|
||||
}
|
||||
|
||||
@@ -463,6 +504,7 @@ public class Secrets {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -512,6 +554,28 @@ public class Secrets {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -523,7 +587,8 @@ public class Secrets {
|
||||
"/vault_secrets",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(SecretList.class)
|
||||
|
||||
@@ -0,0 +1,480 @@
|
||||
/* Code generated for API Clients. DO NOT EDIT. */
|
||||
|
||||
package com.ngrok.services;
|
||||
|
||||
import com.ngrok.NgrokApiClient;
|
||||
import com.ngrok.definitions.*;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* An API client for {@link ServiceUsers}.
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-service-users">https://ngrok.com/docs/api#api-service-users</a>.
|
||||
*/
|
||||
public class ServiceUsers {
|
||||
private final NgrokApiClient apiClient;
|
||||
|
||||
/**
|
||||
* Creates a new sub-client for ServiceUsers.
|
||||
*
|
||||
* @param apiClient an instance of {@link com.ngrok.NgrokApiClient}
|
||||
*/
|
||||
public ServiceUsers(final NgrokApiClient apiClient) {
|
||||
this.apiClient = Objects.requireNonNull(apiClient, "apiClient is required");
|
||||
}
|
||||
|
||||
/**
|
||||
* A builder object encapsulating state for an unsent Create API call.
|
||||
*/
|
||||
public class CreateCallBuilder {
|
||||
private Optional<String> name = Optional.empty();
|
||||
private Optional<Boolean> active = Optional.empty();
|
||||
|
||||
private CreateCallBuilder(
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* human-readable name used to identify the service
|
||||
*
|
||||
* @param name the value of the name parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder name(final String name) {
|
||||
this.name = Optional.of(Objects.requireNonNull(name, "name is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* human-readable name used to identify the service
|
||||
*
|
||||
* @param name the value of the name parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder name(final Optional<String> name) {
|
||||
this.name = Objects.requireNonNull(name, "name is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether or not the service is active
|
||||
*
|
||||
* @param active the value of the active parameter as a {@link boolean}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder active(final boolean active) {
|
||||
this.active = Optional.of(Objects.requireNonNull(active, "active is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether or not the service is active
|
||||
*
|
||||
* @param active the value of the active parameter as an {@link Optional} of {@link boolean}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public CreateCallBuilder active(final Optional<Boolean> active) {
|
||||
this.active = Objects.requireNonNull(active, "active is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
* @return a {@link CompletionStage} of {@link ServiceUser}
|
||||
*/
|
||||
public CompletionStage<ServiceUser> call() {
|
||||
return apiClient.sendRequest(
|
||||
NgrokApiClient.HttpMethod.POST,
|
||||
"/service_users",
|
||||
Stream.empty(),
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("name", this.name.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("active", this.active.map(Function.identity()))
|
||||
),
|
||||
Optional.of(ServiceUser.class)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call and blocks until it returns.
|
||||
*
|
||||
* @return {@link ServiceUser}
|
||||
* @throws InterruptedException if the thread was interrupted during the call
|
||||
*/
|
||||
public ServiceUser 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new service user
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-service-users-create">https://ngrok.com/docs/api#api-service-users-create</a>.
|
||||
*
|
||||
* @return a call builder for this API call
|
||||
*/
|
||||
public CreateCallBuilder create(
|
||||
) {
|
||||
return new CreateCallBuilder(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A builder object encapsulating state for an unsent Delete API call.
|
||||
*/
|
||||
public class DeleteCallBuilder {
|
||||
private final String id;
|
||||
|
||||
private DeleteCallBuilder(
|
||||
final String id
|
||||
) {
|
||||
this.id = Objects.requireNonNull(id, "id is required");
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
* @return a {@link CompletionStage} of {@link Void}
|
||||
*/
|
||||
public CompletionStage<Void> call() {
|
||||
return apiClient.sendRequest(
|
||||
NgrokApiClient.HttpMethod.DELETE,
|
||||
"/service_users/" + this.id,
|
||||
Stream.empty(),
|
||||
Stream.empty(),
|
||||
Optional.empty()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call and blocks until it returns.
|
||||
*
|
||||
* @throws InterruptedException if the thread was interrupted during the call
|
||||
*/
|
||||
public void blockingCall() throws InterruptedException {
|
||||
try {
|
||||
call().toCompletableFuture().get();
|
||||
} catch (final ExecutionException e) {
|
||||
throw e.getCause() instanceof RuntimeException ? (RuntimeException) e.getCause() : new RuntimeException(e.getCause().getMessage(), e.getCause());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a service user by ID
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-service-users-delete">https://ngrok.com/docs/api#api-service-users-delete</a>.
|
||||
*
|
||||
* @param id a resource identifier
|
||||
* @return a call builder for this API call
|
||||
*/
|
||||
public DeleteCallBuilder delete(
|
||||
final String id
|
||||
) {
|
||||
return new DeleteCallBuilder(
|
||||
id
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A builder object encapsulating state for an unsent Get API call.
|
||||
*/
|
||||
public class GetCallBuilder {
|
||||
private final String id;
|
||||
|
||||
private GetCallBuilder(
|
||||
final String id
|
||||
) {
|
||||
this.id = Objects.requireNonNull(id, "id is required");
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
* @return a {@link CompletionStage} of {@link ServiceUser}
|
||||
*/
|
||||
public CompletionStage<ServiceUser> call() {
|
||||
return apiClient.sendRequest(
|
||||
NgrokApiClient.HttpMethod.GET,
|
||||
"/service_users/" + this.id,
|
||||
Stream.empty(),
|
||||
Stream.empty(),
|
||||
Optional.of(ServiceUser.class)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call and blocks until it returns.
|
||||
*
|
||||
* @return {@link ServiceUser}
|
||||
* @throws InterruptedException if the thread was interrupted during the call
|
||||
*/
|
||||
public ServiceUser 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 the details of a Bot User by ID.
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-service-users-get">https://ngrok.com/docs/api#api-service-users-get</a>.
|
||||
*
|
||||
* @param id a resource identifier
|
||||
* @return a call builder for this API call
|
||||
*/
|
||||
public GetCallBuilder get(
|
||||
final String id
|
||||
) {
|
||||
return new GetCallBuilder(
|
||||
id
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A builder object encapsulating state for an unsent List API call.
|
||||
*/
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ListCallBuilder 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 ListCallBuilder 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 ListCallBuilder 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 ListCallBuilder limit(final Optional<String> limit) {
|
||||
this.limit = Objects.requireNonNull(limit, "limit is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
* @return a {@link CompletionStage} of a {@link Page} of {@link ServiceUserList}
|
||||
*/
|
||||
public CompletionStage<Page<ServiceUserList>> call() {
|
||||
return apiClient.sendRequest(
|
||||
NgrokApiClient.HttpMethod.GET,
|
||||
"/service_users",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(ServiceUserList.class)
|
||||
).thenApply(list -> new Page<>(apiClient, list));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call and blocks until it returns.
|
||||
*
|
||||
* @return a {@link Page} of {@link ServiceUserList}
|
||||
* @throws InterruptedException if the thread was interrupted during the call
|
||||
*/
|
||||
public Page<ServiceUserList> 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List all service users in this account.
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-service-users-list">https://ngrok.com/docs/api#api-service-users-list</a>.
|
||||
*
|
||||
* @return a call builder for this API call
|
||||
*/
|
||||
public ListCallBuilder list(
|
||||
) {
|
||||
return new ListCallBuilder(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A builder object encapsulating state for an unsent Update API call.
|
||||
*/
|
||||
public class UpdateCallBuilder {
|
||||
private final String id;
|
||||
private Optional<String> name = Optional.empty();
|
||||
private Optional<Boolean> active = Optional.empty();
|
||||
|
||||
private UpdateCallBuilder(
|
||||
final String id
|
||||
) {
|
||||
this.id = Objects.requireNonNull(id, "id is required");
|
||||
}
|
||||
|
||||
/**
|
||||
* human-readable name used to identify the service
|
||||
*
|
||||
* @param name the value of the name parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public UpdateCallBuilder name(final String name) {
|
||||
this.name = Optional.of(Objects.requireNonNull(name, "name is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* human-readable name used to identify the service
|
||||
*
|
||||
* @param name the value of the name parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public UpdateCallBuilder name(final Optional<String> name) {
|
||||
this.name = Objects.requireNonNull(name, "name is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether or not the service is active
|
||||
*
|
||||
* @param active the value of the active parameter as a {@link boolean}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public UpdateCallBuilder active(final boolean active) {
|
||||
this.active = Optional.of(Objects.requireNonNull(active, "active is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether or not the service is active
|
||||
*
|
||||
* @param active the value of the active parameter as an {@link Optional} of {@link boolean}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public UpdateCallBuilder active(final Optional<Boolean> active) {
|
||||
this.active = Objects.requireNonNull(active, "active is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
* @return a {@link CompletionStage} of {@link ServiceUser}
|
||||
*/
|
||||
public CompletionStage<ServiceUser> call() {
|
||||
return apiClient.sendRequest(
|
||||
NgrokApiClient.HttpMethod.PATCH,
|
||||
"/service_users/" + this.id,
|
||||
Stream.empty(),
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("name", this.name.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("active", this.active.map(Function.identity()))
|
||||
),
|
||||
Optional.of(ServiceUser.class)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call and blocks until it returns.
|
||||
*
|
||||
* @return {@link ServiceUser}
|
||||
* @throws InterruptedException if the thread was interrupted during the call
|
||||
*/
|
||||
public ServiceUser 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update attributes of a service user by ID.
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-service-users-update">https://ngrok.com/docs/api#api-service-users-update</a>.
|
||||
*
|
||||
* @param id the value of the <code>id</code> parameter as a {@link String}
|
||||
* @return a call builder for this API call
|
||||
*/
|
||||
public UpdateCallBuilder update(
|
||||
final String id
|
||||
) {
|
||||
return new UpdateCallBuilder(
|
||||
id
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ public class SshCertificateAuthorities {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get detailed information about an SSH Certficate Authority
|
||||
* Get detailed information about an SSH Certificate Authority
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-ssh-certificate-authorities-get">https://ngrok.com/docs/api#api-ssh-certificate-authorities-get</a>.
|
||||
*
|
||||
@@ -333,6 +333,7 @@ public class SshCertificateAuthorities {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -382,6 +383,28 @@ public class SshCertificateAuthorities {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -393,7 +416,8 @@ public class SshCertificateAuthorities {
|
||||
"/ssh_certificate_authorities",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(SshCertificateAuthorityList.class)
|
||||
|
||||
@@ -343,6 +343,7 @@ public class SshCredentials {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -392,6 +393,28 @@ public class SshCredentials {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -403,7 +426,8 @@ public class SshCredentials {
|
||||
"/ssh_credentials",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(SshCredentialList.class)
|
||||
|
||||
@@ -335,7 +335,7 @@ public class SshHostCertificates {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get detailed information about an SSH Host Certficate
|
||||
* Get detailed information about an SSH Host Certificate
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-ssh-host-certificates-get">https://ngrok.com/docs/api#api-ssh-host-certificates-get</a>.
|
||||
*
|
||||
|
||||
@@ -407,7 +407,7 @@ public class SshUserCertificates {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get detailed information about an SSH User Certficate
|
||||
* Get detailed information about an SSH User Certificate
|
||||
*
|
||||
* See also <a href="https://ngrok.com/docs/api#api-ssh-user-certificates-get">https://ngrok.com/docs/api#api-ssh-user-certificates-get</a>.
|
||||
*
|
||||
|
||||
@@ -272,6 +272,7 @@ public class TlsCertificates {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -321,6 +322,28 @@ public class TlsCertificates {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -332,7 +355,8 @@ public class TlsCertificates {
|
||||
"/tls_certificates",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(TlsCertificateList.class)
|
||||
|
||||
@@ -38,6 +38,7 @@ public class TunnelSessions {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -87,6 +88,28 @@ public class TunnelSessions {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -98,7 +121,8 @@ public class TunnelSessions {
|
||||
"/tunnel_sessions",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(TunnelSessionList.class)
|
||||
|
||||
@@ -515,6 +515,7 @@ public class Vaults {
|
||||
public class ListCallBuilder {
|
||||
private Optional<String> beforeId = Optional.empty();
|
||||
private Optional<String> limit = Optional.empty();
|
||||
private Optional<String> filter = Optional.empty();
|
||||
|
||||
private ListCallBuilder(
|
||||
) {
|
||||
@@ -564,6 +565,28 @@ public class Vaults {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as a {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final String filter) {
|
||||
this.filter = Optional.of(Objects.requireNonNull(filter, "filter is required"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets (or unsets) the <code>filter</code> parameter.
|
||||
*
|
||||
* @param filter the value of the filter parameter as an {@link Optional} of {@link String}
|
||||
* @return the call builder instance
|
||||
*/
|
||||
public ListCallBuilder filter(final Optional<String> filter) {
|
||||
this.filter = Objects.requireNonNull(filter, "filter is required");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the API call asynchronously.
|
||||
*
|
||||
@@ -575,7 +598,8 @@ public class Vaults {
|
||||
"/vaults",
|
||||
Stream.of(
|
||||
new AbstractMap.SimpleEntry<>("before_id", this.beforeId.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity()))
|
||||
new AbstractMap.SimpleEntry<>("limit", this.limit.map(Function.identity())),
|
||||
new AbstractMap.SimpleEntry<>("filter", this.filter.map(Function.identity()))
|
||||
),
|
||||
Stream.empty(),
|
||||
Optional.of(VaultList.class)
|
||||
|
||||
Reference in New Issue
Block a user