cut new release for ngrok-api-java

This commit is contained in:
Brian J. Tarricone
2021-09-28 08:06:04 +00:00
parent 18f92a29f8
commit 820ed96b4a
124 changed files with 5661 additions and 1087 deletions
+68
View File
@@ -45,6 +45,8 @@ public class Ngrok {
* Abuse Reports allow you to submit take-down requests for URLs hosted by
* ngrok that violate ngrok's terms of service.
*
* See also <a href="https://ngrok.com/docs/api#api-abuse-reports">https://ngrok.com/docs/api#api-abuse-reports</a>.
*
* @return a service client
*/
public AbuseReports abuseReports() {
@@ -60,6 +62,8 @@ public class Ngrok {
* on your
* ngrok.com dashboard.
*
* See also <a href="https://ngrok.com/docs/api#api-api-keys">https://ngrok.com/docs/api#api-api-keys</a>.
*
* @return a service client
*/
public ApiKeys apiKeys() {
@@ -73,6 +77,8 @@ public class Ngrok {
* this CA. Certificate Authorities are used only for mTLS validation only and
* thus a private key is not included in the resource.
*
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities">https://ngrok.com/docs/api#api-certificate-authorities</a>.
*
* @return a service client
*/
public CertificateAuthorities certificateAuthorities() {
@@ -86,6 +92,8 @@ public class Ngrok {
* <code>ngrok.yml</code>
* configuration file with the <code>authtoken</code> property.
*
* See also <a href="https://ngrok.com/docs/api#api-credentials">https://ngrok.com/docs/api#api-credentials</a>.
*
* @return a service client
*/
public Credentials credentials() {
@@ -97,6 +105,8 @@ public class Ngrok {
* traffic to a domain or address is handled. Endpoint configurations are only
* applied to Domains and TCP Addresses they have been attached to.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-configurations">https://ngrok.com/docs/api#api-endpoint-configurations</a>.
*
* @return a service client
*/
public EndpointConfigurations endpointConfigurations() {
@@ -106,6 +116,8 @@ public class Ngrok {
/**
* Creates a service client for EventStreams.
*
* See also <a href="https://ngrok.com/docs/api#api-event-streams">https://ngrok.com/docs/api#api-event-streams</a>.
*
* @return a service client
*/
public EventStreams eventStreams() {
@@ -115,6 +127,8 @@ public class Ngrok {
/**
* Creates a service client for EventDestinations.
*
* See also <a href="https://ngrok.com/docs/api#api-event-destinations">https://ngrok.com/docs/api#api-event-destinations</a>.
*
* @return a service client
*/
public EventDestinations eventDestinations() {
@@ -124,6 +138,8 @@ public class Ngrok {
/**
* Creates a service client for EventSubscriptions.
*
* See also <a href="https://ngrok.com/docs/api#api-event-subscriptions">https://ngrok.com/docs/api#api-event-subscriptions</a>.
*
* @return a service client
*/
public EventSubscriptions eventSubscriptions() {
@@ -133,6 +149,8 @@ public class Ngrok {
/**
* Creates a service client for EventSources.
*
* See also <a href="https://ngrok.com/docs/api#api-event-sources">https://ngrok.com/docs/api#api-event-sources</a>.
*
* @return a service client
*/
public EventSources eventSources() {
@@ -146,6 +164,8 @@ public class Ngrok {
* Policy module. They can also be used with IP Restrictions to control source
* IP ranges that can start tunnel sessions and connect to the API and dashboard.
*
* See also <a href="https://ngrok.com/docs/api#api-ip-policies">https://ngrok.com/docs/api#api-ip-policies</a>.
*
* @return a service client
*/
public IpPolicies ipPolicies() {
@@ -156,6 +176,8 @@ public class Ngrok {
* IP Policy Rules are the IPv4 or IPv6 CIDRs entries that
* make up an IP Policy.
*
* See also <a href="https://ngrok.com/docs/api#api-ip-policy-rules">https://ngrok.com/docs/api#api-ip-policy-rules</a>.
*
* @return a service client
*/
public IpPolicyRules ipPolicyRules() {
@@ -170,6 +192,8 @@ public class Ngrok {
* requests, log in to the dashboard, start ngrok agents, and connect to your
* public-facing endpoints.
*
* See also <a href="https://ngrok.com/docs/api#api-ip-restrictions">https://ngrok.com/docs/api#api-ip-restrictions</a>.
*
* @return a service client
*/
public IpRestrictions ipRestrictions() {
@@ -180,6 +204,8 @@ public class Ngrok {
* The IP Whitelist is deprecated and will be removed. Use an IP Restriction
* with an <code>endpoints</code> type instead.
*
* See also <a href="https://ngrok.com/docs/api#api-ip-whitelist">https://ngrok.com/docs/api#api-ip-whitelist</a>.
*
* @return a service client
*/
public IpWhitelist ipWhitelist() {
@@ -191,6 +217,8 @@ public class Ngrok {
* TCP address hostnames and ports are assigned by ngrok, they cannot be
* chosen.
*
* See also <a href="https://ngrok.com/docs/api#api-reserved-addrs">https://ngrok.com/docs/api#api-reserved-addrs</a>.
*
* @return a service client
*/
public ReservedAddrs reservedAddrs() {
@@ -203,6 +231,8 @@ public class Ngrok {
* that you own by creating a CNAME record specified in the returned resource.
* This CNAME record points traffic for that domain to ngrok's edge servers.
*
* See also <a href="https://ngrok.com/docs/api#api-reserved-domains">https://ngrok.com/docs/api#api-reserved-domains</a>.
*
* @return a service client
*/
public ReservedDomains reservedDomains() {
@@ -213,6 +243,8 @@ public class Ngrok {
* 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.
*
* See also <a href="https://ngrok.com/docs/api#api-ssh-certificate-authorities">https://ngrok.com/docs/api#api-ssh-certificate-authorities</a>.
*
* @return a service client
*/
public SshCertificateAuthorities sshCertificateAuthorities() {
@@ -223,6 +255,8 @@ public class Ngrok {
* SSH Credentials are SSH public keys that can be used to start SSH tunnels
* via the ngrok SSH tunnel gateway.
*
* See also <a href="https://ngrok.com/docs/api#api-ssh-credentials">https://ngrok.com/docs/api#api-ssh-credentials</a>.
*
* @return a service client
*/
public SshCredentials sshCredentials() {
@@ -234,6 +268,8 @@ public class Ngrok {
* server to assert its authenticity to connecting SSH clients who trust the
* SSH Certificate Authority that was used to sign the certificate.
*
* See also <a href="https://ngrok.com/docs/api#api-ssh-host-certificates">https://ngrok.com/docs/api#api-ssh-host-certificates</a>.
*
* @return a service client
*/
public SshHostCertificates sshHostCertificates() {
@@ -245,6 +281,8 @@ public class Ngrok {
* server to authenticate their connection. The SSH server must trust the SSH
* Certificate Authority used to sign the certificate.
*
* See also <a href="https://ngrok.com/docs/api#api-ssh-user-certificates">https://ngrok.com/docs/api#api-ssh-user-certificates</a>.
*
* @return a service client
*/
public SshUserCertificates sshUserCertificates() {
@@ -258,6 +296,8 @@ public class Ngrok {
* provisioned by ngrok automatically for domains on which you have enabled
* automated certificate provisioning.
*
* See also <a href="https://ngrok.com/docs/api#api-tls-certificates">https://ngrok.com/docs/api#api-tls-certificates</a>.
*
* @return a service client
*/
public TlsCertificates tlsCertificates() {
@@ -269,6 +309,8 @@ public class Ngrok {
* sessions that are running and connected to the ngrok service. Each tunnel
* session can include one or more Tunnels.
*
* See also <a href="https://ngrok.com/docs/api#api-tunnel-sessions">https://ngrok.com/docs/api#api-tunnel-sessions</a>.
*
* @return a service client
*/
public TunnelSessions tunnelSessions() {
@@ -279,6 +321,8 @@ public class Ngrok {
* Tunnels provide endpoints to access services exposed by a running ngrok
* agent tunnel session or an SSH reverse tunnel session.
*
* See also <a href="https://ngrok.com/docs/api#api-tunnels">https://ngrok.com/docs/api#api-tunnels</a>.
*
* @return a service client
*/
public Tunnels tunnels() {
@@ -303,6 +347,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointLoggingModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-logging-module">https://ngrok.com/docs/api#api-endpoint-logging-module</a>
*
* @return a service client
*/
public EndpointLoggingModule logging() {
@@ -312,6 +358,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointCircuitBreakerModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module">https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module</a>
*
* @return a service client
*/
public EndpointCircuitBreakerModule circuitBreaker() {
@@ -321,6 +369,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointCompressionModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-compression-module">https://ngrok.com/docs/api#api-endpoint-compression-module</a>
*
* @return a service client
*/
public EndpointCompressionModule compression() {
@@ -330,6 +380,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointTlsTerminationModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-tls-termination-module">https://ngrok.com/docs/api#api-endpoint-tls-termination-module</a>
*
* @return a service client
*/
public EndpointTlsTerminationModule tlsTermination() {
@@ -339,6 +391,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointIpPolicyModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-ip-policy-module">https://ngrok.com/docs/api#api-endpoint-ip-policy-module</a>
*
* @return a service client
*/
public EndpointIpPolicyModule ipPolicy() {
@@ -348,6 +402,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointMutualTlsModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-mutual-tls-module">https://ngrok.com/docs/api#api-endpoint-mutual-tls-module</a>
*
* @return a service client
*/
public EndpointMutualTlsModule mutualTls() {
@@ -357,6 +413,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointRequestHeadersModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-request-headers-module">https://ngrok.com/docs/api#api-endpoint-request-headers-module</a>
*
* @return a service client
*/
public EndpointRequestHeadersModule requestHeaders() {
@@ -366,6 +424,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointResponseHeadersModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-response-headers-module">https://ngrok.com/docs/api#api-endpoint-response-headers-module</a>
*
* @return a service client
*/
public EndpointResponseHeadersModule responseHeaders() {
@@ -375,6 +435,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointOAuthModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-o-auth-module">https://ngrok.com/docs/api#api-endpoint-o-auth-module</a>
*
* @return a service client
*/
public EndpointOAuthModule oauth() {
@@ -384,6 +446,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointWebhookValidationModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-webhook-validation-module">https://ngrok.com/docs/api#api-endpoint-webhook-validation-module</a>
*
* @return a service client
*/
public EndpointWebhookValidationModule webhookValidation() {
@@ -393,6 +457,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointSamlModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-saml-module">https://ngrok.com/docs/api#api-endpoint-saml-module</a>
*
* @return a service client
*/
public EndpointSamlModule saml() {
@@ -402,6 +468,8 @@ public class Ngrok {
/**
* Creates a service client for {@link EndpointOidcModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-oidc-module">https://ngrok.com/docs/api#api-endpoint-oidc-module</a>
*
* @return a service client
*/
public EndpointOidcModule oidc() {
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class AbuseReport {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("urls")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<java.net.URI> urls;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("status")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String status;
@JsonProperty("hostnames")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<AbuseReportHostname> hostnames;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class AbuseReportHostname {
@JsonProperty("hostname")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String hostname;
@JsonProperty("status")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String status;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,16 +14,22 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ApiKey {
@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("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("token")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> token;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ApiKeyList implements Pageable {
@JsonProperty("keys")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<ApiKey> keys;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,94 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class AwsAuth {
/**
* Builder class for {@link AwsAuth}.
*/
public static class Builder {
private Optional<AwsRole> role = Optional.empty();
private Optional<AwsCredentials> creds = Optional.empty();
private Builder(
) {
}
/**
* A role for ngrok to assume on your behalf to deposit events into your AWS
* account.
*
* @param role the value of the <code>role</code> parameter as a {@link AwsRole}
* @return this builder instance
*/
public Builder role(final AwsRole role) {
this.role = Optional.of(Objects.requireNonNull(role, "role is required"));
return this;
}
/**
* A role for ngrok to assume on your behalf to deposit events into your AWS
* account.
*
* @param role the value of the <code>role</code> parameter as a {@link AwsRole}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder role(final Optional<AwsRole> role) {
this.role = Objects.requireNonNull(role, "role is required");
return this;
}
/**
* Credentials to your AWS account if you prefer ngrok to sign in with long-term
* access keys.
*
* @param creds the value of the <code>creds</code> parameter as a {@link AwsCredentials}
* @return this builder instance
*/
public Builder creds(final AwsCredentials creds) {
this.creds = Optional.of(Objects.requireNonNull(creds, "creds is required"));
return this;
}
/**
* Credentials to your AWS account if you prefer ngrok to sign in with long-term
* access keys.
*
* @param creds the value of the <code>creds</code> parameter as a {@link AwsCredentials}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder creds(final Optional<AwsCredentials> creds) {
this.creds = Objects.requireNonNull(creds, "creds is required");
return this;
}
/**
* Constructs the {@link AwsAuth} instance.
*
* @return a new {@link AwsAuth}
*/
public AwsAuth build() {
return new AwsAuth(
this.role,
this.creds
);
}
}
/**
* Creates a new builder for the {@link AwsAuth} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("role")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<AwsRole> role;
@JsonProperty("creds")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<AwsCredentials> creds;
/**
@@ -24,7 +110,7 @@ public class AwsAuth {
* @param creds Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys.
*/
@JsonCreator
public AwsAuth(
private AwsAuth(
@JsonProperty("role") final Optional<AwsRole> role,
@JsonProperty("creds") final Optional<AwsCredentials> creds
) {
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,56 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class AwsCredentials {
/**
* Builder class for {@link AwsCredentials}.
*/
public static class Builder {
private final String awsAccessKeyId;
private final String awsSecretAccessKey;
private Builder(
final String awsAccessKeyId,
final String awsSecretAccessKey
) {
this.awsAccessKeyId = Objects.requireNonNull(awsAccessKeyId, "awsAccessKeyId is required");
this.awsSecretAccessKey = Objects.requireNonNull(awsSecretAccessKey, "awsSecretAccessKey is required");
}
/**
* Constructs the {@link AwsCredentials} instance.
*
* @return a new {@link AwsCredentials}
*/
public AwsCredentials build() {
return new AwsCredentials(
this.awsAccessKeyId,
Optional.of(this.awsSecretAccessKey)
);
}
}
/**
* Creates a new builder for the {@link AwsCredentials} type.
*
* @param awsAccessKeyId The ID portion of an AWS access key.
* @param awsSecretAccessKey The secret portion of an AWS access key.
* @return a new {@link Builder}
*/
public static Builder newBuilder(
final String awsAccessKeyId,
final String awsSecretAccessKey
) {
return new Builder (
awsAccessKeyId,
awsSecretAccessKey
);
}
@JsonProperty("aws_access_key_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String awsAccessKeyId;
@JsonProperty("aws_secret_access_key")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> awsSecretAccessKey;
/**
@@ -24,7 +72,7 @@ public class AwsCredentials {
* @param awsSecretAccessKey The secret portion of an AWS access key.
*/
@JsonCreator
public AwsCredentials(
private AwsCredentials(
@JsonProperty("aws_access_key_id") final String awsAccessKeyId,
@JsonProperty("aws_secret_access_key") final Optional<String> awsSecretAccessKey
) {
@@ -2,6 +2,7 @@ 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;
@@ -12,7 +13,46 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class AwsRole {
/**
* Builder class for {@link AwsRole}.
*/
public static class Builder {
private final String roleArn;
private Builder(
final String roleArn
) {
this.roleArn = Objects.requireNonNull(roleArn, "roleArn is required");
}
/**
* Constructs the {@link AwsRole} instance.
*
* @return a new {@link AwsRole}
*/
public AwsRole build() {
return new AwsRole(
this.roleArn
);
}
}
/**
* Creates a new builder for the {@link AwsRole} type.
*
* @param roleArn An ARN that specifies the role that ngrok should use to deliver to the configured target.
* @return a new {@link Builder}
*/
public static Builder newBuilder(
final String roleArn
) {
return new Builder (
roleArn
);
}
@JsonProperty("role_arn")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String roleArn;
/**
@@ -21,7 +61,7 @@ public class AwsRole {
* @param roleArn An ARN that specifies the role that ngrok should use to deliver to the configured target.
*/
@JsonCreator
public AwsRole(
private AwsRole(
@JsonProperty("role_arn") final String roleArn
) {
this.roleArn = Objects.requireNonNull(roleArn, "roleArn is required");
@@ -2,6 +2,7 @@ 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;
@@ -13,26 +14,37 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class CertificateAuthority {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("ca_pem")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String caPem;
@JsonProperty("subject_common_name")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String subjectCommonName;
@JsonProperty("not_before")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime notBefore;
@JsonProperty("not_after")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime notAfter;
@JsonProperty("key_usages")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> keyUsages;
@JsonProperty("extended_key_usages")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> extendedKeyUsages;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class CertificateAuthorityList implements Pageable {
@JsonProperty("certificate_authorities")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<CertificateAuthority> certificateAuthorities;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Credential {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("token")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> token;
@JsonProperty("acl")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> acl;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class CredentialList implements Pageable {
@JsonProperty("credentials")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<Credential> credentials;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,17 +13,206 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointCircuitBreaker {
/**
* Builder class for {@link EndpointCircuitBreaker}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<java.time.Duration> trippedDuration = Optional.empty();
private Optional<Long> rollingWindow = Optional.empty();
private Optional<Long> numBuckets = Optional.empty();
private Optional<Long> volumeThreshold = Optional.empty();
private Optional<Double> errorThresholdPercentage = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* Integer number of seconds after which the circuit is tripped to wait before
* re-evaluating upstream health
*
* @param trippedDuration the value of the <code>tripped_duration</code> parameter as a {@link java.time.Duration}
* @return this builder instance
*/
public Builder trippedDuration(final java.time.Duration trippedDuration) {
this.trippedDuration = Optional.of(Objects.requireNonNull(trippedDuration, "trippedDuration is required"));
return this;
}
/**
* Integer number of seconds after which the circuit is tripped to wait before
* re-evaluating upstream health
*
* @param trippedDuration the value of the <code>tripped_duration</code> parameter as a {@link java.time.Duration}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder trippedDuration(final Optional<java.time.Duration> trippedDuration) {
this.trippedDuration = Objects.requireNonNull(trippedDuration, "trippedDuration is required");
return this;
}
/**
* Integer number of seconds in the statistical rolling window that metrics are
* retained for.
*
* @param rollingWindow the value of the <code>rolling_window</code> parameter as a {@link long}
* @return this builder instance
*/
public Builder rollingWindow(final long rollingWindow) {
this.rollingWindow = Optional.of(Objects.requireNonNull(rollingWindow, "rollingWindow is required"));
return this;
}
/**
* Integer number of seconds in the statistical rolling window that metrics are
* retained for.
*
* @param rollingWindow the value of the <code>rolling_window</code> parameter as a {@link long}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder rollingWindow(final Optional<Long> rollingWindow) {
this.rollingWindow = Objects.requireNonNull(rollingWindow, "rollingWindow is required");
return this;
}
/**
* Integer number of buckets into which metrics are retained. Max 128.
*
* @param numBuckets the value of the <code>num_buckets</code> parameter as a {@link long}
* @return this builder instance
*/
public Builder numBuckets(final long numBuckets) {
this.numBuckets = Optional.of(Objects.requireNonNull(numBuckets, "numBuckets is required"));
return this;
}
/**
* Integer number of buckets into which metrics are retained. Max 128.
*
* @param numBuckets the value of the <code>num_buckets</code> parameter as a {@link long}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder numBuckets(final Optional<Long> numBuckets) {
this.numBuckets = Objects.requireNonNull(numBuckets, "numBuckets is required");
return this;
}
/**
* Integer number of requests in a rolling window that will trip the circuit.
* Helpful if traffic volume is low.
*
* @param volumeThreshold the value of the <code>volume_threshold</code> parameter as a {@link long}
* @return this builder instance
*/
public Builder volumeThreshold(final long volumeThreshold) {
this.volumeThreshold = Optional.of(Objects.requireNonNull(volumeThreshold, "volumeThreshold is required"));
return this;
}
/**
* Integer number of requests in a rolling window that will trip the circuit.
* Helpful if traffic volume is low.
*
* @param volumeThreshold the value of the <code>volume_threshold</code> parameter as a {@link long}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder volumeThreshold(final Optional<Long> volumeThreshold) {
this.volumeThreshold = Objects.requireNonNull(volumeThreshold, "volumeThreshold is required");
return this;
}
/**
* Error threshold percentage should be between 0 - 1.0, not 0-100.0
*
* @param errorThresholdPercentage the value of the <code>error_threshold_percentage</code> parameter as a {@link double}
* @return this builder instance
*/
public Builder errorThresholdPercentage(final double errorThresholdPercentage) {
this.errorThresholdPercentage = Optional.of(Objects.requireNonNull(errorThresholdPercentage, "errorThresholdPercentage is required"));
return this;
}
/**
* Error threshold percentage should be between 0 - 1.0, not 0-100.0
*
* @param errorThresholdPercentage the value of the <code>error_threshold_percentage</code> parameter as a {@link double}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder errorThresholdPercentage(final Optional<Double> errorThresholdPercentage) {
this.errorThresholdPercentage = Objects.requireNonNull(errorThresholdPercentage, "errorThresholdPercentage is required");
return this;
}
/**
* Constructs the {@link EndpointCircuitBreaker} instance.
*
* @return a new {@link EndpointCircuitBreaker}
*/
public EndpointCircuitBreaker build() {
return new EndpointCircuitBreaker(
this.enabled,
this.trippedDuration.orElse(java.time.Duration.ZERO),
this.rollingWindow.orElse(0L),
this.numBuckets.orElse(0L),
this.volumeThreshold.orElse(0L),
this.errorThresholdPercentage.orElse(0.0d)
);
}
}
/**
* Creates a new builder for the {@link EndpointCircuitBreaker} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("tripped_duration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.Duration trippedDuration;
@JsonProperty("rolling_window")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long rollingWindow;
@JsonProperty("num_buckets")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long numBuckets;
@JsonProperty("volume_threshold")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long volumeThreshold;
@JsonProperty("error_threshold_percentage")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final double errorThresholdPercentage;
/**
@@ -36,13 +226,13 @@ public class EndpointCircuitBreaker {
* @param errorThresholdPercentage Error threshold percentage should be between 0 - 1.0, not 0-100.0
*/
@JsonCreator
public EndpointCircuitBreaker(
private EndpointCircuitBreaker(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("tripped_duration") final java.time.Duration trippedDuration,
@JsonProperty("rolling_window") final long rollingWindow,
@JsonProperty("num_buckets") final long numBuckets,
@JsonProperty("volume_threshold") final long volumeThreshold,
@JsonProperty("error_threshold_percentage") final double errorThresholdPercentage
@JsonProperty("rolling_window") final Long rollingWindow,
@JsonProperty("num_buckets") final Long numBuckets,
@JsonProperty("volume_threshold") final Long volumeThreshold,
@JsonProperty("error_threshold_percentage") final Double errorThresholdPercentage
) {
this.enabled = enabled != null ? enabled : Optional.empty();
this.trippedDuration = Objects.requireNonNull(trippedDuration, "trippedDuration is required");
@@ -2,6 +2,7 @@ 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;
@@ -12,7 +13,65 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointCompression {
/**
* Builder class for {@link EndpointCompression}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* Constructs the {@link EndpointCompression} instance.
*
* @return a new {@link EndpointCompression}
*/
public EndpointCompression build() {
return new EndpointCompression(
this.enabled
);
}
}
/**
* Creates a new builder for the {@link EndpointCompression} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
/**
@@ -21,7 +80,7 @@ public class EndpointCompression {
* @param enabled <code>true</code> if the module will be applied to traffic, <code>false</code> to disable. default <code>true</code> if unspecified
*/
@JsonCreator
public EndpointCompression(
private EndpointCompression(
@JsonProperty("enabled") final Optional<Boolean> enabled
) {
this.enabled = enabled != null ? enabled : Optional.empty();
@@ -2,6 +2,7 @@ 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;
@@ -13,40 +14,58 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointConfiguration {
@JsonProperty("id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String id;
@JsonProperty("type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String type;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("uri")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI uri;
@JsonProperty("circuit_breaker")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointCircuitBreaker> circuitBreaker;
@JsonProperty("compression")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointCompression> compression;
@JsonProperty("request_headers")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointRequestHeaders> requestHeaders;
@JsonProperty("response_headers")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointResponseHeaders> responseHeaders;
@JsonProperty("ip_policy")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointIpPolicy> ipPolicy;
@JsonProperty("mutual_tls")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointMutualTls> mutualTls;
@JsonProperty("tls_termination")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointTlsTermination> tlsTermination;
@JsonProperty("webhook_validation")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointWebhookValidation> webhookValidation;
@JsonProperty("oauth")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointOAuth> oauth;
@JsonProperty("logging")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointLogging> logging;
@JsonProperty("saml")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointSaml> saml;
@JsonProperty("oidc")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointOidc> oidc;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointConfigurationList implements Pageable {
@JsonProperty("endpoint_configurations")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<EndpointConfiguration> endpointConfigurations;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointIpPolicy {
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("ip_policies")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<Ref> ipPolicies;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,94 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointIpPolicyMutate {
/**
* Builder class for {@link EndpointIpPolicyMutate}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<java.util.List<String>> ipPolicyIds = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* list of all IP policies that will be used to check if a source IP is allowed
* access to the endpoint
*
* @param ipPolicyIds the value of the <code>ip_policy_ids</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder ipPolicyIds(final java.util.List<String> ipPolicyIds) {
this.ipPolicyIds = Optional.of(Objects.requireNonNull(ipPolicyIds, "ipPolicyIds is required"));
return this;
}
/**
* list of all IP policies that will be used to check if a source IP is allowed
* access to the endpoint
*
* @param ipPolicyIds the value of the <code>ip_policy_ids</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder ipPolicyIds(final Optional<java.util.List<String>> ipPolicyIds) {
this.ipPolicyIds = Objects.requireNonNull(ipPolicyIds, "ipPolicyIds is required");
return this;
}
/**
* Constructs the {@link EndpointIpPolicyMutate} instance.
*
* @return a new {@link EndpointIpPolicyMutate}
*/
public EndpointIpPolicyMutate build() {
return new EndpointIpPolicyMutate(
this.enabled,
this.ipPolicyIds.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointIpPolicyMutate} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("ip_policy_ids")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> ipPolicyIds;
/**
@@ -24,7 +110,7 @@ public class EndpointIpPolicyMutate {
* @param ipPolicyIds list of all IP policies that will be used to check if a source IP is allowed access to the endpoint
*/
@JsonCreator
public EndpointIpPolicyMutate(
private EndpointIpPolicyMutate(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("ip_policy_ids") final java.util.List<String> ipPolicyIds
) {
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointLogging {
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("event_streams")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<Ref> eventStreams;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,94 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointLoggingMutate {
/**
* Builder class for {@link EndpointLoggingMutate}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<java.util.List<String>> eventStreamIds = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* list of all EventStreams that will be used to configure and export this
* endpoint's logs
*
* @param eventStreamIds the value of the <code>event_stream_ids</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder eventStreamIds(final java.util.List<String> eventStreamIds) {
this.eventStreamIds = Optional.of(Objects.requireNonNull(eventStreamIds, "eventStreamIds is required"));
return this;
}
/**
* list of all EventStreams that will be used to configure and export this
* endpoint's logs
*
* @param eventStreamIds the value of the <code>event_stream_ids</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder eventStreamIds(final Optional<java.util.List<String>> eventStreamIds) {
this.eventStreamIds = Objects.requireNonNull(eventStreamIds, "eventStreamIds is required");
return this;
}
/**
* Constructs the {@link EndpointLoggingMutate} instance.
*
* @return a new {@link EndpointLoggingMutate}
*/
public EndpointLoggingMutate build() {
return new EndpointLoggingMutate(
this.enabled,
this.eventStreamIds.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointLoggingMutate} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("event_stream_ids")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> eventStreamIds;
/**
@@ -24,7 +110,7 @@ public class EndpointLoggingMutate {
* @param eventStreamIds list of all EventStreams that will be used to configure and export this endpoint's logs
*/
@JsonCreator
public EndpointLoggingMutate(
private EndpointLoggingMutate(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("event_stream_ids") final java.util.List<String> eventStreamIds
) {
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointMutualTls {
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("certificate_authorities")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<Ref> certificateAuthorities;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,94 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointMutualTlsMutate {
/**
* Builder class for {@link EndpointMutualTlsMutate}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<java.util.List<String>> certificateAuthorityIds = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* list of certificate authorities that will be used to validate the TLS client
* certificate presnted by the initiatiator of the TLS connection
*
* @param certificateAuthorityIds the value of the <code>certificate_authority_ids</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder certificateAuthorityIds(final java.util.List<String> certificateAuthorityIds) {
this.certificateAuthorityIds = Optional.of(Objects.requireNonNull(certificateAuthorityIds, "certificateAuthorityIds is required"));
return this;
}
/**
* list of certificate authorities that will be used to validate the TLS client
* certificate presnted by the initiatiator of the TLS connection
*
* @param certificateAuthorityIds the value of the <code>certificate_authority_ids</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder certificateAuthorityIds(final Optional<java.util.List<String>> certificateAuthorityIds) {
this.certificateAuthorityIds = Objects.requireNonNull(certificateAuthorityIds, "certificateAuthorityIds is required");
return this;
}
/**
* Constructs the {@link EndpointMutualTlsMutate} instance.
*
* @return a new {@link EndpointMutualTlsMutate}
*/
public EndpointMutualTlsMutate build() {
return new EndpointMutualTlsMutate(
this.enabled,
this.certificateAuthorityIds.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointMutualTlsMutate} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("certificate_authority_ids")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> certificateAuthorityIds;
/**
@@ -24,7 +110,7 @@ public class EndpointMutualTlsMutate {
* @param certificateAuthorityIds list of certificate authorities that will be used to validate the TLS client certificate presnted by the initiatiator of the TLS connection
*/
@JsonCreator
public EndpointMutualTlsMutate(
private EndpointMutualTlsMutate(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("certificate_authority_ids") final java.util.List<String> certificateAuthorityIds
) {
@@ -2,6 +2,7 @@ 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;
@@ -12,19 +13,247 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointOAuth {
/**
* Builder class for {@link EndpointOAuth}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<EndpointOAuthProvider> provider = Optional.empty();
private Optional<Boolean> optionsPassthrough = Optional.empty();
private Optional<String> cookiePrefix = Optional.empty();
private Optional<Long> inactivityTimeout = Optional.empty();
private Optional<java.time.Duration> maximumDuration = Optional.empty();
private Optional<Long> authCheckInterval = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* an object which defines the identity provider to use for authentication and
* configuration for who may access the endpoint
*
* @param provider the value of the <code>provider</code> parameter as a {@link EndpointOAuthProvider}
* @return this builder instance
*/
public Builder provider(final EndpointOAuthProvider provider) {
this.provider = Optional.of(Objects.requireNonNull(provider, "provider is required"));
return this;
}
/**
* an object which defines the identity provider to use for authentication and
* configuration for who may access the endpoint
*
* @param provider the value of the <code>provider</code> parameter as a {@link EndpointOAuthProvider}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder provider(final Optional<EndpointOAuthProvider> provider) {
this.provider = Objects.requireNonNull(provider, "provider is required");
return this;
}
/**
* Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
* supporting CORS.
*
* @param optionsPassthrough the value of the <code>options_passthrough</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder optionsPassthrough(final boolean optionsPassthrough) {
this.optionsPassthrough = Optional.of(Objects.requireNonNull(optionsPassthrough, "optionsPassthrough is required"));
return this;
}
/**
* Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
* supporting CORS.
*
* @param optionsPassthrough the value of the <code>options_passthrough</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder optionsPassthrough(final Optional<Boolean> optionsPassthrough) {
this.optionsPassthrough = Objects.requireNonNull(optionsPassthrough, "optionsPassthrough is required");
return this;
}
/**
* the prefix of the session cookie that ngrok sets on the http client to cache
* authentication. default is 'ngrok.'
*
* @param cookiePrefix the value of the <code>cookie_prefix</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder cookiePrefix(final String cookiePrefix) {
this.cookiePrefix = Optional.of(Objects.requireNonNull(cookiePrefix, "cookiePrefix is required"));
return this;
}
/**
* the prefix of the session cookie that ngrok sets on the http client to cache
* authentication. default is 'ngrok.'
*
* @param cookiePrefix the value of the <code>cookie_prefix</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder cookiePrefix(final Optional<String> cookiePrefix) {
this.cookiePrefix = Objects.requireNonNull(cookiePrefix, "cookiePrefix is required");
return this;
}
/**
* Integer number of seconds of inactivity after which if the user has not accessed
* the endpoint, their session will time out and they will be forced to
* reauthenticate.
*
* @param inactivityTimeout the value of the <code>inactivity_timeout</code> parameter as a {@link long}
* @return this builder instance
*/
public Builder inactivityTimeout(final long inactivityTimeout) {
this.inactivityTimeout = Optional.of(Objects.requireNonNull(inactivityTimeout, "inactivityTimeout is required"));
return this;
}
/**
* Integer number of seconds of inactivity after which if the user has not accessed
* the endpoint, their session will time out and they will be forced to
* reauthenticate.
*
* @param inactivityTimeout the value of the <code>inactivity_timeout</code> parameter as a {@link long}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder inactivityTimeout(final Optional<Long> inactivityTimeout) {
this.inactivityTimeout = Objects.requireNonNull(inactivityTimeout, "inactivityTimeout is required");
return this;
}
/**
* Integer number of seconds of the maximum duration of an authenticated session.
* After this period is exceeded, a user must reauthenticate.
*
* @param maximumDuration the value of the <code>maximum_duration</code> parameter as a {@link java.time.Duration}
* @return this builder instance
*/
public Builder maximumDuration(final java.time.Duration maximumDuration) {
this.maximumDuration = Optional.of(Objects.requireNonNull(maximumDuration, "maximumDuration is required"));
return this;
}
/**
* Integer number of seconds of the maximum duration of an authenticated session.
* After this period is exceeded, a user must reauthenticate.
*
* @param maximumDuration the value of the <code>maximum_duration</code> parameter as a {@link java.time.Duration}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder maximumDuration(final Optional<java.time.Duration> maximumDuration) {
this.maximumDuration = Objects.requireNonNull(maximumDuration, "maximumDuration is required");
return this;
}
/**
* Integer number of seconds after which ngrok guarantees it will refresh user
* state from the identity provider and recheck whether the user is still
* authorized to access the endpoint. This is the preferred tunable to use to
* enforce a minimum amount of time after which a revoked user will no longer be
* able to access the resource.
*
* @param authCheckInterval the value of the <code>auth_check_interval</code> parameter as a {@link long}
* @return this builder instance
*/
public Builder authCheckInterval(final long authCheckInterval) {
this.authCheckInterval = Optional.of(Objects.requireNonNull(authCheckInterval, "authCheckInterval is required"));
return this;
}
/**
* Integer number of seconds after which ngrok guarantees it will refresh user
* state from the identity provider and recheck whether the user is still
* authorized to access the endpoint. This is the preferred tunable to use to
* enforce a minimum amount of time after which a revoked user will no longer be
* able to access the resource.
*
* @param authCheckInterval the value of the <code>auth_check_interval</code> parameter as a {@link long}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder authCheckInterval(final Optional<Long> authCheckInterval) {
this.authCheckInterval = Objects.requireNonNull(authCheckInterval, "authCheckInterval is required");
return this;
}
/**
* Constructs the {@link EndpointOAuth} instance.
*
* @return a new {@link EndpointOAuth}
*/
public EndpointOAuth build() {
return new EndpointOAuth(
this.enabled,
this.provider.orElse(null),
this.optionsPassthrough.orElse(false),
this.cookiePrefix.orElse(""),
this.inactivityTimeout.orElse(0L),
this.maximumDuration.orElse(java.time.Duration.ZERO),
this.authCheckInterval.orElse(0L)
);
}
}
/**
* Creates a new builder for the {@link EndpointOAuth} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("provider")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final EndpointOAuthProvider provider;
@JsonProperty("options_passthrough")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final boolean optionsPassthrough;
@JsonProperty("cookie_prefix")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String cookiePrefix;
@JsonProperty("inactivity_timeout")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long inactivityTimeout;
@JsonProperty("maximum_duration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.Duration maximumDuration;
@JsonProperty("auth_check_interval")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long authCheckInterval;
/**
@@ -39,14 +268,14 @@ public class EndpointOAuth {
* @param authCheckInterval Integer number of seconds after which ngrok guarantees it will refresh user state from the identity provider and recheck whether the user is still authorized to access the endpoint. This is the preferred tunable to use to enforce a minimum amount of time after which a revoked user will no longer be able to access the resource.
*/
@JsonCreator
public EndpointOAuth(
private EndpointOAuth(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("provider") final EndpointOAuthProvider provider,
@JsonProperty("options_passthrough") final boolean optionsPassthrough,
@JsonProperty("options_passthrough") final Boolean optionsPassthrough,
@JsonProperty("cookie_prefix") final String cookiePrefix,
@JsonProperty("inactivity_timeout") final long inactivityTimeout,
@JsonProperty("inactivity_timeout") final Long inactivityTimeout,
@JsonProperty("maximum_duration") final java.time.Duration maximumDuration,
@JsonProperty("auth_check_interval") final long authCheckInterval
@JsonProperty("auth_check_interval") final Long authCheckInterval
) {
this.enabled = enabled != null ? enabled : Optional.empty();
this.provider = Objects.requireNonNull(provider, "provider is required");
@@ -2,6 +2,7 @@ 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;
@@ -12,15 +13,193 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointOAuthFacebook {
/**
* Builder class for {@link EndpointOAuthFacebook}.
*/
public static class Builder {
private Optional<String> clientId = Optional.empty();
private Optional<String> clientSecret = Optional.empty();
private Optional<java.util.List<String>> scopes = Optional.empty();
private Optional<java.util.List<String>> emailAddresses = Optional.empty();
private Optional<java.util.List<String>> emailDomains = Optional.empty();
private Builder(
) {
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientId(final String clientId) {
this.clientId = Optional.of(Objects.requireNonNull(clientId, "clientId is required"));
return this;
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientId(final Optional<String> clientId) {
this.clientId = Objects.requireNonNull(clientId, "clientId is required");
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientSecret(final String clientSecret) {
this.clientSecret = Optional.of(Objects.requireNonNull(clientSecret, "clientSecret is required"));
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientSecret(final Optional<String> clientSecret) {
this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret is required");
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder scopes(final java.util.List<String> scopes) {
this.scopes = Optional.of(Objects.requireNonNull(scopes, "scopes is required"));
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder scopes(final Optional<java.util.List<String>> scopes) {
this.scopes = Objects.requireNonNull(scopes, "scopes is required");
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailAddresses(final java.util.List<String> emailAddresses) {
this.emailAddresses = Optional.of(Objects.requireNonNull(emailAddresses, "emailAddresses is required"));
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailAddresses(final Optional<java.util.List<String>> emailAddresses) {
this.emailAddresses = Objects.requireNonNull(emailAddresses, "emailAddresses is required");
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailDomains(final java.util.List<String> emailDomains) {
this.emailDomains = Optional.of(Objects.requireNonNull(emailDomains, "emailDomains is required"));
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailDomains(final Optional<java.util.List<String>> emailDomains) {
this.emailDomains = Objects.requireNonNull(emailDomains, "emailDomains is required");
return this;
}
/**
* Constructs the {@link EndpointOAuthFacebook} instance.
*
* @return a new {@link EndpointOAuthFacebook}
*/
public EndpointOAuthFacebook build() {
return new EndpointOAuthFacebook(
this.clientId,
this.clientSecret,
this.scopes.orElse(java.util.Collections.emptyList()),
this.emailAddresses.orElse(java.util.Collections.emptyList()),
this.emailDomains.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointOAuthFacebook} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("client_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientId;
@JsonProperty("client_secret")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientSecret;
@JsonProperty("scopes")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> scopes;
@JsonProperty("email_addresses")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailAddresses;
@JsonProperty("email_domains")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailDomains;
/**
@@ -33,7 +212,7 @@ public class EndpointOAuthFacebook {
* @param emailDomains a list of email domains of users authenticated by identity provider who are allowed access to the endpoint
*/
@JsonCreator
public EndpointOAuthFacebook(
private EndpointOAuthFacebook(
@JsonProperty("client_id") final Optional<String> clientId,
@JsonProperty("client_secret") final Optional<String> clientSecret,
@JsonProperty("scopes") final java.util.List<String> scopes,
@@ -2,6 +2,7 @@ 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;
@@ -12,19 +13,255 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointOAuthGitHub {
/**
* Builder class for {@link EndpointOAuthGitHub}.
*/
public static class Builder {
private Optional<String> clientId = Optional.empty();
private Optional<String> clientSecret = Optional.empty();
private Optional<java.util.List<String>> scopes = Optional.empty();
private Optional<java.util.List<String>> emailAddresses = Optional.empty();
private Optional<java.util.List<String>> emailDomains = Optional.empty();
private Optional<java.util.List<String>> teams = Optional.empty();
private Optional<java.util.List<String>> organizations = Optional.empty();
private Builder(
) {
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientId(final String clientId) {
this.clientId = Optional.of(Objects.requireNonNull(clientId, "clientId is required"));
return this;
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientId(final Optional<String> clientId) {
this.clientId = Objects.requireNonNull(clientId, "clientId is required");
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientSecret(final String clientSecret) {
this.clientSecret = Optional.of(Objects.requireNonNull(clientSecret, "clientSecret is required"));
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientSecret(final Optional<String> clientSecret) {
this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret is required");
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder scopes(final java.util.List<String> scopes) {
this.scopes = Optional.of(Objects.requireNonNull(scopes, "scopes is required"));
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder scopes(final Optional<java.util.List<String>> scopes) {
this.scopes = Objects.requireNonNull(scopes, "scopes is required");
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailAddresses(final java.util.List<String> emailAddresses) {
this.emailAddresses = Optional.of(Objects.requireNonNull(emailAddresses, "emailAddresses is required"));
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailAddresses(final Optional<java.util.List<String>> emailAddresses) {
this.emailAddresses = Objects.requireNonNull(emailAddresses, "emailAddresses is required");
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailDomains(final java.util.List<String> emailDomains) {
this.emailDomains = Optional.of(Objects.requireNonNull(emailDomains, "emailDomains is required"));
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailDomains(final Optional<java.util.List<String>> emailDomains) {
this.emailDomains = Objects.requireNonNull(emailDomains, "emailDomains is required");
return this;
}
/**
* a list of github teams identifiers. users will be allowed access to the endpoint
* if they are a member of any of these teams. identifiers should be in the 'slug'
* format qualified with the org name, e.g. <code>org-name/team-name</code>
*
* @param teams the value of the <code>teams</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder teams(final java.util.List<String> teams) {
this.teams = Optional.of(Objects.requireNonNull(teams, "teams is required"));
return this;
}
/**
* a list of github teams identifiers. users will be allowed access to the endpoint
* if they are a member of any of these teams. identifiers should be in the 'slug'
* format qualified with the org name, e.g. <code>org-name/team-name</code>
*
* @param teams the value of the <code>teams</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder teams(final Optional<java.util.List<String>> teams) {
this.teams = Objects.requireNonNull(teams, "teams is required");
return this;
}
/**
* a list of github org identifiers. users who are members of any of the listed
* organizations will be allowed access. identifiers should be the organization's
* 'slug'
*
* @param organizations the value of the <code>organizations</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder organizations(final java.util.List<String> organizations) {
this.organizations = Optional.of(Objects.requireNonNull(organizations, "organizations is required"));
return this;
}
/**
* a list of github org identifiers. users who are members of any of the listed
* organizations will be allowed access. identifiers should be the organization's
* 'slug'
*
* @param organizations the value of the <code>organizations</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder organizations(final Optional<java.util.List<String>> organizations) {
this.organizations = Objects.requireNonNull(organizations, "organizations is required");
return this;
}
/**
* Constructs the {@link EndpointOAuthGitHub} instance.
*
* @return a new {@link EndpointOAuthGitHub}
*/
public EndpointOAuthGitHub build() {
return new EndpointOAuthGitHub(
this.clientId,
this.clientSecret,
this.scopes.orElse(java.util.Collections.emptyList()),
this.emailAddresses.orElse(java.util.Collections.emptyList()),
this.emailDomains.orElse(java.util.Collections.emptyList()),
this.teams.orElse(java.util.Collections.emptyList()),
this.organizations.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointOAuthGitHub} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("client_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientId;
@JsonProperty("client_secret")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientSecret;
@JsonProperty("scopes")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> scopes;
@JsonProperty("email_addresses")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailAddresses;
@JsonProperty("email_domains")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailDomains;
@JsonProperty("teams")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> teams;
@JsonProperty("organizations")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> organizations;
/**
@@ -39,7 +276,7 @@ public class EndpointOAuthGitHub {
* @param organizations a list of github org identifiers. users who are members of any of the listed organizations will be allowed access. identifiers should be the organization's 'slug'
*/
@JsonCreator
public EndpointOAuthGitHub(
private EndpointOAuthGitHub(
@JsonProperty("client_id") final Optional<String> clientId,
@JsonProperty("client_secret") final Optional<String> clientSecret,
@JsonProperty("scopes") final java.util.List<String> scopes,
@@ -2,6 +2,7 @@ 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;
@@ -12,15 +13,193 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointOAuthGoogle {
/**
* Builder class for {@link EndpointOAuthGoogle}.
*/
public static class Builder {
private Optional<String> clientId = Optional.empty();
private Optional<String> clientSecret = Optional.empty();
private Optional<java.util.List<String>> scopes = Optional.empty();
private Optional<java.util.List<String>> emailAddresses = Optional.empty();
private Optional<java.util.List<String>> emailDomains = Optional.empty();
private Builder(
) {
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientId(final String clientId) {
this.clientId = Optional.of(Objects.requireNonNull(clientId, "clientId is required"));
return this;
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientId(final Optional<String> clientId) {
this.clientId = Objects.requireNonNull(clientId, "clientId is required");
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientSecret(final String clientSecret) {
this.clientSecret = Optional.of(Objects.requireNonNull(clientSecret, "clientSecret is required"));
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientSecret(final Optional<String> clientSecret) {
this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret is required");
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder scopes(final java.util.List<String> scopes) {
this.scopes = Optional.of(Objects.requireNonNull(scopes, "scopes is required"));
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder scopes(final Optional<java.util.List<String>> scopes) {
this.scopes = Objects.requireNonNull(scopes, "scopes is required");
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailAddresses(final java.util.List<String> emailAddresses) {
this.emailAddresses = Optional.of(Objects.requireNonNull(emailAddresses, "emailAddresses is required"));
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailAddresses(final Optional<java.util.List<String>> emailAddresses) {
this.emailAddresses = Objects.requireNonNull(emailAddresses, "emailAddresses is required");
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailDomains(final java.util.List<String> emailDomains) {
this.emailDomains = Optional.of(Objects.requireNonNull(emailDomains, "emailDomains is required"));
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailDomains(final Optional<java.util.List<String>> emailDomains) {
this.emailDomains = Objects.requireNonNull(emailDomains, "emailDomains is required");
return this;
}
/**
* Constructs the {@link EndpointOAuthGoogle} instance.
*
* @return a new {@link EndpointOAuthGoogle}
*/
public EndpointOAuthGoogle build() {
return new EndpointOAuthGoogle(
this.clientId,
this.clientSecret,
this.scopes.orElse(java.util.Collections.emptyList()),
this.emailAddresses.orElse(java.util.Collections.emptyList()),
this.emailDomains.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointOAuthGoogle} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("client_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientId;
@JsonProperty("client_secret")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientSecret;
@JsonProperty("scopes")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> scopes;
@JsonProperty("email_addresses")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailAddresses;
@JsonProperty("email_domains")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailDomains;
/**
@@ -33,7 +212,7 @@ public class EndpointOAuthGoogle {
* @param emailDomains a list of email domains of users authenticated by identity provider who are allowed access to the endpoint
*/
@JsonCreator
public EndpointOAuthGoogle(
private EndpointOAuthGoogle(
@JsonProperty("client_id") final Optional<String> clientId,
@JsonProperty("client_secret") final Optional<String> clientSecret,
@JsonProperty("scopes") final java.util.List<String> scopes,
@@ -2,6 +2,7 @@ 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;
@@ -12,15 +13,193 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointOAuthMicrosoft {
/**
* Builder class for {@link EndpointOAuthMicrosoft}.
*/
public static class Builder {
private Optional<String> clientId = Optional.empty();
private Optional<String> clientSecret = Optional.empty();
private Optional<java.util.List<String>> scopes = Optional.empty();
private Optional<java.util.List<String>> emailAddresses = Optional.empty();
private Optional<java.util.List<String>> emailDomains = Optional.empty();
private Builder(
) {
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientId(final String clientId) {
this.clientId = Optional.of(Objects.requireNonNull(clientId, "clientId is required"));
return this;
}
/**
* the OAuth app client ID. retrieve it from the identity provider's dashboard
* where you created your own OAuth app. optional. if unspecified, ngrok will use
* its own managed oauth application which has additional restrictions. see the
* OAuth module docs for more details. if present, client_secret must be present as
* well.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientId(final Optional<String> clientId) {
this.clientId = Objects.requireNonNull(clientId, "clientId is required");
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientSecret(final String clientSecret) {
this.clientSecret = Optional.of(Objects.requireNonNull(clientSecret, "clientSecret is required"));
return this;
}
/**
* the OAuth app client secret. retrieve if from the identity provider's dashboard
* where you created your own OAuth app. optional, see all of the caveats in the
* docs for <code>client_id</code>.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientSecret(final Optional<String> clientSecret) {
this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret is required");
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder scopes(final java.util.List<String> scopes) {
this.scopes = Optional.of(Objects.requireNonNull(scopes, "scopes is required"));
return this;
}
/**
* a list of provider-specific OAuth scopes with the permissions your OAuth app
* would like to ask for. these may not be set if you are using the ngrok-managed
* oauth app (i.e. you must pass both <code>client_id</code> and
* <code>client_secret</code> to set scopes)
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder scopes(final Optional<java.util.List<String>> scopes) {
this.scopes = Objects.requireNonNull(scopes, "scopes is required");
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailAddresses(final java.util.List<String> emailAddresses) {
this.emailAddresses = Optional.of(Objects.requireNonNull(emailAddresses, "emailAddresses is required"));
return this;
}
/**
* a list of email addresses of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailAddresses the value of the <code>email_addresses</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailAddresses(final Optional<java.util.List<String>> emailAddresses) {
this.emailAddresses = Objects.requireNonNull(emailAddresses, "emailAddresses is required");
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder emailDomains(final java.util.List<String> emailDomains) {
this.emailDomains = Optional.of(Objects.requireNonNull(emailDomains, "emailDomains is required"));
return this;
}
/**
* a list of email domains of users authenticated by identity provider who are
* allowed access to the endpoint
*
* @param emailDomains the value of the <code>email_domains</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder emailDomains(final Optional<java.util.List<String>> emailDomains) {
this.emailDomains = Objects.requireNonNull(emailDomains, "emailDomains is required");
return this;
}
/**
* Constructs the {@link EndpointOAuthMicrosoft} instance.
*
* @return a new {@link EndpointOAuthMicrosoft}
*/
public EndpointOAuthMicrosoft build() {
return new EndpointOAuthMicrosoft(
this.clientId,
this.clientSecret,
this.scopes.orElse(java.util.Collections.emptyList()),
this.emailAddresses.orElse(java.util.Collections.emptyList()),
this.emailDomains.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointOAuthMicrosoft} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("client_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientId;
@JsonProperty("client_secret")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> clientSecret;
@JsonProperty("scopes")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> scopes;
@JsonProperty("email_addresses")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailAddresses;
@JsonProperty("email_domains")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> emailDomains;
/**
@@ -33,7 +212,7 @@ public class EndpointOAuthMicrosoft {
* @param emailDomains a list of email domains of users authenticated by identity provider who are allowed access to the endpoint
*/
@JsonCreator
public EndpointOAuthMicrosoft(
private EndpointOAuthMicrosoft(
@JsonProperty("client_id") final Optional<String> clientId,
@JsonProperty("client_secret") final Optional<String> clientSecret,
@JsonProperty("scopes") final java.util.List<String> scopes,
@@ -2,6 +2,7 @@ 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;
@@ -12,13 +13,144 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointOAuthProvider {
/**
* Builder class for {@link EndpointOAuthProvider}.
*/
public static class Builder {
private Optional<EndpointOAuthGitHub> github = Optional.empty();
private Optional<EndpointOAuthFacebook> facebook = Optional.empty();
private Optional<EndpointOAuthMicrosoft> microsoft = Optional.empty();
private Optional<EndpointOAuthGoogle> google = Optional.empty();
private Builder(
) {
}
/**
* configuration for using github as the identity provider
*
* @param github the value of the <code>github</code> parameter as a {@link EndpointOAuthGitHub}
* @return this builder instance
*/
public Builder github(final EndpointOAuthGitHub github) {
this.github = Optional.of(Objects.requireNonNull(github, "github is required"));
return this;
}
/**
* configuration for using github as the identity provider
*
* @param github the value of the <code>github</code> parameter as a {@link EndpointOAuthGitHub}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder github(final Optional<EndpointOAuthGitHub> github) {
this.github = Objects.requireNonNull(github, "github is required");
return this;
}
/**
* configuration for using facebook as the identity provider
*
* @param facebook the value of the <code>facebook</code> parameter as a {@link EndpointOAuthFacebook}
* @return this builder instance
*/
public Builder facebook(final EndpointOAuthFacebook facebook) {
this.facebook = Optional.of(Objects.requireNonNull(facebook, "facebook is required"));
return this;
}
/**
* configuration for using facebook as the identity provider
*
* @param facebook the value of the <code>facebook</code> parameter as a {@link EndpointOAuthFacebook}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder facebook(final Optional<EndpointOAuthFacebook> facebook) {
this.facebook = Objects.requireNonNull(facebook, "facebook is required");
return this;
}
/**
* configuration for using microsoft as the identity provider
*
* @param microsoft the value of the <code>microsoft</code> parameter as a {@link EndpointOAuthMicrosoft}
* @return this builder instance
*/
public Builder microsoft(final EndpointOAuthMicrosoft microsoft) {
this.microsoft = Optional.of(Objects.requireNonNull(microsoft, "microsoft is required"));
return this;
}
/**
* configuration for using microsoft as the identity provider
*
* @param microsoft the value of the <code>microsoft</code> parameter as a {@link EndpointOAuthMicrosoft}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder microsoft(final Optional<EndpointOAuthMicrosoft> microsoft) {
this.microsoft = Objects.requireNonNull(microsoft, "microsoft is required");
return this;
}
/**
* configuration for using google as the identity provider
*
* @param google the value of the <code>google</code> parameter as a {@link EndpointOAuthGoogle}
* @return this builder instance
*/
public Builder google(final EndpointOAuthGoogle google) {
this.google = Optional.of(Objects.requireNonNull(google, "google is required"));
return this;
}
/**
* configuration for using google as the identity provider
*
* @param google the value of the <code>google</code> parameter as a {@link EndpointOAuthGoogle}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder google(final Optional<EndpointOAuthGoogle> google) {
this.google = Objects.requireNonNull(google, "google is required");
return this;
}
/**
* Constructs the {@link EndpointOAuthProvider} instance.
*
* @return a new {@link EndpointOAuthProvider}
*/
public EndpointOAuthProvider build() {
return new EndpointOAuthProvider(
this.github,
this.facebook,
this.microsoft,
this.google
);
}
}
/**
* Creates a new builder for the {@link EndpointOAuthProvider} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("github")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointOAuthGitHub> github;
@JsonProperty("facebook")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointOAuthFacebook> facebook;
@JsonProperty("microsoft")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointOAuthMicrosoft> microsoft;
@JsonProperty("google")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EndpointOAuthGoogle> google;
/**
@@ -30,7 +162,7 @@ public class EndpointOAuthProvider {
* @param google configuration for using google as the identity provider
*/
@JsonCreator
public EndpointOAuthProvider(
private EndpointOAuthProvider(
@JsonProperty("github") final Optional<EndpointOAuthGitHub> github,
@JsonProperty("facebook") final Optional<EndpointOAuthFacebook> facebook,
@JsonProperty("microsoft") final Optional<EndpointOAuthMicrosoft> microsoft,
@@ -2,6 +2,7 @@ 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;
@@ -12,23 +13,291 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointOidc {
/**
* Builder class for {@link EndpointOidc}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<Boolean> optionsPassthrough = Optional.empty();
private Optional<String> cookiePrefix = Optional.empty();
private Optional<Long> inactivityTimeout = Optional.empty();
private Optional<java.time.Duration> maximumDuration = Optional.empty();
private Optional<String> issuer = Optional.empty();
private Optional<String> clientId = Optional.empty();
private Optional<String> clientSecret = Optional.empty();
private Optional<java.util.List<String>> scopes = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
* supporting CORS.
*
* @param optionsPassthrough the value of the <code>options_passthrough</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder optionsPassthrough(final boolean optionsPassthrough) {
this.optionsPassthrough = Optional.of(Objects.requireNonNull(optionsPassthrough, "optionsPassthrough is required"));
return this;
}
/**
* Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
* supporting CORS.
*
* @param optionsPassthrough the value of the <code>options_passthrough</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder optionsPassthrough(final Optional<Boolean> optionsPassthrough) {
this.optionsPassthrough = Objects.requireNonNull(optionsPassthrough, "optionsPassthrough is required");
return this;
}
/**
* the prefix of the session cookie that ngrok sets on the http client to cache
* authentication. default is 'ngrok.'
*
* @param cookiePrefix the value of the <code>cookie_prefix</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder cookiePrefix(final String cookiePrefix) {
this.cookiePrefix = Optional.of(Objects.requireNonNull(cookiePrefix, "cookiePrefix is required"));
return this;
}
/**
* the prefix of the session cookie that ngrok sets on the http client to cache
* authentication. default is 'ngrok.'
*
* @param cookiePrefix the value of the <code>cookie_prefix</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder cookiePrefix(final Optional<String> cookiePrefix) {
this.cookiePrefix = Objects.requireNonNull(cookiePrefix, "cookiePrefix is required");
return this;
}
/**
* Integer number of seconds of inactivity after which if the user has not accessed
* the endpoint, their session will time out and they will be forced to
* reauthenticate.
*
* @param inactivityTimeout the value of the <code>inactivity_timeout</code> parameter as a {@link long}
* @return this builder instance
*/
public Builder inactivityTimeout(final long inactivityTimeout) {
this.inactivityTimeout = Optional.of(Objects.requireNonNull(inactivityTimeout, "inactivityTimeout is required"));
return this;
}
/**
* Integer number of seconds of inactivity after which if the user has not accessed
* the endpoint, their session will time out and they will be forced to
* reauthenticate.
*
* @param inactivityTimeout the value of the <code>inactivity_timeout</code> parameter as a {@link long}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder inactivityTimeout(final Optional<Long> inactivityTimeout) {
this.inactivityTimeout = Objects.requireNonNull(inactivityTimeout, "inactivityTimeout is required");
return this;
}
/**
* Integer number of seconds of the maximum duration of an authenticated session.
* After this period is exceeded, a user must reauthenticate.
*
* @param maximumDuration the value of the <code>maximum_duration</code> parameter as a {@link java.time.Duration}
* @return this builder instance
*/
public Builder maximumDuration(final java.time.Duration maximumDuration) {
this.maximumDuration = Optional.of(Objects.requireNonNull(maximumDuration, "maximumDuration is required"));
return this;
}
/**
* Integer number of seconds of the maximum duration of an authenticated session.
* After this period is exceeded, a user must reauthenticate.
*
* @param maximumDuration the value of the <code>maximum_duration</code> parameter as a {@link java.time.Duration}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder maximumDuration(final Optional<java.time.Duration> maximumDuration) {
this.maximumDuration = Objects.requireNonNull(maximumDuration, "maximumDuration is required");
return this;
}
/**
* URL of the OIDC "OpenID provider". This is the base URL used for discovery.
*
* @param issuer the value of the <code>issuer</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder issuer(final String issuer) {
this.issuer = Optional.of(Objects.requireNonNull(issuer, "issuer is required"));
return this;
}
/**
* URL of the OIDC "OpenID provider". This is the base URL used for discovery.
*
* @param issuer the value of the <code>issuer</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder issuer(final Optional<String> issuer) {
this.issuer = Objects.requireNonNull(issuer, "issuer is required");
return this;
}
/**
* The OIDC app's client ID and OIDC audience.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientId(final String clientId) {
this.clientId = Optional.of(Objects.requireNonNull(clientId, "clientId is required"));
return this;
}
/**
* The OIDC app's client ID and OIDC audience.
*
* @param clientId the value of the <code>client_id</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientId(final Optional<String> clientId) {
this.clientId = Objects.requireNonNull(clientId, "clientId is required");
return this;
}
/**
* The OIDC app's client secret.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder clientSecret(final String clientSecret) {
this.clientSecret = Optional.of(Objects.requireNonNull(clientSecret, "clientSecret is required"));
return this;
}
/**
* The OIDC app's client secret.
*
* @param clientSecret the value of the <code>client_secret</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder clientSecret(final Optional<String> clientSecret) {
this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret is required");
return this;
}
/**
* The set of scopes to request from the OIDC identity provider.
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder scopes(final java.util.List<String> scopes) {
this.scopes = Optional.of(Objects.requireNonNull(scopes, "scopes is required"));
return this;
}
/**
* The set of scopes to request from the OIDC identity provider.
*
* @param scopes the value of the <code>scopes</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder scopes(final Optional<java.util.List<String>> scopes) {
this.scopes = Objects.requireNonNull(scopes, "scopes is required");
return this;
}
/**
* Constructs the {@link EndpointOidc} instance.
*
* @return a new {@link EndpointOidc}
*/
public EndpointOidc build() {
return new EndpointOidc(
this.enabled,
this.optionsPassthrough.orElse(false),
this.cookiePrefix.orElse(""),
this.inactivityTimeout.orElse(0L),
this.maximumDuration.orElse(java.time.Duration.ZERO),
this.issuer.orElse(""),
this.clientId.orElse(""),
this.clientSecret.orElse(""),
this.scopes.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointOidc} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("options_passthrough")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final boolean optionsPassthrough;
@JsonProperty("cookie_prefix")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String cookiePrefix;
@JsonProperty("inactivity_timeout")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long inactivityTimeout;
@JsonProperty("maximum_duration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.Duration maximumDuration;
@JsonProperty("issuer")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String issuer;
@JsonProperty("client_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String clientId;
@JsonProperty("client_secret")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String clientSecret;
@JsonProperty("scopes")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> scopes;
/**
@@ -45,11 +314,11 @@ public class EndpointOidc {
* @param scopes The set of scopes to request from the OIDC identity provider.
*/
@JsonCreator
public EndpointOidc(
private EndpointOidc(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("options_passthrough") final boolean optionsPassthrough,
@JsonProperty("options_passthrough") final Boolean optionsPassthrough,
@JsonProperty("cookie_prefix") final String cookiePrefix,
@JsonProperty("inactivity_timeout") final long inactivityTimeout,
@JsonProperty("inactivity_timeout") final Long inactivityTimeout,
@JsonProperty("maximum_duration") final java.time.Duration maximumDuration,
@JsonProperty("issuer") final String issuer,
@JsonProperty("client_id") final String clientId,
@@ -2,6 +2,7 @@ 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;
@@ -12,11 +13,123 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointRequestHeaders {
/**
* Builder class for {@link EndpointRequestHeaders}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<java.util.Map<String, String>> add = Optional.empty();
private Optional<java.util.List<String>> remove = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* a map of header key to header value that will be injected into the HTTP Request
* before being sent to the upstream application server
*
* @param add the value of the <code>add</code> parameter as a {@link java.util.Map<String, String>}
* @return this builder instance
*/
public Builder add(final java.util.Map<String, String> add) {
this.add = Optional.of(Objects.requireNonNull(add, "add is required"));
return this;
}
/**
* a map of header key to header value that will be injected into the HTTP Request
* before being sent to the upstream application server
*
* @param add the value of the <code>add</code> parameter as a {@link java.util.Map<String, String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder add(final Optional<java.util.Map<String, String>> add) {
this.add = Objects.requireNonNull(add, "add is required");
return this;
}
/**
* a list of header names that will be removed from the HTTP Request before being
* sent to the upstream application server
*
* @param remove the value of the <code>remove</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder remove(final java.util.List<String> remove) {
this.remove = Optional.of(Objects.requireNonNull(remove, "remove is required"));
return this;
}
/**
* a list of header names that will be removed from the HTTP Request before being
* sent to the upstream application server
*
* @param remove the value of the <code>remove</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder remove(final Optional<java.util.List<String>> remove) {
this.remove = Objects.requireNonNull(remove, "remove is required");
return this;
}
/**
* Constructs the {@link EndpointRequestHeaders} instance.
*
* @return a new {@link EndpointRequestHeaders}
*/
public EndpointRequestHeaders build() {
return new EndpointRequestHeaders(
this.enabled,
this.add.orElse(java.util.Collections.emptyMap()),
this.remove.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointRequestHeaders} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("add")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.Map<String, String> add;
@JsonProperty("remove")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> remove;
/**
@@ -27,7 +140,7 @@ public class EndpointRequestHeaders {
* @param remove a list of header names that will be removed from the HTTP Request before being sent to the upstream application server
*/
@JsonCreator
public EndpointRequestHeaders(
private EndpointRequestHeaders(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("add") final java.util.Map<String, String> add,
@JsonProperty("remove") final java.util.List<String> remove
@@ -2,6 +2,7 @@ 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;
@@ -12,11 +13,123 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointResponseHeaders {
/**
* Builder class for {@link EndpointResponseHeaders}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<java.util.Map<String, String>> add = Optional.empty();
private Optional<java.util.List<String>> remove = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* a map of header key to header value that will be injected into the HTTP Response
* returned to the HTTP client
*
* @param add the value of the <code>add</code> parameter as a {@link java.util.Map<String, String>}
* @return this builder instance
*/
public Builder add(final java.util.Map<String, String> add) {
this.add = Optional.of(Objects.requireNonNull(add, "add is required"));
return this;
}
/**
* a map of header key to header value that will be injected into the HTTP Response
* returned to the HTTP client
*
* @param add the value of the <code>add</code> parameter as a {@link java.util.Map<String, String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder add(final Optional<java.util.Map<String, String>> add) {
this.add = Objects.requireNonNull(add, "add is required");
return this;
}
/**
* a list of header names that will be removed from the HTTP Response returned to
* the HTTP client
*
* @param remove the value of the <code>remove</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder remove(final java.util.List<String> remove) {
this.remove = Optional.of(Objects.requireNonNull(remove, "remove is required"));
return this;
}
/**
* a list of header names that will be removed from the HTTP Response returned to
* the HTTP client
*
* @param remove the value of the <code>remove</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder remove(final Optional<java.util.List<String>> remove) {
this.remove = Objects.requireNonNull(remove, "remove is required");
return this;
}
/**
* Constructs the {@link EndpointResponseHeaders} instance.
*
* @return a new {@link EndpointResponseHeaders}
*/
public EndpointResponseHeaders build() {
return new EndpointResponseHeaders(
this.enabled,
this.add.orElse(java.util.Collections.emptyMap()),
this.remove.orElse(java.util.Collections.emptyList())
);
}
}
/**
* Creates a new builder for the {@link EndpointResponseHeaders} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("add")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.Map<String, String> add;
@JsonProperty("remove")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> remove;
/**
@@ -27,7 +140,7 @@ public class EndpointResponseHeaders {
* @param remove a list of header names that will be removed from the HTTP Response returned to the HTTP client
*/
@JsonCreator
public EndpointResponseHeaders(
private EndpointResponseHeaders(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("add") final java.util.Map<String, String> add,
@JsonProperty("remove") final java.util.List<String> remove
@@ -2,6 +2,7 @@ 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;
@@ -13,34 +14,49 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointSaml {
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("options_passthrough")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final boolean optionsPassthrough;
@JsonProperty("cookie_prefix")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String cookiePrefix;
@JsonProperty("inactivity_timeout")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long inactivityTimeout;
@JsonProperty("maximum_duration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.Duration maximumDuration;
@JsonProperty("idp_metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String idpMetadata;
@JsonProperty("force_authn")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final boolean forceAuthn;
@JsonProperty("allow_idp_initiated")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> allowIdpInitiated;
@JsonProperty("authorized_groups")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> authorizedGroups;
@JsonProperty("entity_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String entityId;
@JsonProperty("assertion_consumer_service_url")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI assertionConsumerServiceUrl;
@JsonProperty("single_logout_url")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI singleLogoutUrl;
@JsonProperty("request_signing_certificate_pem")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String requestSigningCertificatePem;
@JsonProperty("metadata_url")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI metadataUrl;
@JsonProperty("nameid_format")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String nameidFormat;
/**
@@ -65,12 +81,12 @@ public class EndpointSaml {
@JsonCreator
public EndpointSaml(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("options_passthrough") final boolean optionsPassthrough,
@JsonProperty("options_passthrough") final Boolean optionsPassthrough,
@JsonProperty("cookie_prefix") final String cookiePrefix,
@JsonProperty("inactivity_timeout") final long inactivityTimeout,
@JsonProperty("inactivity_timeout") final Long inactivityTimeout,
@JsonProperty("maximum_duration") final java.time.Duration maximumDuration,
@JsonProperty("idp_metadata") final String idpMetadata,
@JsonProperty("force_authn") final boolean forceAuthn,
@JsonProperty("force_authn") final Boolean forceAuthn,
@JsonProperty("allow_idp_initiated") final Optional<Boolean> allowIdpInitiated,
@JsonProperty("authorized_groups") final java.util.List<String> authorizedGroups,
@JsonProperty("entity_id") final String entityId,
@@ -2,6 +2,7 @@ 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;
@@ -12,25 +13,340 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointSamlMutate {
/**
* Builder class for {@link EndpointSamlMutate}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<Boolean> optionsPassthrough = Optional.empty();
private Optional<String> cookiePrefix = Optional.empty();
private Optional<Long> inactivityTimeout = Optional.empty();
private Optional<java.time.Duration> maximumDuration = Optional.empty();
private Optional<String> idpMetadata = Optional.empty();
private Optional<Boolean> forceAuthn = Optional.empty();
private Optional<Boolean> allowIdpInitiated = Optional.empty();
private Optional<java.util.List<String>> authorizedGroups = Optional.empty();
private Optional<String> nameidFormat = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
* supporting CORS.
*
* @param optionsPassthrough the value of the <code>options_passthrough</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder optionsPassthrough(final boolean optionsPassthrough) {
this.optionsPassthrough = Optional.of(Objects.requireNonNull(optionsPassthrough, "optionsPassthrough is required"));
return this;
}
/**
* Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
* supporting CORS.
*
* @param optionsPassthrough the value of the <code>options_passthrough</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder optionsPassthrough(final Optional<Boolean> optionsPassthrough) {
this.optionsPassthrough = Objects.requireNonNull(optionsPassthrough, "optionsPassthrough is required");
return this;
}
/**
* the prefix of the session cookie that ngrok sets on the http client to cache
* authentication. default is 'ngrok.'
*
* @param cookiePrefix the value of the <code>cookie_prefix</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder cookiePrefix(final String cookiePrefix) {
this.cookiePrefix = Optional.of(Objects.requireNonNull(cookiePrefix, "cookiePrefix is required"));
return this;
}
/**
* the prefix of the session cookie that ngrok sets on the http client to cache
* authentication. default is 'ngrok.'
*
* @param cookiePrefix the value of the <code>cookie_prefix</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder cookiePrefix(final Optional<String> cookiePrefix) {
this.cookiePrefix = Objects.requireNonNull(cookiePrefix, "cookiePrefix is required");
return this;
}
/**
* Integer number of seconds of inactivity after which if the user has not accessed
* the endpoint, their session will time out and they will be forced to
* reauthenticate.
*
* @param inactivityTimeout the value of the <code>inactivity_timeout</code> parameter as a {@link long}
* @return this builder instance
*/
public Builder inactivityTimeout(final long inactivityTimeout) {
this.inactivityTimeout = Optional.of(Objects.requireNonNull(inactivityTimeout, "inactivityTimeout is required"));
return this;
}
/**
* Integer number of seconds of inactivity after which if the user has not accessed
* the endpoint, their session will time out and they will be forced to
* reauthenticate.
*
* @param inactivityTimeout the value of the <code>inactivity_timeout</code> parameter as a {@link long}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder inactivityTimeout(final Optional<Long> inactivityTimeout) {
this.inactivityTimeout = Objects.requireNonNull(inactivityTimeout, "inactivityTimeout is required");
return this;
}
/**
* Integer number of seconds of the maximum duration of an authenticated session.
* After this period is exceeded, a user must reauthenticate.
*
* @param maximumDuration the value of the <code>maximum_duration</code> parameter as a {@link java.time.Duration}
* @return this builder instance
*/
public Builder maximumDuration(final java.time.Duration maximumDuration) {
this.maximumDuration = Optional.of(Objects.requireNonNull(maximumDuration, "maximumDuration is required"));
return this;
}
/**
* Integer number of seconds of the maximum duration of an authenticated session.
* After this period is exceeded, a user must reauthenticate.
*
* @param maximumDuration the value of the <code>maximum_duration</code> parameter as a {@link java.time.Duration}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder maximumDuration(final Optional<java.time.Duration> maximumDuration) {
this.maximumDuration = Objects.requireNonNull(maximumDuration, "maximumDuration is required");
return this;
}
/**
* The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
* to download or as a URL.
*
* @param idpMetadata the value of the <code>idp_metadata</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder idpMetadata(final String idpMetadata) {
this.idpMetadata = Optional.of(Objects.requireNonNull(idpMetadata, "idpMetadata is required"));
return this;
}
/**
* The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
* to download or as a URL.
*
* @param idpMetadata the value of the <code>idp_metadata</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder idpMetadata(final Optional<String> idpMetadata) {
this.idpMetadata = Objects.requireNonNull(idpMetadata, "idpMetadata is required");
return this;
}
/**
* If true, indicates that whenever we redirect a user to the IdP for
* authentication that the IdP must prompt the user for authentication credentials
* even if the user already has a valid session with the IdP.
*
* @param forceAuthn the value of the <code>force_authn</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder forceAuthn(final boolean forceAuthn) {
this.forceAuthn = Optional.of(Objects.requireNonNull(forceAuthn, "forceAuthn is required"));
return this;
}
/**
* If true, indicates that whenever we redirect a user to the IdP for
* authentication that the IdP must prompt the user for authentication credentials
* even if the user already has a valid session with the IdP.
*
* @param forceAuthn the value of the <code>force_authn</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder forceAuthn(final Optional<Boolean> forceAuthn) {
this.forceAuthn = Objects.requireNonNull(forceAuthn, "forceAuthn is required");
return this;
}
/**
* If true, the IdP may initiate a login directly (e.g. the user does not need to
* visit the endpoint first and then be redirected). The IdP should set the
* <code>RelayState</code> parameter to the target URL of the resource they want
* the user to be redirected to after the SAML login assertion has been processed.
*
* @param allowIdpInitiated the value of the <code>allow_idp_initiated</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder allowIdpInitiated(final boolean allowIdpInitiated) {
this.allowIdpInitiated = Optional.of(Objects.requireNonNull(allowIdpInitiated, "allowIdpInitiated is required"));
return this;
}
/**
* If true, the IdP may initiate a login directly (e.g. the user does not need to
* visit the endpoint first and then be redirected). The IdP should set the
* <code>RelayState</code> parameter to the target URL of the resource they want
* the user to be redirected to after the SAML login assertion has been processed.
*
* @param allowIdpInitiated the value of the <code>allow_idp_initiated</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder allowIdpInitiated(final Optional<Boolean> allowIdpInitiated) {
this.allowIdpInitiated = Objects.requireNonNull(allowIdpInitiated, "allowIdpInitiated is required");
return this;
}
/**
* If present, only users who are a member of one of the listed groups may access
* the target endpoint.
*
* @param authorizedGroups the value of the <code>authorized_groups</code> parameter as a {@link java.util.List<String>}
* @return this builder instance
*/
public Builder authorizedGroups(final java.util.List<String> authorizedGroups) {
this.authorizedGroups = Optional.of(Objects.requireNonNull(authorizedGroups, "authorizedGroups is required"));
return this;
}
/**
* If present, only users who are a member of one of the listed groups may access
* the target endpoint.
*
* @param authorizedGroups the value of the <code>authorized_groups</code> parameter as a {@link java.util.List<String>}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder authorizedGroups(final Optional<java.util.List<String>> authorizedGroups) {
this.authorizedGroups = Objects.requireNonNull(authorizedGroups, "authorizedGroups is required");
return this;
}
/**
* Defines the name identifier format the SP expects the IdP to use in its
* assertions to identify subjects. If unspecified, a default value of
* <code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code> will be used.
* A subset of the allowed values enumerated by the SAML specification are
* supported.
*
* @param nameidFormat the value of the <code>nameid_format</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder nameidFormat(final String nameidFormat) {
this.nameidFormat = Optional.of(Objects.requireNonNull(nameidFormat, "nameidFormat is required"));
return this;
}
/**
* Defines the name identifier format the SP expects the IdP to use in its
* assertions to identify subjects. If unspecified, a default value of
* <code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code> will be used.
* A subset of the allowed values enumerated by the SAML specification are
* supported.
*
* @param nameidFormat the value of the <code>nameid_format</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder nameidFormat(final Optional<String> nameidFormat) {
this.nameidFormat = Objects.requireNonNull(nameidFormat, "nameidFormat is required");
return this;
}
/**
* Constructs the {@link EndpointSamlMutate} instance.
*
* @return a new {@link EndpointSamlMutate}
*/
public EndpointSamlMutate build() {
return new EndpointSamlMutate(
this.enabled,
this.optionsPassthrough.orElse(false),
this.cookiePrefix.orElse(""),
this.inactivityTimeout.orElse(0L),
this.maximumDuration.orElse(java.time.Duration.ZERO),
this.idpMetadata.orElse(""),
this.forceAuthn.orElse(false),
this.allowIdpInitiated,
this.authorizedGroups.orElse(java.util.Collections.emptyList()),
this.nameidFormat.orElse("")
);
}
}
/**
* Creates a new builder for the {@link EndpointSamlMutate} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("options_passthrough")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final boolean optionsPassthrough;
@JsonProperty("cookie_prefix")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String cookiePrefix;
@JsonProperty("inactivity_timeout")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final long inactivityTimeout;
@JsonProperty("maximum_duration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.Duration maximumDuration;
@JsonProperty("idp_metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String idpMetadata;
@JsonProperty("force_authn")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final boolean forceAuthn;
@JsonProperty("allow_idp_initiated")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> allowIdpInitiated;
@JsonProperty("authorized_groups")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> authorizedGroups;
@JsonProperty("nameid_format")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String nameidFormat;
/**
@@ -48,14 +364,14 @@ public class EndpointSamlMutate {
* @param nameidFormat Defines the name identifier format the SP expects the IdP to use in its assertions to identify subjects. If unspecified, a default value of <code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code> will be used. A subset of the allowed values enumerated by the SAML specification are supported.
*/
@JsonCreator
public EndpointSamlMutate(
private EndpointSamlMutate(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("options_passthrough") final boolean optionsPassthrough,
@JsonProperty("options_passthrough") final Boolean optionsPassthrough,
@JsonProperty("cookie_prefix") final String cookiePrefix,
@JsonProperty("inactivity_timeout") final long inactivityTimeout,
@JsonProperty("inactivity_timeout") final Long inactivityTimeout,
@JsonProperty("maximum_duration") final java.time.Duration maximumDuration,
@JsonProperty("idp_metadata") final String idpMetadata,
@JsonProperty("force_authn") final boolean forceAuthn,
@JsonProperty("force_authn") final Boolean forceAuthn,
@JsonProperty("allow_idp_initiated") final Optional<Boolean> allowIdpInitiated,
@JsonProperty("authorized_groups") final java.util.List<String> authorizedGroups,
@JsonProperty("nameid_format") final String nameidFormat
@@ -2,6 +2,7 @@ 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;
@@ -12,11 +13,133 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointTlsTermination {
/**
* Builder class for {@link EndpointTlsTermination}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<String> terminateAt = Optional.empty();
private Optional<String> minVersion = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* <code>edge</code> if the ngrok edge should terminate TLS traffic,
* <code>upstream</code> if TLS traffic should be passed through to the upstream
* ngrok agent / application server for termination. if <code>upstream</code> is
* chosen, most other modules will be disallowed because they rely on the ngrok
* edge being able to access the underlying traffic.
*
* @param terminateAt the value of the <code>terminate_at</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder terminateAt(final String terminateAt) {
this.terminateAt = Optional.of(Objects.requireNonNull(terminateAt, "terminateAt is required"));
return this;
}
/**
* <code>edge</code> if the ngrok edge should terminate TLS traffic,
* <code>upstream</code> if TLS traffic should be passed through to the upstream
* ngrok agent / application server for termination. if <code>upstream</code> is
* chosen, most other modules will be disallowed because they rely on the ngrok
* edge being able to access the underlying traffic.
*
* @param terminateAt the value of the <code>terminate_at</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder terminateAt(final Optional<String> terminateAt) {
this.terminateAt = Objects.requireNonNull(terminateAt, "terminateAt is required");
return this;
}
/**
* The minimum TLS version used for termination and advertised to the client during
* the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
* This value must be null if <code>terminate_at</code> is set to
* <code>upstream</code>.
*
* @param minVersion the value of the <code>min_version</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder minVersion(final String minVersion) {
this.minVersion = Optional.of(Objects.requireNonNull(minVersion, "minVersion is required"));
return this;
}
/**
* The minimum TLS version used for termination and advertised to the client during
* the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
* This value must be null if <code>terminate_at</code> is set to
* <code>upstream</code>.
*
* @param minVersion the value of the <code>min_version</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder minVersion(final Optional<String> minVersion) {
this.minVersion = Objects.requireNonNull(minVersion, "minVersion is required");
return this;
}
/**
* Constructs the {@link EndpointTlsTermination} instance.
*
* @return a new {@link EndpointTlsTermination}
*/
public EndpointTlsTermination build() {
return new EndpointTlsTermination(
this.enabled,
this.terminateAt.orElse(""),
this.minVersion
);
}
}
/**
* Creates a new builder for the {@link EndpointTlsTermination} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("terminate_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String terminateAt;
@JsonProperty("min_version")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> minVersion;
/**
@@ -27,7 +150,7 @@ public class EndpointTlsTermination {
* @param minVersion The minimum TLS version used for termination and advertised to the client during the TLS handshake. if unspecified, ngrok will choose an industry-safe default. This value must be null if <code>terminate_at</code> is set to <code>upstream</code>.
*/
@JsonCreator
public EndpointTlsTermination(
private EndpointTlsTermination(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("terminate_at") final String terminateAt,
@JsonProperty("min_version") final Optional<String> minVersion
@@ -2,6 +2,7 @@ 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;
@@ -12,22 +13,140 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EndpointWebhookValidation {
/**
* Builder class for {@link EndpointWebhookValidation}.
*/
public static class Builder {
private Optional<Boolean> enabled = Optional.empty();
private Optional<String> provider = Optional.empty();
private Optional<String> secret = Optional.empty();
private Builder(
) {
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}
* @return this builder instance
*/
public Builder enabled(final boolean enabled) {
this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required"));
return this;
}
/**
* <code>true</code> if the module will be applied to traffic, <code>false</code>
* to disable. default <code>true</code> if unspecified
*
* @param enabled the value of the <code>enabled</code> parameter as a {@link boolean}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder enabled(final Optional<Boolean> enabled) {
this.enabled = Objects.requireNonNull(enabled, "enabled is required");
return this;
}
/**
* a string indicating which webhook provider will be sending webhooks to this
* endpoint. Value must be one of the supported providers: <code>SLACK</code>,
* <code>SNS</code>, <code>STRIPE</code>, <code>GITHUB</code>, <code>TWILIO</code>,
* <code>SHOPIFY</code>, <code>GITLAB</code>, <code>INTERCOM</code>,
* <code>SENDGRID</code>.
*
* @param provider the value of the <code>provider</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder provider(final String provider) {
this.provider = Optional.of(Objects.requireNonNull(provider, "provider is required"));
return this;
}
/**
* a string indicating which webhook provider will be sending webhooks to this
* endpoint. Value must be one of the supported providers: <code>SLACK</code>,
* <code>SNS</code>, <code>STRIPE</code>, <code>GITHUB</code>, <code>TWILIO</code>,
* <code>SHOPIFY</code>, <code>GITLAB</code>, <code>INTERCOM</code>,
* <code>SENDGRID</code>.
*
* @param provider the value of the <code>provider</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder provider(final Optional<String> provider) {
this.provider = Objects.requireNonNull(provider, "provider is required");
return this;
}
/**
* a string secret used to validate requests from the given provider. All providers
* except AWS SNS require a secret
*
* @param secret the value of the <code>secret</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder secret(final String secret) {
this.secret = Optional.of(Objects.requireNonNull(secret, "secret is required"));
return this;
}
/**
* a string secret used to validate requests from the given provider. All providers
* except AWS SNS require a secret
*
* @param secret the value of the <code>secret</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder secret(final Optional<String> secret) {
this.secret = Objects.requireNonNull(secret, "secret is required");
return this;
}
/**
* Constructs the {@link EndpointWebhookValidation} instance.
*
* @return a new {@link EndpointWebhookValidation}
*/
public EndpointWebhookValidation build() {
return new EndpointWebhookValidation(
this.enabled,
this.provider.orElse(""),
this.secret.orElse("")
);
}
}
/**
* Creates a new builder for the {@link EndpointWebhookValidation} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("enabled")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Boolean> enabled;
@JsonProperty("provider")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String provider;
@JsonProperty("secret")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String secret;
/**
* Creates a new instance of {@link EndpointWebhookValidation}.
*
* @param enabled <code>true</code> if the module will be applied to traffic, <code>false</code> to disable. default <code>true</code> if unspecified
* @param provider a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers: <code>SLACK</code>, <code>SNS</code>, <code>STRIPE</code>, <code>GITHUB</code>, <code>TWILIO</code>, <code>SHOPIFY</code>, <code>GITLAB</code>, <code>INTERCOM</code>.
* @param provider a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers: <code>SLACK</code>, <code>SNS</code>, <code>STRIPE</code>, <code>GITHUB</code>, <code>TWILIO</code>, <code>SHOPIFY</code>, <code>GITLAB</code>, <code>INTERCOM</code>, <code>SENDGRID</code>.
* @param secret a string secret used to validate requests from the given provider. All providers except AWS SNS require a secret
*/
@JsonCreator
public EndpointWebhookValidation(
private EndpointWebhookValidation(
@JsonProperty("enabled") final Optional<Boolean> enabled,
@JsonProperty("provider") final String provider,
@JsonProperty("secret") final String secret
@@ -51,7 +170,8 @@ public class EndpointWebhookValidation {
* a string indicating which webhook provider will be sending webhooks to this
* endpoint. Value must be one of the supported providers: <code>SLACK</code>,
* <code>SNS</code>, <code>STRIPE</code>, <code>GITHUB</code>, <code>TWILIO</code>,
* <code>SHOPIFY</code>, <code>GITLAB</code>, <code>INTERCOM</code>.
* <code>SHOPIFY</code>, <code>GITLAB</code>, <code>INTERCOM</code>,
* <code>SENDGRID</code>.
*
* @return the value of the property as a {@link String}
*/
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventDestination {
@JsonProperty("id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String id;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("format")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String format;
@JsonProperty("target")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final EventTarget target;
@JsonProperty("uri")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI uri;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventDestinationList implements Pageable {
@JsonProperty("event_destinations")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<EventDestination> eventDestinations;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventSource {
@JsonProperty("type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String type;
@JsonProperty("uri")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI uri;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventSourceList {
@JsonProperty("sources")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<EventSource> sources;
@JsonProperty("uri")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI uri;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,7 +13,63 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventSourceReplace {
/**
* Builder class for {@link EventSourceReplace}.
*/
public static class Builder {
private Optional<String> type = Optional.empty();
private Builder(
) {
}
/**
* Type of event for which an event subscription will trigger
*
* @param type the value of the <code>type</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder type(final String type) {
this.type = Optional.of(Objects.requireNonNull(type, "type is required"));
return this;
}
/**
* Type of event for which an event subscription will trigger
*
* @param type the value of the <code>type</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder type(final Optional<String> type) {
this.type = Objects.requireNonNull(type, "type is required");
return this;
}
/**
* Constructs the {@link EventSourceReplace} instance.
*
* @return a new {@link EventSourceReplace}
*/
public EventSourceReplace build() {
return new EventSourceReplace(
this.type.orElse("")
);
}
}
/**
* Creates a new builder for the {@link EventSourceReplace} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String type;
/**
@@ -21,7 +78,7 @@ public class EventSourceReplace {
* @param type Type of event for which an event subscription will trigger
*/
@JsonCreator
public EventSourceReplace(
private EventSourceReplace(
@JsonProperty("type") final String type
) {
this.type = Objects.requireNonNull(type, "type is required");
@@ -2,6 +2,7 @@ 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;
@@ -13,22 +14,31 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventStream {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("fields")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> fields;
@JsonProperty("event_type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String eventType;
@JsonProperty("destination_ids")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> destinationIds;
@JsonProperty("sampling_rate")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final double samplingRate;
/**
@@ -54,7 +64,7 @@ public class EventStream {
@JsonProperty("fields") final java.util.List<String> fields,
@JsonProperty("event_type") final String eventType,
@JsonProperty("destination_ids") final java.util.List<String> destinationIds,
@JsonProperty("sampling_rate") final double samplingRate
@JsonProperty("sampling_rate") final Double samplingRate
) {
this.id = Objects.requireNonNull(id, "id is required");
this.uri = Objects.requireNonNull(uri, "uri is required");
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventStreamList implements Pageable {
@JsonProperty("event_streams")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<EventStream> eventStreams;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventSubscription {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("sources")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<EventSource> sources;
@JsonProperty("destinations")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<Ref> destinations;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventSubscriptionList implements Pageable {
@JsonProperty("event_subscriptions")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<EventSubscription> eventSubscriptions;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,11 +13,117 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventTarget {
/**
* Builder class for {@link EventTarget}.
*/
public static class Builder {
private Optional<EventTargetFirehose> firehose = Optional.empty();
private Optional<EventTargetKinesis> kinesis = Optional.empty();
private Optional<EventTargetCloudwatchLogs> cloudwatchLogs = Optional.empty();
private Builder(
) {
}
/**
* Configuration used to send events to Amazon Kinesis Data Firehose.
*
* @param firehose the value of the <code>firehose</code> parameter as a {@link EventTargetFirehose}
* @return this builder instance
*/
public Builder firehose(final EventTargetFirehose firehose) {
this.firehose = Optional.of(Objects.requireNonNull(firehose, "firehose is required"));
return this;
}
/**
* Configuration used to send events to Amazon Kinesis Data Firehose.
*
* @param firehose the value of the <code>firehose</code> parameter as a {@link EventTargetFirehose}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder firehose(final Optional<EventTargetFirehose> firehose) {
this.firehose = Objects.requireNonNull(firehose, "firehose is required");
return this;
}
/**
* Configuration used to send events to Amazon Kinesis.
*
* @param kinesis the value of the <code>kinesis</code> parameter as a {@link EventTargetKinesis}
* @return this builder instance
*/
public Builder kinesis(final EventTargetKinesis kinesis) {
this.kinesis = Optional.of(Objects.requireNonNull(kinesis, "kinesis is required"));
return this;
}
/**
* Configuration used to send events to Amazon Kinesis.
*
* @param kinesis the value of the <code>kinesis</code> parameter as a {@link EventTargetKinesis}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder kinesis(final Optional<EventTargetKinesis> kinesis) {
this.kinesis = Objects.requireNonNull(kinesis, "kinesis is required");
return this;
}
/**
* Configuration used to send events to Amazon CloudWatch Logs.
*
* @param cloudwatchLogs the value of the <code>cloudwatch_logs</code> parameter as a {@link EventTargetCloudwatchLogs}
* @return this builder instance
*/
public Builder cloudwatchLogs(final EventTargetCloudwatchLogs cloudwatchLogs) {
this.cloudwatchLogs = Optional.of(Objects.requireNonNull(cloudwatchLogs, "cloudwatchLogs is required"));
return this;
}
/**
* Configuration used to send events to Amazon CloudWatch Logs.
*
* @param cloudwatchLogs the value of the <code>cloudwatch_logs</code> parameter as a {@link EventTargetCloudwatchLogs}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder cloudwatchLogs(final Optional<EventTargetCloudwatchLogs> cloudwatchLogs) {
this.cloudwatchLogs = Objects.requireNonNull(cloudwatchLogs, "cloudwatchLogs is required");
return this;
}
/**
* Constructs the {@link EventTarget} instance.
*
* @return a new {@link EventTarget}
*/
public EventTarget build() {
return new EventTarget(
this.firehose,
this.kinesis,
this.cloudwatchLogs
);
}
}
/**
* Creates a new builder for the {@link EventTarget} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("firehose")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EventTargetFirehose> firehose;
@JsonProperty("kinesis")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EventTargetKinesis> kinesis;
@JsonProperty("cloudwatch_logs")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<EventTargetCloudwatchLogs> cloudwatchLogs;
/**
@@ -27,7 +134,7 @@ public class EventTarget {
* @param cloudwatchLogs Configuration used to send events to Amazon CloudWatch Logs.
*/
@JsonCreator
public EventTarget(
private EventTarget(
@JsonProperty("firehose") final Optional<EventTargetFirehose> firehose,
@JsonProperty("kinesis") final Optional<EventTargetKinesis> kinesis,
@JsonProperty("cloudwatch_logs") final Optional<EventTargetCloudwatchLogs> cloudwatchLogs
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,94 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventTargetCloudwatchLogs {
/**
* Builder class for {@link EventTargetCloudwatchLogs}.
*/
public static class Builder {
private Optional<AwsAuth> auth = Optional.empty();
private Optional<String> logGroupArn = Optional.empty();
private Builder(
) {
}
/**
* Configuration for how to authenticate into your AWS account. Exactly one of
* <code>role</code> or <code>creds</code> should be configured.
*
* @param auth the value of the <code>auth</code> parameter as a {@link AwsAuth}
* @return this builder instance
*/
public Builder auth(final AwsAuth auth) {
this.auth = Optional.of(Objects.requireNonNull(auth, "auth is required"));
return this;
}
/**
* Configuration for how to authenticate into your AWS account. Exactly one of
* <code>role</code> or <code>creds</code> should be configured.
*
* @param auth the value of the <code>auth</code> parameter as a {@link AwsAuth}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder auth(final Optional<AwsAuth> auth) {
this.auth = Objects.requireNonNull(auth, "auth is required");
return this;
}
/**
* An Amazon Resource Name specifying the CloudWatch Logs group to deposit events
* into.
*
* @param logGroupArn the value of the <code>log_group_arn</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder logGroupArn(final String logGroupArn) {
this.logGroupArn = Optional.of(Objects.requireNonNull(logGroupArn, "logGroupArn is required"));
return this;
}
/**
* An Amazon Resource Name specifying the CloudWatch Logs group to deposit events
* into.
*
* @param logGroupArn the value of the <code>log_group_arn</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder logGroupArn(final Optional<String> logGroupArn) {
this.logGroupArn = Objects.requireNonNull(logGroupArn, "logGroupArn is required");
return this;
}
/**
* Constructs the {@link EventTargetCloudwatchLogs} instance.
*
* @return a new {@link EventTargetCloudwatchLogs}
*/
public EventTargetCloudwatchLogs build() {
return new EventTargetCloudwatchLogs(
this.auth.orElse(null),
this.logGroupArn.orElse("")
);
}
}
/**
* Creates a new builder for the {@link EventTargetCloudwatchLogs} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("auth")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final AwsAuth auth;
@JsonProperty("log_group_arn")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String logGroupArn;
/**
@@ -24,7 +110,7 @@ public class EventTargetCloudwatchLogs {
* @param logGroupArn An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.
*/
@JsonCreator
public EventTargetCloudwatchLogs(
private EventTargetCloudwatchLogs(
@JsonProperty("auth") final AwsAuth auth,
@JsonProperty("log_group_arn") final String logGroupArn
) {
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,94 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventTargetFirehose {
/**
* Builder class for {@link EventTargetFirehose}.
*/
public static class Builder {
private Optional<AwsAuth> auth = Optional.empty();
private Optional<String> deliveryStreamArn = Optional.empty();
private Builder(
) {
}
/**
* Configuration for how to authenticate into your AWS account. Exactly one of
* <code>role</code> or <code>creds</code> should be configured.
*
* @param auth the value of the <code>auth</code> parameter as a {@link AwsAuth}
* @return this builder instance
*/
public Builder auth(final AwsAuth auth) {
this.auth = Optional.of(Objects.requireNonNull(auth, "auth is required"));
return this;
}
/**
* Configuration for how to authenticate into your AWS account. Exactly one of
* <code>role</code> or <code>creds</code> should be configured.
*
* @param auth the value of the <code>auth</code> parameter as a {@link AwsAuth}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder auth(final Optional<AwsAuth> auth) {
this.auth = Objects.requireNonNull(auth, "auth is required");
return this;
}
/**
* An Amazon Resource Name specifying the Firehose delivery stream to deposit
* events into.
*
* @param deliveryStreamArn the value of the <code>delivery_stream_arn</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder deliveryStreamArn(final String deliveryStreamArn) {
this.deliveryStreamArn = Optional.of(Objects.requireNonNull(deliveryStreamArn, "deliveryStreamArn is required"));
return this;
}
/**
* An Amazon Resource Name specifying the Firehose delivery stream to deposit
* events into.
*
* @param deliveryStreamArn the value of the <code>delivery_stream_arn</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder deliveryStreamArn(final Optional<String> deliveryStreamArn) {
this.deliveryStreamArn = Objects.requireNonNull(deliveryStreamArn, "deliveryStreamArn is required");
return this;
}
/**
* Constructs the {@link EventTargetFirehose} instance.
*
* @return a new {@link EventTargetFirehose}
*/
public EventTargetFirehose build() {
return new EventTargetFirehose(
this.auth.orElse(null),
this.deliveryStreamArn.orElse("")
);
}
}
/**
* Creates a new builder for the {@link EventTargetFirehose} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("auth")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final AwsAuth auth;
@JsonProperty("delivery_stream_arn")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String deliveryStreamArn;
/**
@@ -24,7 +110,7 @@ public class EventTargetFirehose {
* @param deliveryStreamArn An Amazon Resource Name specifying the Firehose delivery stream to deposit events into.
*/
@JsonCreator
public EventTargetFirehose(
private EventTargetFirehose(
@JsonProperty("auth") final AwsAuth auth,
@JsonProperty("delivery_stream_arn") final String deliveryStreamArn
) {
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,92 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class EventTargetKinesis {
/**
* Builder class for {@link EventTargetKinesis}.
*/
public static class Builder {
private Optional<AwsAuth> auth = Optional.empty();
private Optional<String> streamArn = Optional.empty();
private Builder(
) {
}
/**
* Configuration for how to authenticate into your AWS account. Exactly one of
* <code>role</code> or <code>creds</code> should be configured.
*
* @param auth the value of the <code>auth</code> parameter as a {@link AwsAuth}
* @return this builder instance
*/
public Builder auth(final AwsAuth auth) {
this.auth = Optional.of(Objects.requireNonNull(auth, "auth is required"));
return this;
}
/**
* Configuration for how to authenticate into your AWS account. Exactly one of
* <code>role</code> or <code>creds</code> should be configured.
*
* @param auth the value of the <code>auth</code> parameter as a {@link AwsAuth}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder auth(final Optional<AwsAuth> auth) {
this.auth = Objects.requireNonNull(auth, "auth is required");
return this;
}
/**
* An Amazon Resource Name specifying the Kinesis stream to deposit events into.
*
* @param streamArn the value of the <code>stream_arn</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder streamArn(final String streamArn) {
this.streamArn = Optional.of(Objects.requireNonNull(streamArn, "streamArn is required"));
return this;
}
/**
* An Amazon Resource Name specifying the Kinesis stream to deposit events into.
*
* @param streamArn the value of the <code>stream_arn</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder streamArn(final Optional<String> streamArn) {
this.streamArn = Objects.requireNonNull(streamArn, "streamArn is required");
return this;
}
/**
* Constructs the {@link EventTargetKinesis} instance.
*
* @return a new {@link EventTargetKinesis}
*/
public EventTargetKinesis build() {
return new EventTargetKinesis(
this.auth.orElse(null),
this.streamArn.orElse("")
);
}
}
/**
* Creates a new builder for the {@link EventTargetKinesis} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("auth")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final AwsAuth auth;
@JsonProperty("stream_arn")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String streamArn;
/**
@@ -24,7 +108,7 @@ public class EventTargetKinesis {
* @param streamArn An Amazon Resource Name specifying the Kinesis stream to deposit events into.
*/
@JsonCreator
public EventTargetKinesis(
private EventTargetKinesis(
@JsonProperty("auth") final AwsAuth auth,
@JsonProperty("stream_arn") final String streamArn
) {
@@ -2,6 +2,7 @@ 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;
@@ -13,16 +14,22 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpPolicy {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("action")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String action;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpPolicyList implements Pageable {
@JsonProperty("ip_policies")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<IpPolicy> ipPolicies;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpPolicyRule {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("cidr")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String cidr;
@JsonProperty("ip_policy")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Ref ipPolicy;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpPolicyRuleList implements Pageable {
@JsonProperty("ip_policy_rules")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<IpPolicyRule> ipPolicyRules;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,20 +14,28 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpRestriction {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("enforced")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final boolean enforced;
@JsonProperty("type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String type;
@JsonProperty("ip_policies")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<Ref> ipPolicies;
/**
@@ -48,7 +57,7 @@ public class IpRestriction {
@JsonProperty("created_at") final java.time.OffsetDateTime createdAt,
@JsonProperty("description") final String description,
@JsonProperty("metadata") final String metadata,
@JsonProperty("enforced") final boolean enforced,
@JsonProperty("enforced") final Boolean enforced,
@JsonProperty("type") final String type,
@JsonProperty("ip_policies") final java.util.List<Ref> ipPolicies
) {
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpRestrictionList implements Pageable {
@JsonProperty("ip_restrictions")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<IpRestriction> ipRestrictions;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,16 +14,22 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpWhitelistEntry {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("ip_net")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String ipNet;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class IpWhitelistEntryList implements Pageable {
@JsonProperty("whitelist")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<IpWhitelistEntry> whitelist;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Ref {
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,20 +14,28 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedAddr {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("addr")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String addr;
@JsonProperty("region")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String region;
@JsonProperty("endpoint_configuration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Ref> endpointConfiguration;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedAddrList implements Pageable {
@JsonProperty("reserved_addrs")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<ReservedAddr> reservedAddrs;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,30 +14,43 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedDomain {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("domain")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String domain;
@JsonProperty("region")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String region;
@JsonProperty("cname_target")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> cnameTarget;
@JsonProperty("http_endpoint_configuration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Ref> httpEndpointConfiguration;
@JsonProperty("https_endpoint_configuration")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Ref> httpsEndpointConfiguration;
@JsonProperty("certificate")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<Ref> certificate;
@JsonProperty("certificate_management_policy")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<ReservedDomainCertPolicy> certificateManagementPolicy;
@JsonProperty("certificate_management_status")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<ReservedDomainCertStatus> certificateManagementStatus;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,14 +14,19 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedDomainCertJob {
@JsonProperty("error_code")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<String> errorCode;
@JsonProperty("msg")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String msg;
@JsonProperty("started_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime startedAt;
@JsonProperty("retries_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<java.time.OffsetDateTime> retriesAt;
@JsonProperty("ns_targets")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<ReservedDomainCertNsTarget> nsTargets;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedDomainCertNsTarget {
@JsonProperty("zone")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String zone;
@JsonProperty("nameservers")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> nameservers;
/**
@@ -2,6 +2,7 @@ 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;
@@ -12,9 +13,94 @@ import java.util.Optional;
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedDomainCertPolicy {
/**
* Builder class for {@link ReservedDomainCertPolicy}.
*/
public static class Builder {
private Optional<String> authority = Optional.empty();
private Optional<String> privateKeyType = Optional.empty();
private Builder(
) {
}
/**
* certificate authority to request certificates from. The only supported value is
* letsencrypt.
*
* @param authority the value of the <code>authority</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder authority(final String authority) {
this.authority = Optional.of(Objects.requireNonNull(authority, "authority is required"));
return this;
}
/**
* certificate authority to request certificates from. The only supported value is
* letsencrypt.
*
* @param authority the value of the <code>authority</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder authority(final Optional<String> authority) {
this.authority = Objects.requireNonNull(authority, "authority is required");
return this;
}
/**
* type of private key to use when requesting certificates. Defaults to rsa, can be
* either rsa or ecdsa.
*
* @param privateKeyType the value of the <code>private_key_type</code> parameter as a {@link String}
* @return this builder instance
*/
public Builder privateKeyType(final String privateKeyType) {
this.privateKeyType = Optional.of(Objects.requireNonNull(privateKeyType, "privateKeyType is required"));
return this;
}
/**
* type of private key to use when requesting certificates. Defaults to rsa, can be
* either rsa or ecdsa.
*
* @param privateKeyType the value of the <code>private_key_type</code> parameter as a {@link String}, wrapped in an {@link Optional}
* @return this builder instance
*/
public Builder privateKeyType(final Optional<String> privateKeyType) {
this.privateKeyType = Objects.requireNonNull(privateKeyType, "privateKeyType is required");
return this;
}
/**
* Constructs the {@link ReservedDomainCertPolicy} instance.
*
* @return a new {@link ReservedDomainCertPolicy}
*/
public ReservedDomainCertPolicy build() {
return new ReservedDomainCertPolicy(
this.authority.orElse(""),
this.privateKeyType.orElse("")
);
}
}
/**
* Creates a new builder for the {@link ReservedDomainCertPolicy} type.
*
* @return a new {@link Builder}
*/
public static Builder newBuilder(
) {
return new Builder (
);
}
@JsonProperty("authority")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String authority;
@JsonProperty("private_key_type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String privateKeyType;
/**
@@ -24,7 +110,7 @@ public class ReservedDomainCertPolicy {
* @param privateKeyType type of private key to use when requesting certificates. Defaults to rsa, can be either rsa or ecdsa.
*/
@JsonCreator
public ReservedDomainCertPolicy(
private ReservedDomainCertPolicy(
@JsonProperty("authority") final String authority,
@JsonProperty("private_key_type") final String privateKeyType
) {
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedDomainCertStatus {
@JsonProperty("renews_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<java.time.OffsetDateTime> renewsAt;
@JsonProperty("provisioning_job")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<ReservedDomainCertJob> provisioningJob;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReservedDomainList implements Pageable {
@JsonProperty("reserved_domains")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<ReservedDomain> reservedDomains;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshCertificateAuthority {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("public_key")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String publicKey;
@JsonProperty("key_type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String keyType;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshCertificateAuthorityList implements Pageable {
@JsonProperty("ssh_certificate_authorities")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<SshCertificateAuthority> sshCertificateAuthorities;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshCredential {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("public_key")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String publicKey;
@JsonProperty("acl")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> acl;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshCredentialList implements Pageable {
@JsonProperty("ssh_credentials")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<SshCredential> sshCredentials;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,28 +14,40 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshHostCertificate {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("public_key")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String publicKey;
@JsonProperty("key_type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String keyType;
@JsonProperty("ssh_certificate_authority_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String sshCertificateAuthorityId;
@JsonProperty("principals")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> principals;
@JsonProperty("valid_after")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime validAfter;
@JsonProperty("valid_until")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime validUntil;
@JsonProperty("certificate")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String certificate;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshHostCertificateList implements Pageable {
@JsonProperty("ssh_host_certificates")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<SshHostCertificate> sshHostCertificates;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,32 +14,46 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshUserCertificate {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("public_key")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String publicKey;
@JsonProperty("key_type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String keyType;
@JsonProperty("ssh_certificate_authority_id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String sshCertificateAuthorityId;
@JsonProperty("principals")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> principals;
@JsonProperty("critical_options")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.Map<String, String> criticalOptions;
@JsonProperty("extensions")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.Map<String, String> extensions;
@JsonProperty("valid_after")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime validAfter;
@JsonProperty("valid_until")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime validUntil;
@JsonProperty("certificate")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String certificate;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SshUserCertificateList implements Pageable {
@JsonProperty("ssh_user_certificates")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<SshUserCertificate> sshUserCertificates;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,46 +14,67 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TlsCertificate {
@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("created_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime createdAt;
@JsonProperty("description")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String description;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("certificate_pem")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String certificatePem;
@JsonProperty("subject_common_name")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String subjectCommonName;
@JsonProperty("subject_alternative_names")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final TlsCertificateSaNs subjectAlternativeNames;
@JsonProperty("issued_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Optional<java.time.OffsetDateTime> issuedAt;
@JsonProperty("not_before")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime notBefore;
@JsonProperty("not_after")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime notAfter;
@JsonProperty("key_usages")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> keyUsages;
@JsonProperty("extended_key_usages")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> extendedKeyUsages;
@JsonProperty("private_key_type")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String privateKeyType;
@JsonProperty("issuer_common_name")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String issuerCommonName;
@JsonProperty("serial_number")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String serialNumber;
@JsonProperty("subject_organization")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String subjectOrganization;
@JsonProperty("subject_organizational_unit")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String subjectOrganizationalUnit;
@JsonProperty("subject_locality")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String subjectLocality;
@JsonProperty("subject_province")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String subjectProvince;
@JsonProperty("subject_country")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String subjectCountry;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TlsCertificateList implements Pageable {
@JsonProperty("tls_certificates")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<TlsCertificate> tlsCertificates;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,8 +14,10 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TlsCertificateSaNs {
@JsonProperty("dns_names")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> dnsNames;
@JsonProperty("ips")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<String> ips;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,18 +14,25 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Tunnel {
@JsonProperty("id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String id;
@JsonProperty("public_url")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI publicUrl;
@JsonProperty("started_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime startedAt;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("proto")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String proto;
@JsonProperty("region")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String region;
@JsonProperty("tunnel_session")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Ref tunnelSession;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TunnelList implements Pageable {
@JsonProperty("tunnels")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<Tunnel> tunnels;
@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;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,24 +14,34 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TunnelSession {
@JsonProperty("agent_version")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String agentVersion;
@JsonProperty("credential")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final Ref credential;
@JsonProperty("id")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String id;
@JsonProperty("ip")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String ip;
@JsonProperty("metadata")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String metadata;
@JsonProperty("os")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String os;
@JsonProperty("region")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String region;
@JsonProperty("started_at")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.time.OffsetDateTime startedAt;
@JsonProperty("transport")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final String transport;
@JsonProperty("uri")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.net.URI uri;
/**
@@ -2,6 +2,7 @@ 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;
@@ -13,10 +14,13 @@ import java.util.Optional;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TunnelSessionList implements Pageable {
@JsonProperty("tunnel_sessions")
@JsonInclude(value = JsonInclude.Include.NON_ABSENT)
private final java.util.List<TunnelSession> tunnelSessions;
@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;
/**
@@ -14,6 +14,8 @@ import java.util.stream.Stream;
/**
* Abuse Reports allow you to submit take-down requests for URLs hosted by
* ngrok that violate ngrok's terms of service.
*
* See also <a href="https://ngrok.com/docs/api#api-abuse-reports">https://ngrok.com/docs/api#api-abuse-reports</a>.
*/
public class AbuseReports {
private final NgrokApiClient apiClient;
@@ -30,11 +32,11 @@ public class AbuseReports {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class AbuseReportsCreateCallBuilder {
public class CreateCallBuilder {
private final java.util.List<java.net.URI> urls;
private String metadata = "";
private AbuseReportsCreateCallBuilder(
private CreateCallBuilder(
final java.util.List<java.net.URI> urls
) {
this.urls = Objects.requireNonNull(urls, "urls is required");
@@ -46,7 +48,7 @@ public class AbuseReports {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public AbuseReportsCreateCallBuilder metadata(final String metadata) {
public CreateCallBuilder metadata(final String metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -57,7 +59,7 @@ public class AbuseReports {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public AbuseReportsCreateCallBuilder metadata(final Optional<String> metadata) {
public CreateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required").orElse("");
return this;
}
@@ -100,13 +102,15 @@ public class AbuseReports {
* response team. This API is only available to authorized accounts. Contact
* abuse@ngrok.com to request access
*
* See also <a href="https://ngrok.com/docs/api#api-abuse-reports-create">https://ngrok.com/docs/api#api-abuse-reports-create</a>.
*
* @param urls a list of URLs containing suspected abusive content
* @return a call builder for this API call
*/
public AbuseReportsCreateCallBuilder create(
public CreateCallBuilder create(
final java.util.List<java.net.URI> urls
) {
return new AbuseReportsCreateCallBuilder(
return new CreateCallBuilder(
urls
);
}
@@ -114,10 +118,10 @@ public class AbuseReports {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class AbuseReportsGetCallBuilder {
public class GetCallBuilder {
private final String id;
private AbuseReportsGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -156,13 +160,15 @@ public class AbuseReports {
/**
* Get the detailed status of abuse report by ID.
*
* See also <a href="https://ngrok.com/docs/api#api-abuse-reports-get">https://ngrok.com/docs/api#api-abuse-reports-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public AbuseReportsGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new AbuseReportsGetCallBuilder(
return new GetCallBuilder(
id
);
}
+44 -32
View File
@@ -19,6 +19,8 @@ import java.util.stream.Stream;
* key from the <a href="https://dashboard.ngrok.com/api/keys">API Keys page</a>
* on your
* ngrok.com dashboard.
*
* See also <a href="https://ngrok.com/docs/api#api-api-keys">https://ngrok.com/docs/api#api-api-keys</a>.
*/
public class ApiKeys {
private final NgrokApiClient apiClient;
@@ -35,11 +37,11 @@ public class ApiKeys {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class ApiKeysCreateCallBuilder {
public class CreateCallBuilder {
private String description = "";
private String metadata = "";
private ApiKeysCreateCallBuilder(
private CreateCallBuilder(
) {
}
@@ -50,7 +52,7 @@ public class ApiKeys {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public ApiKeysCreateCallBuilder description(final String description) {
public CreateCallBuilder description(final String description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -62,7 +64,7 @@ public class ApiKeys {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public ApiKeysCreateCallBuilder description(final Optional<String> description) {
public CreateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required").orElse("");
return this;
}
@@ -73,7 +75,7 @@ public class ApiKeys {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public ApiKeysCreateCallBuilder metadata(final String metadata) {
public CreateCallBuilder metadata(final String metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -84,7 +86,7 @@ public class ApiKeys {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public ApiKeysCreateCallBuilder metadata(final Optional<String> metadata) {
public CreateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required").orElse("");
return this;
}
@@ -126,21 +128,23 @@ public class ApiKeys {
* Create a new API key. The generated API key can be used to authenticate to the
* ngrok API.
*
* See also <a href="https://ngrok.com/docs/api#api-api-keys-create">https://ngrok.com/docs/api#api-api-keys-create</a>.
*
* @return a call builder for this API call
*/
public ApiKeysCreateCallBuilder create(
public CreateCallBuilder create(
) {
return new ApiKeysCreateCallBuilder(
return new CreateCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class ApiKeysDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private ApiKeysDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -178,13 +182,15 @@ public class ApiKeys {
/**
* Delete an API key by ID
*
* See also <a href="https://ngrok.com/docs/api#api-api-keys-delete">https://ngrok.com/docs/api#api-api-keys-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public ApiKeysDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new ApiKeysDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -192,10 +198,10 @@ public class ApiKeys {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class ApiKeysGetCallBuilder {
public class GetCallBuilder {
private final String id;
private ApiKeysGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -234,13 +240,15 @@ public class ApiKeys {
/**
* Get the details of an API key by ID.
*
* See also <a href="https://ngrok.com/docs/api#api-api-keys-get">https://ngrok.com/docs/api#api-api-keys-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public ApiKeysGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new ApiKeysGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -248,11 +256,11 @@ public class ApiKeys {
/**
* A builder object encapsulating state for an unsent List API call.
*/
public class ApiKeysListCallBuilder {
public class ListCallBuilder {
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private ApiKeysListCallBuilder(
private ListCallBuilder(
) {
}
@@ -262,7 +270,7 @@ public class ApiKeys {
* @param beforeId the value of the before_id parameter as a {@link String}
* @return the call builder instance
*/
public ApiKeysListCallBuilder beforeId(final String beforeId) {
public ListCallBuilder beforeId(final String beforeId) {
this.beforeId = Optional.ofNullable(beforeId);
return this;
}
@@ -273,7 +281,7 @@ public class ApiKeys {
* @param beforeId the value of the before_id parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public ApiKeysListCallBuilder beforeId(final Optional<String> beforeId) {
public ListCallBuilder beforeId(final Optional<String> beforeId) {
this.beforeId = Objects.requireNonNull(beforeId, "beforeId is required");
return this;
}
@@ -284,7 +292,7 @@ public class ApiKeys {
* @param limit the value of the limit parameter as a {@link String}
* @return the call builder instance
*/
public ApiKeysListCallBuilder limit(final String limit) {
public ListCallBuilder limit(final String limit) {
this.limit = Optional.ofNullable(limit);
return this;
}
@@ -295,7 +303,7 @@ public class ApiKeys {
* @param limit the value of the limit parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public ApiKeysListCallBuilder limit(final Optional<String> limit) {
public ListCallBuilder limit(final Optional<String> limit) {
this.limit = Objects.requireNonNull(limit, "limit is required");
return this;
}
@@ -336,23 +344,25 @@ public class ApiKeys {
/**
* List all API keys owned by this account
*
* See also <a href="https://ngrok.com/docs/api#api-api-keys-list">https://ngrok.com/docs/api#api-api-keys-list</a>.
*
* @return a call builder for this API call
*/
public ApiKeysListCallBuilder list(
public ListCallBuilder list(
) {
return new ApiKeysListCallBuilder(
return new ListCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Update API call.
*/
public class ApiKeysUpdateCallBuilder {
public class UpdateCallBuilder {
private final String id;
private Optional<String> description = Optional.empty();
private Optional<String> metadata = Optional.empty();
private ApiKeysUpdateCallBuilder(
private UpdateCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -365,7 +375,7 @@ public class ApiKeys {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public ApiKeysUpdateCallBuilder description(final String description) {
public UpdateCallBuilder description(final String description) {
this.description = Optional.ofNullable(description);
return this;
}
@@ -377,7 +387,7 @@ public class ApiKeys {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public ApiKeysUpdateCallBuilder description(final Optional<String> description) {
public UpdateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -388,7 +398,7 @@ public class ApiKeys {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public ApiKeysUpdateCallBuilder metadata(final String metadata) {
public UpdateCallBuilder metadata(final String metadata) {
this.metadata = Optional.ofNullable(metadata);
return this;
}
@@ -399,7 +409,7 @@ public class ApiKeys {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public ApiKeysUpdateCallBuilder metadata(final Optional<String> metadata) {
public UpdateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -440,13 +450,15 @@ public class ApiKeys {
/**
* Update attributes of an API key by ID.
*
* See also <a href="https://ngrok.com/docs/api#api-api-keys-update">https://ngrok.com/docs/api#api-api-keys-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 ApiKeysUpdateCallBuilder update(
public UpdateCallBuilder update(
final String id
) {
return new ApiKeysUpdateCallBuilder(
return new UpdateCallBuilder(
id
);
}
@@ -17,6 +17,8 @@ import java.util.stream.Stream;
* to verify that the TLS certificate presented by a client has been signed by
* this CA. Certificate Authorities are used only for mTLS validation only and
* thus a private key is not included in the resource.
*
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities">https://ngrok.com/docs/api#api-certificate-authorities</a>.
*/
public class CertificateAuthorities {
private final NgrokApiClient apiClient;
@@ -33,12 +35,12 @@ public class CertificateAuthorities {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class CertificateAuthoritiesCreateCallBuilder {
public class CreateCallBuilder {
private String description = "";
private String metadata = "";
private final String caPem;
private CertificateAuthoritiesCreateCallBuilder(
private CreateCallBuilder(
final String caPem
) {
this.caPem = Objects.requireNonNull(caPem, "caPem is required");
@@ -51,7 +53,7 @@ public class CertificateAuthorities {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesCreateCallBuilder description(final String description) {
public CreateCallBuilder description(final String description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -63,7 +65,7 @@ public class CertificateAuthorities {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesCreateCallBuilder description(final Optional<String> description) {
public CreateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required").orElse("");
return this;
}
@@ -75,7 +77,7 @@ public class CertificateAuthorities {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesCreateCallBuilder metadata(final String metadata) {
public CreateCallBuilder metadata(final String metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -87,7 +89,7 @@ public class CertificateAuthorities {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesCreateCallBuilder metadata(final Optional<String> metadata) {
public CreateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required").orElse("");
return this;
}
@@ -129,13 +131,15 @@ public class CertificateAuthorities {
/**
* Upload a new Certificate Authority
*
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities-create">https://ngrok.com/docs/api#api-certificate-authorities-create</a>.
*
* @param caPem raw PEM of the Certificate Authority
* @return a call builder for this API call
*/
public CertificateAuthoritiesCreateCallBuilder create(
public CreateCallBuilder create(
final String caPem
) {
return new CertificateAuthoritiesCreateCallBuilder(
return new CreateCallBuilder(
caPem
);
}
@@ -143,10 +147,10 @@ public class CertificateAuthorities {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class CertificateAuthoritiesDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private CertificateAuthoritiesDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -184,13 +188,15 @@ public class CertificateAuthorities {
/**
* Delete a Certificate Authority
*
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities-delete">https://ngrok.com/docs/api#api-certificate-authorities-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public CertificateAuthoritiesDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new CertificateAuthoritiesDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -198,10 +204,10 @@ public class CertificateAuthorities {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class CertificateAuthoritiesGetCallBuilder {
public class GetCallBuilder {
private final String id;
private CertificateAuthoritiesGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -240,13 +246,15 @@ public class CertificateAuthorities {
/**
* Get detailed information about a certficate authority
*
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities-get">https://ngrok.com/docs/api#api-certificate-authorities-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public CertificateAuthoritiesGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new CertificateAuthoritiesGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -254,11 +262,11 @@ public class CertificateAuthorities {
/**
* A builder object encapsulating state for an unsent List API call.
*/
public class CertificateAuthoritiesListCallBuilder {
public class ListCallBuilder {
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private CertificateAuthoritiesListCallBuilder(
private ListCallBuilder(
) {
}
@@ -268,7 +276,7 @@ public class CertificateAuthorities {
* @param beforeId the value of the before_id parameter as a {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesListCallBuilder beforeId(final String beforeId) {
public ListCallBuilder beforeId(final String beforeId) {
this.beforeId = Optional.ofNullable(beforeId);
return this;
}
@@ -279,7 +287,7 @@ public class CertificateAuthorities {
* @param beforeId the value of the before_id parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesListCallBuilder beforeId(final Optional<String> beforeId) {
public ListCallBuilder beforeId(final Optional<String> beforeId) {
this.beforeId = Objects.requireNonNull(beforeId, "beforeId is required");
return this;
}
@@ -290,7 +298,7 @@ public class CertificateAuthorities {
* @param limit the value of the limit parameter as a {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesListCallBuilder limit(final String limit) {
public ListCallBuilder limit(final String limit) {
this.limit = Optional.ofNullable(limit);
return this;
}
@@ -301,7 +309,7 @@ public class CertificateAuthorities {
* @param limit the value of the limit parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesListCallBuilder limit(final Optional<String> limit) {
public ListCallBuilder limit(final Optional<String> limit) {
this.limit = Objects.requireNonNull(limit, "limit is required");
return this;
}
@@ -342,23 +350,25 @@ public class CertificateAuthorities {
/**
* List all Certificate Authority on this account
*
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities-list">https://ngrok.com/docs/api#api-certificate-authorities-list</a>.
*
* @return a call builder for this API call
*/
public CertificateAuthoritiesListCallBuilder list(
public ListCallBuilder list(
) {
return new CertificateAuthoritiesListCallBuilder(
return new ListCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Update API call.
*/
public class CertificateAuthoritiesUpdateCallBuilder {
public class UpdateCallBuilder {
private final String id;
private Optional<String> description = Optional.empty();
private Optional<String> metadata = Optional.empty();
private CertificateAuthoritiesUpdateCallBuilder(
private UpdateCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -371,7 +381,7 @@ public class CertificateAuthorities {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesUpdateCallBuilder description(final String description) {
public UpdateCallBuilder description(final String description) {
this.description = Optional.ofNullable(description);
return this;
}
@@ -383,7 +393,7 @@ public class CertificateAuthorities {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesUpdateCallBuilder description(final Optional<String> description) {
public UpdateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -395,7 +405,7 @@ public class CertificateAuthorities {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesUpdateCallBuilder metadata(final String metadata) {
public UpdateCallBuilder metadata(final String metadata) {
this.metadata = Optional.ofNullable(metadata);
return this;
}
@@ -407,7 +417,7 @@ public class CertificateAuthorities {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CertificateAuthoritiesUpdateCallBuilder metadata(final Optional<String> metadata) {
public UpdateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -448,13 +458,15 @@ public class CertificateAuthorities {
/**
* Update attributes of a Certificate Authority by ID
*
* See also <a href="https://ngrok.com/docs/api#api-certificate-authorities-update">https://ngrok.com/docs/api#api-certificate-authorities-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 CertificateAuthoritiesUpdateCallBuilder update(
public UpdateCallBuilder update(
final String id
) {
return new CertificateAuthoritiesUpdateCallBuilder(
return new UpdateCallBuilder(
id
);
}
@@ -17,6 +17,8 @@ import java.util.stream.Stream;
* the <code>ngrok authtoken</code> command or by specifying it in the
* <code>ngrok.yml</code>
* configuration file with the <code>authtoken</code> property.
*
* See also <a href="https://ngrok.com/docs/api#api-credentials">https://ngrok.com/docs/api#api-credentials</a>.
*/
public class Credentials {
private final NgrokApiClient apiClient;
@@ -33,12 +35,12 @@ public class Credentials {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class CredentialsCreateCallBuilder {
public class CreateCallBuilder {
private String description = "";
private String metadata = "";
private java.util.List<String> acl = null;
private java.util.List<String> acl = java.util.Collections.emptyList();
private CredentialsCreateCallBuilder(
private CreateCallBuilder(
) {
}
@@ -49,7 +51,7 @@ public class Credentials {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public CredentialsCreateCallBuilder description(final String description) {
public CreateCallBuilder description(final String description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -61,7 +63,7 @@ public class Credentials {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CredentialsCreateCallBuilder description(final Optional<String> description) {
public CreateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required").orElse("");
return this;
}
@@ -73,7 +75,7 @@ public class Credentials {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public CredentialsCreateCallBuilder metadata(final String metadata) {
public CreateCallBuilder metadata(final String metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -85,7 +87,7 @@ public class Credentials {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CredentialsCreateCallBuilder metadata(final Optional<String> metadata) {
public CreateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required").orElse("");
return this;
}
@@ -106,7 +108,7 @@ public class Credentials {
* @param acl the value of the acl parameter as a {@link java.util.List<String>}
* @return the call builder instance
*/
public CredentialsCreateCallBuilder acl(final java.util.List<String> acl) {
public CreateCallBuilder acl(final java.util.List<String> acl) {
this.acl = Objects.requireNonNull(acl, "acl is required");
return this;
}
@@ -127,8 +129,8 @@ public class Credentials {
* @param acl the value of the acl parameter as an {@link Optional} of {@link java.util.List<String>}
* @return the call builder instance
*/
public CredentialsCreateCallBuilder acl(final Optional<java.util.List<String>> acl) {
this.acl = Objects.requireNonNull(acl, "acl is required").orElse(null);
public CreateCallBuilder acl(final Optional<java.util.List<String>> acl) {
this.acl = Objects.requireNonNull(acl, "acl is required").orElse(java.util.Collections.emptyList());
return this;
}
@@ -172,21 +174,23 @@ public class Credentials {
* the generated token is available. If you need it for future use, you must save
* it securely yourself.
*
* See also <a href="https://ngrok.com/docs/api#api-credentials-create">https://ngrok.com/docs/api#api-credentials-create</a>.
*
* @return a call builder for this API call
*/
public CredentialsCreateCallBuilder create(
public CreateCallBuilder create(
) {
return new CredentialsCreateCallBuilder(
return new CreateCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class CredentialsDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private CredentialsDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -224,13 +228,15 @@ public class Credentials {
/**
* Delete a tunnel authtoken credential by ID
*
* See also <a href="https://ngrok.com/docs/api#api-credentials-delete">https://ngrok.com/docs/api#api-credentials-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public CredentialsDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new CredentialsDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -238,10 +244,10 @@ public class Credentials {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class CredentialsGetCallBuilder {
public class GetCallBuilder {
private final String id;
private CredentialsGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -280,13 +286,15 @@ public class Credentials {
/**
* Get detailed information about a tunnel authtoken credential
*
* See also <a href="https://ngrok.com/docs/api#api-credentials-get">https://ngrok.com/docs/api#api-credentials-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public CredentialsGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new CredentialsGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -294,11 +302,11 @@ public class Credentials {
/**
* A builder object encapsulating state for an unsent List API call.
*/
public class CredentialsListCallBuilder {
public class ListCallBuilder {
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private CredentialsListCallBuilder(
private ListCallBuilder(
) {
}
@@ -308,7 +316,7 @@ public class Credentials {
* @param beforeId the value of the before_id parameter as a {@link String}
* @return the call builder instance
*/
public CredentialsListCallBuilder beforeId(final String beforeId) {
public ListCallBuilder beforeId(final String beforeId) {
this.beforeId = Optional.ofNullable(beforeId);
return this;
}
@@ -319,7 +327,7 @@ public class Credentials {
* @param beforeId the value of the before_id parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CredentialsListCallBuilder beforeId(final Optional<String> beforeId) {
public ListCallBuilder beforeId(final Optional<String> beforeId) {
this.beforeId = Objects.requireNonNull(beforeId, "beforeId is required");
return this;
}
@@ -330,7 +338,7 @@ public class Credentials {
* @param limit the value of the limit parameter as a {@link String}
* @return the call builder instance
*/
public CredentialsListCallBuilder limit(final String limit) {
public ListCallBuilder limit(final String limit) {
this.limit = Optional.ofNullable(limit);
return this;
}
@@ -341,7 +349,7 @@ public class Credentials {
* @param limit the value of the limit parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CredentialsListCallBuilder limit(final Optional<String> limit) {
public ListCallBuilder limit(final Optional<String> limit) {
this.limit = Objects.requireNonNull(limit, "limit is required");
return this;
}
@@ -382,24 +390,26 @@ public class Credentials {
/**
* List all tunnel authtoken credentials on this account
*
* See also <a href="https://ngrok.com/docs/api#api-credentials-list">https://ngrok.com/docs/api#api-credentials-list</a>.
*
* @return a call builder for this API call
*/
public CredentialsListCallBuilder list(
public ListCallBuilder list(
) {
return new CredentialsListCallBuilder(
return new ListCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Update API call.
*/
public class CredentialsUpdateCallBuilder {
public class UpdateCallBuilder {
private final String id;
private Optional<String> description = Optional.empty();
private Optional<String> metadata = Optional.empty();
private Optional<java.util.List<String>> acl = Optional.empty();
private CredentialsUpdateCallBuilder(
private UpdateCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -412,7 +422,7 @@ public class Credentials {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public CredentialsUpdateCallBuilder description(final String description) {
public UpdateCallBuilder description(final String description) {
this.description = Optional.ofNullable(description);
return this;
}
@@ -424,7 +434,7 @@ public class Credentials {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CredentialsUpdateCallBuilder description(final Optional<String> description) {
public UpdateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -436,7 +446,7 @@ public class Credentials {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public CredentialsUpdateCallBuilder metadata(final String metadata) {
public UpdateCallBuilder metadata(final String metadata) {
this.metadata = Optional.ofNullable(metadata);
return this;
}
@@ -448,7 +458,7 @@ public class Credentials {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public CredentialsUpdateCallBuilder metadata(final Optional<String> metadata) {
public UpdateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -469,7 +479,7 @@ public class Credentials {
* @param acl the value of the acl parameter as a {@link java.util.List<String>}
* @return the call builder instance
*/
public CredentialsUpdateCallBuilder acl(final java.util.List<String> acl) {
public UpdateCallBuilder acl(final java.util.List<String> acl) {
this.acl = Optional.ofNullable(acl);
return this;
}
@@ -490,7 +500,7 @@ public class Credentials {
* @param acl the value of the acl parameter as an {@link Optional} of {@link java.util.List<String>}
* @return the call builder instance
*/
public CredentialsUpdateCallBuilder acl(final Optional<java.util.List<String>> acl) {
public UpdateCallBuilder acl(final Optional<java.util.List<String>> acl) {
this.acl = Objects.requireNonNull(acl, "acl is required");
return this;
}
@@ -532,13 +542,15 @@ public class Credentials {
/**
* Update attributes of an tunnel authtoken credential by ID
*
* See also <a href="https://ngrok.com/docs/api#api-credentials-update">https://ngrok.com/docs/api#api-credentials-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 CredentialsUpdateCallBuilder update(
public UpdateCallBuilder update(
final String id
) {
return new CredentialsUpdateCallBuilder(
return new UpdateCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointCircuitBreakerModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module">https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module</a>.
*/
public class EndpointCircuitBreakerModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointCircuitBreakerModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointCircuitBreakerModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointCircuitBreaker module = null;
private EndpointCircuitBreakerModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointCircuitBreakerModule {
* @param module the value of the module parameter as a {@link EndpointCircuitBreaker}
* @return the call builder instance
*/
public EndpointCircuitBreakerModuleReplaceCallBuilder module(final EndpointCircuitBreaker module) {
public ReplaceCallBuilder module(final EndpointCircuitBreaker module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointCircuitBreakerModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointCircuitBreaker}
* @return the call builder instance
*/
public EndpointCircuitBreakerModuleReplaceCallBuilder module(final Optional<EndpointCircuitBreaker> module) {
public ReplaceCallBuilder module(final Optional<EndpointCircuitBreaker> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointCircuitBreakerModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module-replace">https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointCircuitBreakerModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointCircuitBreakerModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointCircuitBreakerModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointCircuitBreakerModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointCircuitBreakerModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointCircuitBreakerModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module-get">https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointCircuitBreakerModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointCircuitBreakerModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointCircuitBreakerModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointCircuitBreakerModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointCircuitBreakerModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointCircuitBreakerModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module-delete">https://ngrok.com/docs/api#api-endpoint-circuit-breaker-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointCircuitBreakerModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointCircuitBreakerModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointCompressionModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-compression-module">https://ngrok.com/docs/api#api-endpoint-compression-module</a>.
*/
public class EndpointCompressionModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointCompressionModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointCompressionModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointCompression module = null;
private EndpointCompressionModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointCompressionModule {
* @param module the value of the module parameter as a {@link EndpointCompression}
* @return the call builder instance
*/
public EndpointCompressionModuleReplaceCallBuilder module(final EndpointCompression module) {
public ReplaceCallBuilder module(final EndpointCompression module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointCompressionModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointCompression}
* @return the call builder instance
*/
public EndpointCompressionModuleReplaceCallBuilder module(final Optional<EndpointCompression> module) {
public ReplaceCallBuilder module(final Optional<EndpointCompression> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointCompressionModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-compression-module-replace">https://ngrok.com/docs/api#api-endpoint-compression-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointCompressionModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointCompressionModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointCompressionModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointCompressionModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointCompressionModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointCompressionModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-compression-module-get">https://ngrok.com/docs/api#api-endpoint-compression-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointCompressionModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointCompressionModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointCompressionModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointCompressionModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointCompressionModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointCompressionModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-compression-module-delete">https://ngrok.com/docs/api#api-endpoint-compression-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointCompressionModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointCompressionModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -15,6 +15,8 @@ import java.util.stream.Stream;
* Endpoint Configurations are a reusable group of modules that encapsulate how
* traffic to a domain or address is handled. Endpoint configurations are only
* applied to Domains and TCP Addresses they have been attached to.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-configurations">https://ngrok.com/docs/api#api-endpoint-configurations</a>.
*/
public class EndpointConfigurations {
private final NgrokApiClient apiClient;
@@ -31,7 +33,7 @@ public class EndpointConfigurations {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class EndpointConfigurationsCreateCallBuilder {
public class CreateCallBuilder {
private String type = "";
private String description = "";
private String metadata = "";
@@ -48,7 +50,7 @@ public class EndpointConfigurations {
private Optional<EndpointSamlMutate> saml = Optional.empty();
private Optional<EndpointOidc> oidc = Optional.empty();
private EndpointConfigurationsCreateCallBuilder(
private CreateCallBuilder(
) {
}
@@ -59,7 +61,7 @@ public class EndpointConfigurations {
* @param type the value of the type parameter as a {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder type(final String type) {
public CreateCallBuilder type(final String type) {
this.type = Objects.requireNonNull(type, "type is required");
return this;
}
@@ -71,7 +73,7 @@ public class EndpointConfigurations {
* @param type the value of the type parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder type(final Optional<String> type) {
public CreateCallBuilder type(final Optional<String> type) {
this.type = Objects.requireNonNull(type, "type is required").orElse("");
return this;
}
@@ -83,7 +85,7 @@ public class EndpointConfigurations {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder description(final String description) {
public CreateCallBuilder description(final String description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -95,7 +97,7 @@ public class EndpointConfigurations {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder description(final Optional<String> description) {
public CreateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required").orElse("");
return this;
}
@@ -107,7 +109,7 @@ public class EndpointConfigurations {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder metadata(final String metadata) {
public CreateCallBuilder metadata(final String metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -119,7 +121,7 @@ public class EndpointConfigurations {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder metadata(final Optional<String> metadata) {
public CreateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required").orElse("");
return this;
}
@@ -130,7 +132,7 @@ public class EndpointConfigurations {
* @param circuitBreaker the value of the circuit_breaker parameter as a {@link EndpointCircuitBreaker}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder circuitBreaker(final EndpointCircuitBreaker circuitBreaker) {
public CreateCallBuilder circuitBreaker(final EndpointCircuitBreaker circuitBreaker) {
this.circuitBreaker = Optional.ofNullable(circuitBreaker);
return this;
}
@@ -141,7 +143,7 @@ public class EndpointConfigurations {
* @param circuitBreaker the value of the circuit_breaker parameter as an {@link Optional} of {@link EndpointCircuitBreaker}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder circuitBreaker(final Optional<EndpointCircuitBreaker> circuitBreaker) {
public CreateCallBuilder circuitBreaker(final Optional<EndpointCircuitBreaker> circuitBreaker) {
this.circuitBreaker = Objects.requireNonNull(circuitBreaker, "circuitBreaker is required");
return this;
}
@@ -152,7 +154,7 @@ public class EndpointConfigurations {
* @param compression the value of the compression parameter as a {@link EndpointCompression}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder compression(final EndpointCompression compression) {
public CreateCallBuilder compression(final EndpointCompression compression) {
this.compression = Optional.ofNullable(compression);
return this;
}
@@ -163,7 +165,7 @@ public class EndpointConfigurations {
* @param compression the value of the compression parameter as an {@link Optional} of {@link EndpointCompression}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder compression(final Optional<EndpointCompression> compression) {
public CreateCallBuilder compression(final Optional<EndpointCompression> compression) {
this.compression = Objects.requireNonNull(compression, "compression is required");
return this;
}
@@ -174,7 +176,7 @@ public class EndpointConfigurations {
* @param requestHeaders the value of the request_headers parameter as a {@link EndpointRequestHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder requestHeaders(final EndpointRequestHeaders requestHeaders) {
public CreateCallBuilder requestHeaders(final EndpointRequestHeaders requestHeaders) {
this.requestHeaders = Optional.ofNullable(requestHeaders);
return this;
}
@@ -185,7 +187,7 @@ public class EndpointConfigurations {
* @param requestHeaders the value of the request_headers parameter as an {@link Optional} of {@link EndpointRequestHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder requestHeaders(final Optional<EndpointRequestHeaders> requestHeaders) {
public CreateCallBuilder requestHeaders(final Optional<EndpointRequestHeaders> requestHeaders) {
this.requestHeaders = Objects.requireNonNull(requestHeaders, "requestHeaders is required");
return this;
}
@@ -196,7 +198,7 @@ public class EndpointConfigurations {
* @param responseHeaders the value of the response_headers parameter as a {@link EndpointResponseHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder responseHeaders(final EndpointResponseHeaders responseHeaders) {
public CreateCallBuilder responseHeaders(final EndpointResponseHeaders responseHeaders) {
this.responseHeaders = Optional.ofNullable(responseHeaders);
return this;
}
@@ -207,7 +209,7 @@ public class EndpointConfigurations {
* @param responseHeaders the value of the response_headers parameter as an {@link Optional} of {@link EndpointResponseHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder responseHeaders(final Optional<EndpointResponseHeaders> responseHeaders) {
public CreateCallBuilder responseHeaders(final Optional<EndpointResponseHeaders> responseHeaders) {
this.responseHeaders = Objects.requireNonNull(responseHeaders, "responseHeaders is required");
return this;
}
@@ -218,7 +220,7 @@ public class EndpointConfigurations {
* @param ipPolicy the value of the ip_policy parameter as a {@link EndpointIpPolicyMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder ipPolicy(final EndpointIpPolicyMutate ipPolicy) {
public CreateCallBuilder ipPolicy(final EndpointIpPolicyMutate ipPolicy) {
this.ipPolicy = Optional.ofNullable(ipPolicy);
return this;
}
@@ -229,7 +231,7 @@ public class EndpointConfigurations {
* @param ipPolicy the value of the ip_policy parameter as an {@link Optional} of {@link EndpointIpPolicyMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder ipPolicy(final Optional<EndpointIpPolicyMutate> ipPolicy) {
public CreateCallBuilder ipPolicy(final Optional<EndpointIpPolicyMutate> ipPolicy) {
this.ipPolicy = Objects.requireNonNull(ipPolicy, "ipPolicy is required");
return this;
}
@@ -240,7 +242,7 @@ public class EndpointConfigurations {
* @param mutualTls the value of the mutual_tls parameter as a {@link EndpointMutualTlsMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder mutualTls(final EndpointMutualTlsMutate mutualTls) {
public CreateCallBuilder mutualTls(final EndpointMutualTlsMutate mutualTls) {
this.mutualTls = Optional.ofNullable(mutualTls);
return this;
}
@@ -251,7 +253,7 @@ public class EndpointConfigurations {
* @param mutualTls the value of the mutual_tls parameter as an {@link Optional} of {@link EndpointMutualTlsMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder mutualTls(final Optional<EndpointMutualTlsMutate> mutualTls) {
public CreateCallBuilder mutualTls(final Optional<EndpointMutualTlsMutate> mutualTls) {
this.mutualTls = Objects.requireNonNull(mutualTls, "mutualTls is required");
return this;
}
@@ -262,7 +264,7 @@ public class EndpointConfigurations {
* @param tlsTermination the value of the tls_termination parameter as a {@link EndpointTlsTermination}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder tlsTermination(final EndpointTlsTermination tlsTermination) {
public CreateCallBuilder tlsTermination(final EndpointTlsTermination tlsTermination) {
this.tlsTermination = Optional.ofNullable(tlsTermination);
return this;
}
@@ -273,7 +275,7 @@ public class EndpointConfigurations {
* @param tlsTermination the value of the tls_termination parameter as an {@link Optional} of {@link EndpointTlsTermination}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder tlsTermination(final Optional<EndpointTlsTermination> tlsTermination) {
public CreateCallBuilder tlsTermination(final Optional<EndpointTlsTermination> tlsTermination) {
this.tlsTermination = Objects.requireNonNull(tlsTermination, "tlsTermination is required");
return this;
}
@@ -284,7 +286,7 @@ public class EndpointConfigurations {
* @param webhookValidation the value of the webhook_validation parameter as a {@link EndpointWebhookValidation}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder webhookValidation(final EndpointWebhookValidation webhookValidation) {
public CreateCallBuilder webhookValidation(final EndpointWebhookValidation webhookValidation) {
this.webhookValidation = Optional.ofNullable(webhookValidation);
return this;
}
@@ -295,7 +297,7 @@ public class EndpointConfigurations {
* @param webhookValidation the value of the webhook_validation parameter as an {@link Optional} of {@link EndpointWebhookValidation}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder webhookValidation(final Optional<EndpointWebhookValidation> webhookValidation) {
public CreateCallBuilder webhookValidation(final Optional<EndpointWebhookValidation> webhookValidation) {
this.webhookValidation = Objects.requireNonNull(webhookValidation, "webhookValidation is required");
return this;
}
@@ -306,7 +308,7 @@ public class EndpointConfigurations {
* @param oauth the value of the oauth parameter as a {@link EndpointOAuth}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder oauth(final EndpointOAuth oauth) {
public CreateCallBuilder oauth(final EndpointOAuth oauth) {
this.oauth = Optional.ofNullable(oauth);
return this;
}
@@ -317,7 +319,7 @@ public class EndpointConfigurations {
* @param oauth the value of the oauth parameter as an {@link Optional} of {@link EndpointOAuth}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder oauth(final Optional<EndpointOAuth> oauth) {
public CreateCallBuilder oauth(final Optional<EndpointOAuth> oauth) {
this.oauth = Objects.requireNonNull(oauth, "oauth is required");
return this;
}
@@ -328,7 +330,7 @@ public class EndpointConfigurations {
* @param logging the value of the logging parameter as a {@link EndpointLoggingMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder logging(final EndpointLoggingMutate logging) {
public CreateCallBuilder logging(final EndpointLoggingMutate logging) {
this.logging = Optional.ofNullable(logging);
return this;
}
@@ -339,7 +341,7 @@ public class EndpointConfigurations {
* @param logging the value of the logging parameter as an {@link Optional} of {@link EndpointLoggingMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder logging(final Optional<EndpointLoggingMutate> logging) {
public CreateCallBuilder logging(final Optional<EndpointLoggingMutate> logging) {
this.logging = Objects.requireNonNull(logging, "logging is required");
return this;
}
@@ -350,7 +352,7 @@ public class EndpointConfigurations {
* @param saml the value of the saml parameter as a {@link EndpointSamlMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder saml(final EndpointSamlMutate saml) {
public CreateCallBuilder saml(final EndpointSamlMutate saml) {
this.saml = Optional.ofNullable(saml);
return this;
}
@@ -361,7 +363,7 @@ public class EndpointConfigurations {
* @param saml the value of the saml parameter as an {@link Optional} of {@link EndpointSamlMutate}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder saml(final Optional<EndpointSamlMutate> saml) {
public CreateCallBuilder saml(final Optional<EndpointSamlMutate> saml) {
this.saml = Objects.requireNonNull(saml, "saml is required");
return this;
}
@@ -372,7 +374,7 @@ public class EndpointConfigurations {
* @param oidc the value of the oidc parameter as a {@link EndpointOidc}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder oidc(final EndpointOidc oidc) {
public CreateCallBuilder oidc(final EndpointOidc oidc) {
this.oidc = Optional.ofNullable(oidc);
return this;
}
@@ -383,7 +385,7 @@ public class EndpointConfigurations {
* @param oidc the value of the oidc parameter as an {@link Optional} of {@link EndpointOidc}
* @return the call builder instance
*/
public EndpointConfigurationsCreateCallBuilder oidc(final Optional<EndpointOidc> oidc) {
public CreateCallBuilder oidc(final Optional<EndpointOidc> oidc) {
this.oidc = Objects.requireNonNull(oidc, "oidc is required");
return this;
}
@@ -437,21 +439,23 @@ public class EndpointConfigurations {
/**
* Create a new endpoint configuration
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-configurations-create">https://ngrok.com/docs/api#api-endpoint-configurations-create</a>.
*
* @return a call builder for this API call
*/
public EndpointConfigurationsCreateCallBuilder create(
public CreateCallBuilder create(
) {
return new EndpointConfigurationsCreateCallBuilder(
return new CreateCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointConfigurationsDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointConfigurationsDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -490,13 +494,15 @@ public class EndpointConfigurations {
* Delete an endpoint configuration. This operation will fail if the endpoint
* configuration is still referenced by any reserved domain or reserved address.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-configurations-delete">https://ngrok.com/docs/api#api-endpoint-configurations-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointConfigurationsDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointConfigurationsDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -504,10 +510,10 @@ public class EndpointConfigurations {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointConfigurationsGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointConfigurationsGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -546,13 +552,15 @@ public class EndpointConfigurations {
/**
* Returns detailed information about an endpoint configuration
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-configurations-get">https://ngrok.com/docs/api#api-endpoint-configurations-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointConfigurationsGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointConfigurationsGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -560,11 +568,11 @@ public class EndpointConfigurations {
/**
* A builder object encapsulating state for an unsent List API call.
*/
public class EndpointConfigurationsListCallBuilder {
public class ListCallBuilder {
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private EndpointConfigurationsListCallBuilder(
private ListCallBuilder(
) {
}
@@ -574,7 +582,7 @@ public class EndpointConfigurations {
* @param beforeId the value of the before_id parameter as a {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsListCallBuilder beforeId(final String beforeId) {
public ListCallBuilder beforeId(final String beforeId) {
this.beforeId = Optional.ofNullable(beforeId);
return this;
}
@@ -585,7 +593,7 @@ public class EndpointConfigurations {
* @param beforeId the value of the before_id parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsListCallBuilder beforeId(final Optional<String> beforeId) {
public ListCallBuilder beforeId(final Optional<String> beforeId) {
this.beforeId = Objects.requireNonNull(beforeId, "beforeId is required");
return this;
}
@@ -596,7 +604,7 @@ public class EndpointConfigurations {
* @param limit the value of the limit parameter as a {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsListCallBuilder limit(final String limit) {
public ListCallBuilder limit(final String limit) {
this.limit = Optional.ofNullable(limit);
return this;
}
@@ -607,7 +615,7 @@ public class EndpointConfigurations {
* @param limit the value of the limit parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsListCallBuilder limit(final Optional<String> limit) {
public ListCallBuilder limit(final Optional<String> limit) {
this.limit = Objects.requireNonNull(limit, "limit is required");
return this;
}
@@ -648,18 +656,20 @@ public class EndpointConfigurations {
/**
* Returns a list of all endpoint configurations on this account
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-configurations-list">https://ngrok.com/docs/api#api-endpoint-configurations-list</a>.
*
* @return a call builder for this API call
*/
public EndpointConfigurationsListCallBuilder list(
public ListCallBuilder list(
) {
return new EndpointConfigurationsListCallBuilder(
return new ListCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Update API call.
*/
public class EndpointConfigurationsUpdateCallBuilder {
public class UpdateCallBuilder {
private final String id;
private Optional<String> description = Optional.empty();
private Optional<String> metadata = Optional.empty();
@@ -676,7 +686,7 @@ public class EndpointConfigurations {
private Optional<EndpointSamlMutate> saml = Optional.empty();
private Optional<EndpointOidc> oidc = Optional.empty();
private EndpointConfigurationsUpdateCallBuilder(
private UpdateCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -689,7 +699,7 @@ public class EndpointConfigurations {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder description(final String description) {
public UpdateCallBuilder description(final String description) {
this.description = Optional.ofNullable(description);
return this;
}
@@ -701,7 +711,7 @@ public class EndpointConfigurations {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder description(final Optional<String> description) {
public UpdateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -713,7 +723,7 @@ public class EndpointConfigurations {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder metadata(final String metadata) {
public UpdateCallBuilder metadata(final String metadata) {
this.metadata = Optional.ofNullable(metadata);
return this;
}
@@ -725,7 +735,7 @@ public class EndpointConfigurations {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder metadata(final Optional<String> metadata) {
public UpdateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -736,7 +746,7 @@ public class EndpointConfigurations {
* @param circuitBreaker the value of the circuit_breaker parameter as a {@link EndpointCircuitBreaker}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder circuitBreaker(final EndpointCircuitBreaker circuitBreaker) {
public UpdateCallBuilder circuitBreaker(final EndpointCircuitBreaker circuitBreaker) {
this.circuitBreaker = Optional.ofNullable(circuitBreaker);
return this;
}
@@ -747,7 +757,7 @@ public class EndpointConfigurations {
* @param circuitBreaker the value of the circuit_breaker parameter as an {@link Optional} of {@link EndpointCircuitBreaker}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder circuitBreaker(final Optional<EndpointCircuitBreaker> circuitBreaker) {
public UpdateCallBuilder circuitBreaker(final Optional<EndpointCircuitBreaker> circuitBreaker) {
this.circuitBreaker = Objects.requireNonNull(circuitBreaker, "circuitBreaker is required");
return this;
}
@@ -758,7 +768,7 @@ public class EndpointConfigurations {
* @param compression the value of the compression parameter as a {@link EndpointCompression}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder compression(final EndpointCompression compression) {
public UpdateCallBuilder compression(final EndpointCompression compression) {
this.compression = Optional.ofNullable(compression);
return this;
}
@@ -769,7 +779,7 @@ public class EndpointConfigurations {
* @param compression the value of the compression parameter as an {@link Optional} of {@link EndpointCompression}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder compression(final Optional<EndpointCompression> compression) {
public UpdateCallBuilder compression(final Optional<EndpointCompression> compression) {
this.compression = Objects.requireNonNull(compression, "compression is required");
return this;
}
@@ -780,7 +790,7 @@ public class EndpointConfigurations {
* @param requestHeaders the value of the request_headers parameter as a {@link EndpointRequestHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder requestHeaders(final EndpointRequestHeaders requestHeaders) {
public UpdateCallBuilder requestHeaders(final EndpointRequestHeaders requestHeaders) {
this.requestHeaders = Optional.ofNullable(requestHeaders);
return this;
}
@@ -791,7 +801,7 @@ public class EndpointConfigurations {
* @param requestHeaders the value of the request_headers parameter as an {@link Optional} of {@link EndpointRequestHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder requestHeaders(final Optional<EndpointRequestHeaders> requestHeaders) {
public UpdateCallBuilder requestHeaders(final Optional<EndpointRequestHeaders> requestHeaders) {
this.requestHeaders = Objects.requireNonNull(requestHeaders, "requestHeaders is required");
return this;
}
@@ -802,7 +812,7 @@ public class EndpointConfigurations {
* @param responseHeaders the value of the response_headers parameter as a {@link EndpointResponseHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder responseHeaders(final EndpointResponseHeaders responseHeaders) {
public UpdateCallBuilder responseHeaders(final EndpointResponseHeaders responseHeaders) {
this.responseHeaders = Optional.ofNullable(responseHeaders);
return this;
}
@@ -813,7 +823,7 @@ public class EndpointConfigurations {
* @param responseHeaders the value of the response_headers parameter as an {@link Optional} of {@link EndpointResponseHeaders}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder responseHeaders(final Optional<EndpointResponseHeaders> responseHeaders) {
public UpdateCallBuilder responseHeaders(final Optional<EndpointResponseHeaders> responseHeaders) {
this.responseHeaders = Objects.requireNonNull(responseHeaders, "responseHeaders is required");
return this;
}
@@ -824,7 +834,7 @@ public class EndpointConfigurations {
* @param ipPolicy the value of the ip_policy parameter as a {@link EndpointIpPolicyMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder ipPolicy(final EndpointIpPolicyMutate ipPolicy) {
public UpdateCallBuilder ipPolicy(final EndpointIpPolicyMutate ipPolicy) {
this.ipPolicy = Optional.ofNullable(ipPolicy);
return this;
}
@@ -835,7 +845,7 @@ public class EndpointConfigurations {
* @param ipPolicy the value of the ip_policy parameter as an {@link Optional} of {@link EndpointIpPolicyMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder ipPolicy(final Optional<EndpointIpPolicyMutate> ipPolicy) {
public UpdateCallBuilder ipPolicy(final Optional<EndpointIpPolicyMutate> ipPolicy) {
this.ipPolicy = Objects.requireNonNull(ipPolicy, "ipPolicy is required");
return this;
}
@@ -846,7 +856,7 @@ public class EndpointConfigurations {
* @param mutualTls the value of the mutual_tls parameter as a {@link EndpointMutualTlsMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder mutualTls(final EndpointMutualTlsMutate mutualTls) {
public UpdateCallBuilder mutualTls(final EndpointMutualTlsMutate mutualTls) {
this.mutualTls = Optional.ofNullable(mutualTls);
return this;
}
@@ -857,7 +867,7 @@ public class EndpointConfigurations {
* @param mutualTls the value of the mutual_tls parameter as an {@link Optional} of {@link EndpointMutualTlsMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder mutualTls(final Optional<EndpointMutualTlsMutate> mutualTls) {
public UpdateCallBuilder mutualTls(final Optional<EndpointMutualTlsMutate> mutualTls) {
this.mutualTls = Objects.requireNonNull(mutualTls, "mutualTls is required");
return this;
}
@@ -868,7 +878,7 @@ public class EndpointConfigurations {
* @param tlsTermination the value of the tls_termination parameter as a {@link EndpointTlsTermination}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder tlsTermination(final EndpointTlsTermination tlsTermination) {
public UpdateCallBuilder tlsTermination(final EndpointTlsTermination tlsTermination) {
this.tlsTermination = Optional.ofNullable(tlsTermination);
return this;
}
@@ -879,7 +889,7 @@ public class EndpointConfigurations {
* @param tlsTermination the value of the tls_termination parameter as an {@link Optional} of {@link EndpointTlsTermination}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder tlsTermination(final Optional<EndpointTlsTermination> tlsTermination) {
public UpdateCallBuilder tlsTermination(final Optional<EndpointTlsTermination> tlsTermination) {
this.tlsTermination = Objects.requireNonNull(tlsTermination, "tlsTermination is required");
return this;
}
@@ -890,7 +900,7 @@ public class EndpointConfigurations {
* @param webhookValidation the value of the webhook_validation parameter as a {@link EndpointWebhookValidation}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder webhookValidation(final EndpointWebhookValidation webhookValidation) {
public UpdateCallBuilder webhookValidation(final EndpointWebhookValidation webhookValidation) {
this.webhookValidation = Optional.ofNullable(webhookValidation);
return this;
}
@@ -901,7 +911,7 @@ public class EndpointConfigurations {
* @param webhookValidation the value of the webhook_validation parameter as an {@link Optional} of {@link EndpointWebhookValidation}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder webhookValidation(final Optional<EndpointWebhookValidation> webhookValidation) {
public UpdateCallBuilder webhookValidation(final Optional<EndpointWebhookValidation> webhookValidation) {
this.webhookValidation = Objects.requireNonNull(webhookValidation, "webhookValidation is required");
return this;
}
@@ -912,7 +922,7 @@ public class EndpointConfigurations {
* @param oauth the value of the oauth parameter as a {@link EndpointOAuth}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder oauth(final EndpointOAuth oauth) {
public UpdateCallBuilder oauth(final EndpointOAuth oauth) {
this.oauth = Optional.ofNullable(oauth);
return this;
}
@@ -923,7 +933,7 @@ public class EndpointConfigurations {
* @param oauth the value of the oauth parameter as an {@link Optional} of {@link EndpointOAuth}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder oauth(final Optional<EndpointOAuth> oauth) {
public UpdateCallBuilder oauth(final Optional<EndpointOAuth> oauth) {
this.oauth = Objects.requireNonNull(oauth, "oauth is required");
return this;
}
@@ -934,7 +944,7 @@ public class EndpointConfigurations {
* @param logging the value of the logging parameter as a {@link EndpointLoggingMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder logging(final EndpointLoggingMutate logging) {
public UpdateCallBuilder logging(final EndpointLoggingMutate logging) {
this.logging = Optional.ofNullable(logging);
return this;
}
@@ -945,7 +955,7 @@ public class EndpointConfigurations {
* @param logging the value of the logging parameter as an {@link Optional} of {@link EndpointLoggingMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder logging(final Optional<EndpointLoggingMutate> logging) {
public UpdateCallBuilder logging(final Optional<EndpointLoggingMutate> logging) {
this.logging = Objects.requireNonNull(logging, "logging is required");
return this;
}
@@ -956,7 +966,7 @@ public class EndpointConfigurations {
* @param saml the value of the saml parameter as a {@link EndpointSamlMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder saml(final EndpointSamlMutate saml) {
public UpdateCallBuilder saml(final EndpointSamlMutate saml) {
this.saml = Optional.ofNullable(saml);
return this;
}
@@ -967,7 +977,7 @@ public class EndpointConfigurations {
* @param saml the value of the saml parameter as an {@link Optional} of {@link EndpointSamlMutate}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder saml(final Optional<EndpointSamlMutate> saml) {
public UpdateCallBuilder saml(final Optional<EndpointSamlMutate> saml) {
this.saml = Objects.requireNonNull(saml, "saml is required");
return this;
}
@@ -978,7 +988,7 @@ public class EndpointConfigurations {
* @param oidc the value of the oidc parameter as a {@link EndpointOidc}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder oidc(final EndpointOidc oidc) {
public UpdateCallBuilder oidc(final EndpointOidc oidc) {
this.oidc = Optional.ofNullable(oidc);
return this;
}
@@ -989,7 +999,7 @@ public class EndpointConfigurations {
* @param oidc the value of the oidc parameter as an {@link Optional} of {@link EndpointOidc}
* @return the call builder instance
*/
public EndpointConfigurationsUpdateCallBuilder oidc(final Optional<EndpointOidc> oidc) {
public UpdateCallBuilder oidc(final Optional<EndpointOidc> oidc) {
this.oidc = Objects.requireNonNull(oidc, "oidc is required");
return this;
}
@@ -1045,13 +1055,15 @@ public class EndpointConfigurations {
* will completely replace the existing value. There is no way to delete an
* existing module via this API, instead use the delete module API.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-configurations-update">https://ngrok.com/docs/api#api-endpoint-configurations-update</a>.
*
* @param id unique identifier of this endpoint configuration
* @return a call builder for this API call
*/
public EndpointConfigurationsUpdateCallBuilder update(
public UpdateCallBuilder update(
final String id
) {
return new EndpointConfigurationsUpdateCallBuilder(
return new UpdateCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointIpPolicyModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-ip-policy-module">https://ngrok.com/docs/api#api-endpoint-ip-policy-module</a>.
*/
public class EndpointIpPolicyModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointIpPolicyModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointIpPolicyModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointIpPolicyMutate module = null;
private EndpointIpPolicyModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointIpPolicyModule {
* @param module the value of the module parameter as a {@link EndpointIpPolicyMutate}
* @return the call builder instance
*/
public EndpointIpPolicyModuleReplaceCallBuilder module(final EndpointIpPolicyMutate module) {
public ReplaceCallBuilder module(final EndpointIpPolicyMutate module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointIpPolicyModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointIpPolicyMutate}
* @return the call builder instance
*/
public EndpointIpPolicyModuleReplaceCallBuilder module(final Optional<EndpointIpPolicyMutate> module) {
public ReplaceCallBuilder module(final Optional<EndpointIpPolicyMutate> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointIpPolicyModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-ip-policy-module-replace">https://ngrok.com/docs/api#api-endpoint-ip-policy-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointIpPolicyModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointIpPolicyModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointIpPolicyModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointIpPolicyModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointIpPolicyModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointIpPolicyModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-ip-policy-module-get">https://ngrok.com/docs/api#api-endpoint-ip-policy-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointIpPolicyModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointIpPolicyModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointIpPolicyModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointIpPolicyModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointIpPolicyModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointIpPolicyModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-ip-policy-module-delete">https://ngrok.com/docs/api#api-endpoint-ip-policy-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointIpPolicyModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointIpPolicyModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointLoggingModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-logging-module">https://ngrok.com/docs/api#api-endpoint-logging-module</a>.
*/
public class EndpointLoggingModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointLoggingModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointLoggingModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointLoggingMutate module = null;
private EndpointLoggingModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointLoggingModule {
* @param module the value of the module parameter as a {@link EndpointLoggingMutate}
* @return the call builder instance
*/
public EndpointLoggingModuleReplaceCallBuilder module(final EndpointLoggingMutate module) {
public ReplaceCallBuilder module(final EndpointLoggingMutate module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointLoggingModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointLoggingMutate}
* @return the call builder instance
*/
public EndpointLoggingModuleReplaceCallBuilder module(final Optional<EndpointLoggingMutate> module) {
public ReplaceCallBuilder module(final Optional<EndpointLoggingMutate> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointLoggingModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-logging-module-replace">https://ngrok.com/docs/api#api-endpoint-logging-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointLoggingModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointLoggingModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointLoggingModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointLoggingModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointLoggingModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointLoggingModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-logging-module-get">https://ngrok.com/docs/api#api-endpoint-logging-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointLoggingModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointLoggingModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointLoggingModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointLoggingModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointLoggingModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointLoggingModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-logging-module-delete">https://ngrok.com/docs/api#api-endpoint-logging-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointLoggingModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointLoggingModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointMutualTlsModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-mutual-tls-module">https://ngrok.com/docs/api#api-endpoint-mutual-tls-module</a>.
*/
public class EndpointMutualTlsModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointMutualTlsModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointMutualTlsModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointMutualTlsMutate module = null;
private EndpointMutualTlsModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointMutualTlsModule {
* @param module the value of the module parameter as a {@link EndpointMutualTlsMutate}
* @return the call builder instance
*/
public EndpointMutualTlsModuleReplaceCallBuilder module(final EndpointMutualTlsMutate module) {
public ReplaceCallBuilder module(final EndpointMutualTlsMutate module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointMutualTlsModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointMutualTlsMutate}
* @return the call builder instance
*/
public EndpointMutualTlsModuleReplaceCallBuilder module(final Optional<EndpointMutualTlsMutate> module) {
public ReplaceCallBuilder module(final Optional<EndpointMutualTlsMutate> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointMutualTlsModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-mutual-tls-module-replace">https://ngrok.com/docs/api#api-endpoint-mutual-tls-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointMutualTlsModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointMutualTlsModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointMutualTlsModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointMutualTlsModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointMutualTlsModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointMutualTlsModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-mutual-tls-module-get">https://ngrok.com/docs/api#api-endpoint-mutual-tls-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointMutualTlsModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointMutualTlsModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointMutualTlsModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointMutualTlsModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointMutualTlsModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointMutualTlsModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-mutual-tls-module-delete">https://ngrok.com/docs/api#api-endpoint-mutual-tls-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointMutualTlsModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointMutualTlsModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointOAuthModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-o-auth-module">https://ngrok.com/docs/api#api-endpoint-o-auth-module</a>.
*/
public class EndpointOAuthModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointOAuthModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointOAuthModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointOAuth module = null;
private EndpointOAuthModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointOAuthModule {
* @param module the value of the module parameter as a {@link EndpointOAuth}
* @return the call builder instance
*/
public EndpointOAuthModuleReplaceCallBuilder module(final EndpointOAuth module) {
public ReplaceCallBuilder module(final EndpointOAuth module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointOAuthModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointOAuth}
* @return the call builder instance
*/
public EndpointOAuthModuleReplaceCallBuilder module(final Optional<EndpointOAuth> module) {
public ReplaceCallBuilder module(final Optional<EndpointOAuth> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointOAuthModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-o-auth-module-replace">https://ngrok.com/docs/api#api-endpoint-o-auth-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointOAuthModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointOAuthModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointOAuthModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointOAuthModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointOAuthModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointOAuthModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-o-auth-module-get">https://ngrok.com/docs/api#api-endpoint-o-auth-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointOAuthModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointOAuthModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointOAuthModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointOAuthModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointOAuthModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointOAuthModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-o-auth-module-delete">https://ngrok.com/docs/api#api-endpoint-o-auth-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointOAuthModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointOAuthModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointOidcModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-oidc-module">https://ngrok.com/docs/api#api-endpoint-oidc-module</a>.
*/
public class EndpointOidcModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointOidcModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointOidcModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointOidc module = null;
private EndpointOidcModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointOidcModule {
* @param module the value of the module parameter as a {@link EndpointOidc}
* @return the call builder instance
*/
public EndpointOidcModuleReplaceCallBuilder module(final EndpointOidc module) {
public ReplaceCallBuilder module(final EndpointOidc module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointOidcModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointOidc}
* @return the call builder instance
*/
public EndpointOidcModuleReplaceCallBuilder module(final Optional<EndpointOidc> module) {
public ReplaceCallBuilder module(final Optional<EndpointOidc> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointOidcModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-oidc-module-replace">https://ngrok.com/docs/api#api-endpoint-oidc-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointOidcModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointOidcModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointOidcModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointOidcModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointOidcModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointOidcModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-oidc-module-get">https://ngrok.com/docs/api#api-endpoint-oidc-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointOidcModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointOidcModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointOidcModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointOidcModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointOidcModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointOidcModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-oidc-module-delete">https://ngrok.com/docs/api#api-endpoint-oidc-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointOidcModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointOidcModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointRequestHeadersModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-request-headers-module">https://ngrok.com/docs/api#api-endpoint-request-headers-module</a>.
*/
public class EndpointRequestHeadersModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointRequestHeadersModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointRequestHeadersModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointRequestHeaders module = null;
private EndpointRequestHeadersModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointRequestHeadersModule {
* @param module the value of the module parameter as a {@link EndpointRequestHeaders}
* @return the call builder instance
*/
public EndpointRequestHeadersModuleReplaceCallBuilder module(final EndpointRequestHeaders module) {
public ReplaceCallBuilder module(final EndpointRequestHeaders module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointRequestHeadersModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointRequestHeaders}
* @return the call builder instance
*/
public EndpointRequestHeadersModuleReplaceCallBuilder module(final Optional<EndpointRequestHeaders> module) {
public ReplaceCallBuilder module(final Optional<EndpointRequestHeaders> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointRequestHeadersModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-request-headers-module-replace">https://ngrok.com/docs/api#api-endpoint-request-headers-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointRequestHeadersModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointRequestHeadersModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointRequestHeadersModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointRequestHeadersModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointRequestHeadersModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointRequestHeadersModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-request-headers-module-get">https://ngrok.com/docs/api#api-endpoint-request-headers-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointRequestHeadersModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointRequestHeadersModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointRequestHeadersModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointRequestHeadersModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointRequestHeadersModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointRequestHeadersModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-request-headers-module-delete">https://ngrok.com/docs/api#api-endpoint-request-headers-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointRequestHeadersModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointRequestHeadersModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointResponseHeadersModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-response-headers-module">https://ngrok.com/docs/api#api-endpoint-response-headers-module</a>.
*/
public class EndpointResponseHeadersModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointResponseHeadersModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointResponseHeadersModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointResponseHeaders module = null;
private EndpointResponseHeadersModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointResponseHeadersModule {
* @param module the value of the module parameter as a {@link EndpointResponseHeaders}
* @return the call builder instance
*/
public EndpointResponseHeadersModuleReplaceCallBuilder module(final EndpointResponseHeaders module) {
public ReplaceCallBuilder module(final EndpointResponseHeaders module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointResponseHeadersModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointResponseHeaders}
* @return the call builder instance
*/
public EndpointResponseHeadersModuleReplaceCallBuilder module(final Optional<EndpointResponseHeaders> module) {
public ReplaceCallBuilder module(final Optional<EndpointResponseHeaders> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointResponseHeadersModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-response-headers-module-replace">https://ngrok.com/docs/api#api-endpoint-response-headers-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointResponseHeadersModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointResponseHeadersModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointResponseHeadersModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointResponseHeadersModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointResponseHeadersModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointResponseHeadersModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-response-headers-module-get">https://ngrok.com/docs/api#api-endpoint-response-headers-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointResponseHeadersModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointResponseHeadersModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointResponseHeadersModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointResponseHeadersModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointResponseHeadersModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointResponseHeadersModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-response-headers-module-delete">https://ngrok.com/docs/api#api-endpoint-response-headers-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointResponseHeadersModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointResponseHeadersModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointSamlModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-saml-module">https://ngrok.com/docs/api#api-endpoint-saml-module</a>.
*/
public class EndpointSamlModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointSamlModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointSamlModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointSamlMutate module = null;
private EndpointSamlModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointSamlModule {
* @param module the value of the module parameter as a {@link EndpointSamlMutate}
* @return the call builder instance
*/
public EndpointSamlModuleReplaceCallBuilder module(final EndpointSamlMutate module) {
public ReplaceCallBuilder module(final EndpointSamlMutate module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointSamlModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointSamlMutate}
* @return the call builder instance
*/
public EndpointSamlModuleReplaceCallBuilder module(final Optional<EndpointSamlMutate> module) {
public ReplaceCallBuilder module(final Optional<EndpointSamlMutate> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointSamlModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-saml-module-replace">https://ngrok.com/docs/api#api-endpoint-saml-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointSamlModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointSamlModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointSamlModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointSamlModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointSamlModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointSamlModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-saml-module-get">https://ngrok.com/docs/api#api-endpoint-saml-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointSamlModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointSamlModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointSamlModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointSamlModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointSamlModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointSamlModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-saml-module-delete">https://ngrok.com/docs/api#api-endpoint-saml-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointSamlModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointSamlModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointTlsTerminationModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-tls-termination-module">https://ngrok.com/docs/api#api-endpoint-tls-termination-module</a>.
*/
public class EndpointTlsTerminationModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointTlsTerminationModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointTlsTerminationModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointTlsTermination module = null;
private EndpointTlsTerminationModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointTlsTerminationModule {
* @param module the value of the module parameter as a {@link EndpointTlsTermination}
* @return the call builder instance
*/
public EndpointTlsTerminationModuleReplaceCallBuilder module(final EndpointTlsTermination module) {
public ReplaceCallBuilder module(final EndpointTlsTermination module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointTlsTerminationModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointTlsTermination}
* @return the call builder instance
*/
public EndpointTlsTerminationModuleReplaceCallBuilder module(final Optional<EndpointTlsTermination> module) {
public ReplaceCallBuilder module(final Optional<EndpointTlsTermination> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointTlsTerminationModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-tls-termination-module-replace">https://ngrok.com/docs/api#api-endpoint-tls-termination-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointTlsTerminationModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointTlsTerminationModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointTlsTerminationModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointTlsTerminationModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointTlsTerminationModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointTlsTerminationModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-tls-termination-module-get">https://ngrok.com/docs/api#api-endpoint-tls-termination-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointTlsTerminationModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointTlsTerminationModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointTlsTerminationModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointTlsTerminationModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointTlsTerminationModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointTlsTerminationModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-tls-termination-module-delete">https://ngrok.com/docs/api#api-endpoint-tls-termination-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointTlsTerminationModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointTlsTerminationModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EndpointWebhookValidationModule}.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-webhook-validation-module">https://ngrok.com/docs/api#api-endpoint-webhook-validation-module</a>.
*/
public class EndpointWebhookValidationModule {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EndpointWebhookValidationModule {
/**
* A builder object encapsulating state for an unsent Replace API call.
*/
public class EndpointWebhookValidationModuleReplaceCallBuilder {
public class ReplaceCallBuilder {
private final String id;
private EndpointWebhookValidation module = null;
private EndpointWebhookValidationModuleReplaceCallBuilder(
private ReplaceCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -45,7 +47,7 @@ public class EndpointWebhookValidationModule {
* @param module the value of the module parameter as a {@link EndpointWebhookValidation}
* @return the call builder instance
*/
public EndpointWebhookValidationModuleReplaceCallBuilder module(final EndpointWebhookValidation module) {
public ReplaceCallBuilder module(final EndpointWebhookValidation module) {
this.module = Objects.requireNonNull(module, "module is required");
return this;
}
@@ -56,7 +58,7 @@ public class EndpointWebhookValidationModule {
* @param module the value of the module parameter as an {@link Optional} of {@link EndpointWebhookValidation}
* @return the call builder instance
*/
public EndpointWebhookValidationModuleReplaceCallBuilder module(final Optional<EndpointWebhookValidation> module) {
public ReplaceCallBuilder module(final Optional<EndpointWebhookValidation> module) {
this.module = Objects.requireNonNull(module, "module is required").orElse(null);
return this;
}
@@ -96,13 +98,15 @@ public class EndpointWebhookValidationModule {
/**
* Creates a call builder for the Replace API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-webhook-validation-module-replace">https://ngrok.com/docs/api#api-endpoint-webhook-validation-module-replace</a>.
*
* @param id the value of the <code>id</code> parameter as a {@link String}
* @return a call builder for this API call
*/
public EndpointWebhookValidationModuleReplaceCallBuilder replace(
public ReplaceCallBuilder replace(
final String id
) {
return new EndpointWebhookValidationModuleReplaceCallBuilder(
return new ReplaceCallBuilder(
id
);
}
@@ -110,10 +114,10 @@ public class EndpointWebhookValidationModule {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EndpointWebhookValidationModuleGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EndpointWebhookValidationModuleGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -152,13 +156,15 @@ public class EndpointWebhookValidationModule {
/**
* Creates a call builder for the Get API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-webhook-validation-module-get">https://ngrok.com/docs/api#api-endpoint-webhook-validation-module-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointWebhookValidationModuleGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EndpointWebhookValidationModuleGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -166,10 +172,10 @@ public class EndpointWebhookValidationModule {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EndpointWebhookValidationModuleDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EndpointWebhookValidationModuleDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -207,13 +213,15 @@ public class EndpointWebhookValidationModule {
/**
* Creates a call builder for the Delete API operation.
*
* See also <a href="https://ngrok.com/docs/api#api-endpoint-webhook-validation-module-delete">https://ngrok.com/docs/api#api-endpoint-webhook-validation-module-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EndpointWebhookValidationModuleDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EndpointWebhookValidationModuleDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EventDestinations}.
*
* See also <a href="https://ngrok.com/docs/api#api-event-destinations">https://ngrok.com/docs/api#api-event-destinations</a>.
*/
public class EventDestinations {
private final NgrokApiClient apiClient;
@@ -29,13 +31,13 @@ public class EventDestinations {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class EventDestinationsCreateCallBuilder {
public class CreateCallBuilder {
private String metadata = "";
private String description = "";
private String format = "";
private EventTarget target = null;
private EventDestinationsCreateCallBuilder(
private CreateCallBuilder(
) {
}
@@ -46,7 +48,7 @@ public class EventDestinations {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder metadata(final String metadata) {
public CreateCallBuilder metadata(final String metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -58,7 +60,7 @@ public class EventDestinations {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder metadata(final Optional<String> metadata) {
public CreateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required").orElse("");
return this;
}
@@ -69,7 +71,7 @@ public class EventDestinations {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder description(final String description) {
public CreateCallBuilder description(final String description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -80,7 +82,7 @@ public class EventDestinations {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder description(final Optional<String> description) {
public CreateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required").orElse("");
return this;
}
@@ -92,7 +94,7 @@ public class EventDestinations {
* @param format the value of the format parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder format(final String format) {
public CreateCallBuilder format(final String format) {
this.format = Objects.requireNonNull(format, "format is required");
return this;
}
@@ -104,7 +106,7 @@ public class EventDestinations {
* @param format the value of the format parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder format(final Optional<String> format) {
public CreateCallBuilder format(final Optional<String> format) {
this.format = Objects.requireNonNull(format, "format is required").orElse("");
return this;
}
@@ -118,7 +120,7 @@ public class EventDestinations {
* @param target the value of the target parameter as a {@link EventTarget}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder target(final EventTarget target) {
public CreateCallBuilder target(final EventTarget target) {
this.target = Objects.requireNonNull(target, "target is required");
return this;
}
@@ -132,7 +134,7 @@ public class EventDestinations {
* @param target the value of the target parameter as an {@link Optional} of {@link EventTarget}
* @return the call builder instance
*/
public EventDestinationsCreateCallBuilder target(final Optional<EventTarget> target) {
public CreateCallBuilder target(final Optional<EventTarget> target) {
this.target = Objects.requireNonNull(target, "target is required").orElse(null);
return this;
}
@@ -177,21 +179,23 @@ public class EventDestinations {
* associated with an Event Stream, and that Event Stream is associated with an
* Endpoint Config.
*
* See also <a href="https://ngrok.com/docs/api#api-event-destinations-create">https://ngrok.com/docs/api#api-event-destinations-create</a>.
*
* @return a call builder for this API call
*/
public EventDestinationsCreateCallBuilder create(
public CreateCallBuilder create(
) {
return new EventDestinationsCreateCallBuilder(
return new CreateCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EventDestinationsDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EventDestinationsDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -231,13 +235,15 @@ public class EventDestinations {
* Event Stream, this will throw an error until that Event Stream has removed that
* reference.
*
* See also <a href="https://ngrok.com/docs/api#api-event-destinations-delete">https://ngrok.com/docs/api#api-event-destinations-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EventDestinationsDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EventDestinationsDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -245,10 +251,10 @@ public class EventDestinations {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EventDestinationsGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EventDestinationsGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -287,13 +293,15 @@ public class EventDestinations {
/**
* Get detailed information about an Event Destination by ID.
*
* See also <a href="https://ngrok.com/docs/api#api-event-destinations-get">https://ngrok.com/docs/api#api-event-destinations-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EventDestinationsGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EventDestinationsGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -301,11 +309,11 @@ public class EventDestinations {
/**
* A builder object encapsulating state for an unsent List API call.
*/
public class EventDestinationsListCallBuilder {
public class ListCallBuilder {
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private EventDestinationsListCallBuilder(
private ListCallBuilder(
) {
}
@@ -315,7 +323,7 @@ public class EventDestinations {
* @param beforeId the value of the before_id parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsListCallBuilder beforeId(final String beforeId) {
public ListCallBuilder beforeId(final String beforeId) {
this.beforeId = Optional.ofNullable(beforeId);
return this;
}
@@ -326,7 +334,7 @@ public class EventDestinations {
* @param beforeId the value of the before_id parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsListCallBuilder beforeId(final Optional<String> beforeId) {
public ListCallBuilder beforeId(final Optional<String> beforeId) {
this.beforeId = Objects.requireNonNull(beforeId, "beforeId is required");
return this;
}
@@ -337,7 +345,7 @@ public class EventDestinations {
* @param limit the value of the limit parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsListCallBuilder limit(final String limit) {
public ListCallBuilder limit(final String limit) {
this.limit = Optional.ofNullable(limit);
return this;
}
@@ -348,7 +356,7 @@ public class EventDestinations {
* @param limit the value of the limit parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsListCallBuilder limit(final Optional<String> limit) {
public ListCallBuilder limit(final Optional<String> limit) {
this.limit = Objects.requireNonNull(limit, "limit is required");
return this;
}
@@ -389,25 +397,27 @@ public class EventDestinations {
/**
* List all Event Destinations on this account.
*
* See also <a href="https://ngrok.com/docs/api#api-event-destinations-list">https://ngrok.com/docs/api#api-event-destinations-list</a>.
*
* @return a call builder for this API call
*/
public EventDestinationsListCallBuilder list(
public ListCallBuilder list(
) {
return new EventDestinationsListCallBuilder(
return new ListCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Update API call.
*/
public class EventDestinationsUpdateCallBuilder {
public class UpdateCallBuilder {
private final String id;
private Optional<String> metadata = Optional.empty();
private Optional<String> description = Optional.empty();
private Optional<String> format = Optional.empty();
private Optional<EventTarget> target = Optional.empty();
private EventDestinationsUpdateCallBuilder(
private UpdateCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -420,7 +430,7 @@ public class EventDestinations {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder metadata(final String metadata) {
public UpdateCallBuilder metadata(final String metadata) {
this.metadata = Optional.ofNullable(metadata);
return this;
}
@@ -432,7 +442,7 @@ public class EventDestinations {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder metadata(final Optional<String> metadata) {
public UpdateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -443,7 +453,7 @@ public class EventDestinations {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder description(final String description) {
public UpdateCallBuilder description(final String description) {
this.description = Optional.ofNullable(description);
return this;
}
@@ -454,7 +464,7 @@ public class EventDestinations {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder description(final Optional<String> description) {
public UpdateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -466,7 +476,7 @@ public class EventDestinations {
* @param format the value of the format parameter as a {@link String}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder format(final String format) {
public UpdateCallBuilder format(final String format) {
this.format = Optional.ofNullable(format);
return this;
}
@@ -478,7 +488,7 @@ public class EventDestinations {
* @param format the value of the format parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder format(final Optional<String> format) {
public UpdateCallBuilder format(final Optional<String> format) {
this.format = Objects.requireNonNull(format, "format is required");
return this;
}
@@ -492,7 +502,7 @@ public class EventDestinations {
* @param target the value of the target parameter as a {@link EventTarget}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder target(final EventTarget target) {
public UpdateCallBuilder target(final EventTarget target) {
this.target = Optional.ofNullable(target);
return this;
}
@@ -506,7 +516,7 @@ public class EventDestinations {
* @param target the value of the target parameter as an {@link Optional} of {@link EventTarget}
* @return the call builder instance
*/
public EventDestinationsUpdateCallBuilder target(final Optional<EventTarget> target) {
public UpdateCallBuilder target(final Optional<EventTarget> target) {
this.target = Objects.requireNonNull(target, "target is required");
return this;
}
@@ -549,13 +559,15 @@ public class EventDestinations {
/**
* Update attributes of an Event Destination.
*
* See also <a href="https://ngrok.com/docs/api#api-event-destinations-update">https://ngrok.com/docs/api#api-event-destinations-update</a>.
*
* @param id Unique identifier for this Event Destination.
* @return a call builder for this API call
*/
public EventDestinationsUpdateCallBuilder update(
public UpdateCallBuilder update(
final String id
) {
return new EventDestinationsUpdateCallBuilder(
return new UpdateCallBuilder(
id
);
}
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EventSources}.
*
* See also <a href="https://ngrok.com/docs/api#api-event-sources">https://ngrok.com/docs/api#api-event-sources</a>.
*/
public class EventSources {
private final NgrokApiClient apiClient;
@@ -29,11 +31,11 @@ public class EventSources {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class EventSourcesCreateCallBuilder {
public class CreateCallBuilder {
private final String subscriptionId;
private String type = "";
private EventSourcesCreateCallBuilder(
private CreateCallBuilder(
final String subscriptionId
) {
this.subscriptionId = Objects.requireNonNull(subscriptionId, "subscriptionId is required");
@@ -45,7 +47,7 @@ public class EventSources {
* @param type the value of the type parameter as a {@link String}
* @return the call builder instance
*/
public EventSourcesCreateCallBuilder type(final String type) {
public CreateCallBuilder type(final String type) {
this.type = Objects.requireNonNull(type, "type is required");
return this;
}
@@ -56,7 +58,7 @@ public class EventSources {
* @param type the value of the type parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventSourcesCreateCallBuilder type(final Optional<String> type) {
public CreateCallBuilder type(final Optional<String> type) {
this.type = Objects.requireNonNull(type, "type is required").orElse("");
return this;
}
@@ -96,13 +98,15 @@ public class EventSources {
/**
* Add an additional type for which this event subscription will trigger
*
* See also <a href="https://ngrok.com/docs/api#api-event-sources-create">https://ngrok.com/docs/api#api-event-sources-create</a>.
*
* @param subscriptionId The unique identifier for the Event Subscription that this Event Source is attached to.
* @return a call builder for this API call
*/
public EventSourcesCreateCallBuilder create(
public CreateCallBuilder create(
final String subscriptionId
) {
return new EventSourcesCreateCallBuilder(
return new CreateCallBuilder(
subscriptionId
);
}
@@ -110,11 +114,11 @@ public class EventSources {
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EventSourcesDeleteCallBuilder {
public class DeleteCallBuilder {
private final String subscriptionId;
private final String type;
private EventSourcesDeleteCallBuilder(
private DeleteCallBuilder(
final String subscriptionId,
final String type
) {
@@ -154,15 +158,17 @@ public class EventSources {
/**
* Remove a type for which this event subscription will trigger
*
* See also <a href="https://ngrok.com/docs/api#api-event-sources-delete">https://ngrok.com/docs/api#api-event-sources-delete</a>.
*
* @param subscriptionId The unique identifier for the Event Subscription that this Event Source is attached to.
* @param type Type of event for which an event subscription will trigger
* @return a call builder for this API call
*/
public EventSourcesDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String subscriptionId,
final String type
) {
return new EventSourcesDeleteCallBuilder(
return new DeleteCallBuilder(
subscriptionId,
type
);
@@ -171,11 +177,11 @@ public class EventSources {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EventSourcesGetCallBuilder {
public class GetCallBuilder {
private final String subscriptionId;
private final String type;
private EventSourcesGetCallBuilder(
private GetCallBuilder(
final String subscriptionId,
final String type
) {
@@ -216,15 +222,17 @@ public class EventSources {
/**
* Get the details for a given type that triggers for the given event subscription
*
* See also <a href="https://ngrok.com/docs/api#api-event-sources-get">https://ngrok.com/docs/api#api-event-sources-get</a>.
*
* @param subscriptionId The unique identifier for the Event Subscription that this Event Source is attached to.
* @param type Type of event for which an event subscription will trigger
* @return a call builder for this API call
*/
public EventSourcesGetCallBuilder get(
public GetCallBuilder get(
final String subscriptionId,
final String type
) {
return new EventSourcesGetCallBuilder(
return new GetCallBuilder(
subscriptionId,
type
);
@@ -233,10 +241,10 @@ public class EventSources {
/**
* A builder object encapsulating state for an unsent List API call.
*/
public class EventSourcesListCallBuilder {
public class ListCallBuilder {
private final String subscriptionId;
private EventSourcesListCallBuilder(
private ListCallBuilder(
final String subscriptionId
) {
this.subscriptionId = Objects.requireNonNull(subscriptionId, "subscriptionId is required");
@@ -275,13 +283,15 @@ public class EventSources {
/**
* List the types for which this event subscription will trigger
*
* See also <a href="https://ngrok.com/docs/api#api-event-sources-list">https://ngrok.com/docs/api#api-event-sources-list</a>.
*
* @param subscriptionId The unique identifier for the Event Subscription that this Event Source is attached to.
* @return a call builder for this API call
*/
public EventSourcesListCallBuilder list(
public ListCallBuilder list(
final String subscriptionId
) {
return new EventSourcesListCallBuilder(
return new ListCallBuilder(
subscriptionId
);
}
@@ -289,11 +299,11 @@ public class EventSources {
/**
* A builder object encapsulating state for an unsent Update API call.
*/
public class EventSourcesUpdateCallBuilder {
public class UpdateCallBuilder {
private final String subscriptionId;
private final String type;
private EventSourcesUpdateCallBuilder(
private UpdateCallBuilder(
final String subscriptionId,
final String type
) {
@@ -334,15 +344,17 @@ public class EventSources {
/**
* Update the type for which this event subscription will trigger
*
* See also <a href="https://ngrok.com/docs/api#api-event-sources-update">https://ngrok.com/docs/api#api-event-sources-update</a>.
*
* @param subscriptionId The unique identifier for the Event Subscription that this Event Source is attached to.
* @param type Type of event for which an event subscription will trigger
* @return a call builder for this API call
*/
public EventSourcesUpdateCallBuilder update(
public UpdateCallBuilder update(
final String subscriptionId,
final String type
) {
return new EventSourcesUpdateCallBuilder(
return new UpdateCallBuilder(
subscriptionId,
type
);
@@ -13,6 +13,8 @@ import java.util.stream.Stream;
/**
* An API client for {@link EventStreams}.
*
* See also <a href="https://ngrok.com/docs/api#api-event-streams">https://ngrok.com/docs/api#api-event-streams</a>.
*/
public class EventStreams {
private final NgrokApiClient apiClient;
@@ -29,15 +31,15 @@ public class EventStreams {
/**
* A builder object encapsulating state for an unsent Create API call.
*/
public class EventStreamsCreateCallBuilder {
public class CreateCallBuilder {
private String metadata = "";
private String description = "";
private java.util.List<String> fields = null;
private java.util.List<String> fields = java.util.Collections.emptyList();
private String eventType = "";
private java.util.List<String> destinationIds = null;
private java.util.List<String> destinationIds = java.util.Collections.emptyList();
private double samplingRate = 0.0d;
private EventStreamsCreateCallBuilder(
private CreateCallBuilder(
) {
}
@@ -48,7 +50,7 @@ public class EventStreams {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder metadata(final String metadata) {
public CreateCallBuilder metadata(final String metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -60,7 +62,7 @@ public class EventStreams {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder metadata(final Optional<String> metadata) {
public CreateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required").orElse("");
return this;
}
@@ -71,7 +73,7 @@ public class EventStreams {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder description(final String description) {
public CreateCallBuilder description(final String description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -82,7 +84,7 @@ public class EventStreams {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder description(final Optional<String> description) {
public CreateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required").orElse("");
return this;
}
@@ -93,7 +95,7 @@ public class EventStreams {
* @param fields the value of the fields parameter as a {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder fields(final java.util.List<String> fields) {
public CreateCallBuilder fields(final java.util.List<String> fields) {
this.fields = Objects.requireNonNull(fields, "fields is required");
return this;
}
@@ -104,8 +106,8 @@ public class EventStreams {
* @param fields the value of the fields parameter as an {@link Optional} of {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder fields(final Optional<java.util.List<String>> fields) {
this.fields = Objects.requireNonNull(fields, "fields is required").orElse(null);
public CreateCallBuilder fields(final Optional<java.util.List<String>> fields) {
this.fields = Objects.requireNonNull(fields, "fields is required").orElse(java.util.Collections.emptyList());
return this;
}
@@ -116,7 +118,7 @@ public class EventStreams {
* @param eventType the value of the event_type parameter as a {@link String}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder eventType(final String eventType) {
public CreateCallBuilder eventType(final String eventType) {
this.eventType = Objects.requireNonNull(eventType, "eventType is required");
return this;
}
@@ -128,7 +130,7 @@ public class EventStreams {
* @param eventType the value of the event_type parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder eventType(final Optional<String> eventType) {
public CreateCallBuilder eventType(final Optional<String> eventType) {
this.eventType = Objects.requireNonNull(eventType, "eventType is required").orElse("");
return this;
}
@@ -140,7 +142,7 @@ public class EventStreams {
* @param destinationIds the value of the destination_ids parameter as a {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder destinationIds(final java.util.List<String> destinationIds) {
public CreateCallBuilder destinationIds(final java.util.List<String> destinationIds) {
this.destinationIds = Objects.requireNonNull(destinationIds, "destinationIds is required");
return this;
}
@@ -152,8 +154,8 @@ public class EventStreams {
* @param destinationIds the value of the destination_ids parameter as an {@link Optional} of {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder destinationIds(final Optional<java.util.List<String>> destinationIds) {
this.destinationIds = Objects.requireNonNull(destinationIds, "destinationIds is required").orElse(null);
public CreateCallBuilder destinationIds(final Optional<java.util.List<String>> destinationIds) {
this.destinationIds = Objects.requireNonNull(destinationIds, "destinationIds is required").orElse(java.util.Collections.emptyList());
return this;
}
@@ -164,7 +166,7 @@ public class EventStreams {
* @param samplingRate the value of the sampling_rate parameter as a {@link double}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder samplingRate(final double samplingRate) {
public CreateCallBuilder samplingRate(final double samplingRate) {
this.samplingRate = Objects.requireNonNull(samplingRate, "samplingRate is required");
return this;
}
@@ -176,7 +178,7 @@ public class EventStreams {
* @param samplingRate the value of the sampling_rate parameter as an {@link Optional} of {@link double}
* @return the call builder instance
*/
public EventStreamsCreateCallBuilder samplingRate(final Optional<Double> samplingRate) {
public CreateCallBuilder samplingRate(final Optional<Double> samplingRate) {
this.samplingRate = Objects.requireNonNull(samplingRate, "samplingRate is required").orElse(0.0d);
return this;
}
@@ -222,21 +224,23 @@ public class EventStreams {
* Create a new Event Stream. It will not apply to anything until you associate it
* with one or more Endpoint Configs.
*
* See also <a href="https://ngrok.com/docs/api#api-event-streams-create">https://ngrok.com/docs/api#api-event-streams-create</a>.
*
* @return a call builder for this API call
*/
public EventStreamsCreateCallBuilder create(
public CreateCallBuilder create(
) {
return new EventStreamsCreateCallBuilder(
return new CreateCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Delete API call.
*/
public class EventStreamsDeleteCallBuilder {
public class DeleteCallBuilder {
private final String id;
private EventStreamsDeleteCallBuilder(
private DeleteCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -274,13 +278,15 @@ public class EventStreams {
/**
* Delete an Event Stream. Associated Event Destinations will be preserved.
*
* See also <a href="https://ngrok.com/docs/api#api-event-streams-delete">https://ngrok.com/docs/api#api-event-streams-delete</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EventStreamsDeleteCallBuilder delete(
public DeleteCallBuilder delete(
final String id
) {
return new EventStreamsDeleteCallBuilder(
return new DeleteCallBuilder(
id
);
}
@@ -288,10 +294,10 @@ public class EventStreams {
/**
* A builder object encapsulating state for an unsent Get API call.
*/
public class EventStreamsGetCallBuilder {
public class GetCallBuilder {
private final String id;
private EventStreamsGetCallBuilder(
private GetCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -330,13 +336,15 @@ public class EventStreams {
/**
* Get detailed information about an Event Stream by ID.
*
* See also <a href="https://ngrok.com/docs/api#api-event-streams-get">https://ngrok.com/docs/api#api-event-streams-get</a>.
*
* @param id a resource identifier
* @return a call builder for this API call
*/
public EventStreamsGetCallBuilder get(
public GetCallBuilder get(
final String id
) {
return new EventStreamsGetCallBuilder(
return new GetCallBuilder(
id
);
}
@@ -344,11 +352,11 @@ public class EventStreams {
/**
* A builder object encapsulating state for an unsent List API call.
*/
public class EventStreamsListCallBuilder {
public class ListCallBuilder {
private Optional<String> beforeId = Optional.empty();
private Optional<String> limit = Optional.empty();
private EventStreamsListCallBuilder(
private ListCallBuilder(
) {
}
@@ -358,7 +366,7 @@ public class EventStreams {
* @param beforeId the value of the before_id parameter as a {@link String}
* @return the call builder instance
*/
public EventStreamsListCallBuilder beforeId(final String beforeId) {
public ListCallBuilder beforeId(final String beforeId) {
this.beforeId = Optional.ofNullable(beforeId);
return this;
}
@@ -369,7 +377,7 @@ public class EventStreams {
* @param beforeId the value of the before_id parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventStreamsListCallBuilder beforeId(final Optional<String> beforeId) {
public ListCallBuilder beforeId(final Optional<String> beforeId) {
this.beforeId = Objects.requireNonNull(beforeId, "beforeId is required");
return this;
}
@@ -380,7 +388,7 @@ public class EventStreams {
* @param limit the value of the limit parameter as a {@link String}
* @return the call builder instance
*/
public EventStreamsListCallBuilder limit(final String limit) {
public ListCallBuilder limit(final String limit) {
this.limit = Optional.ofNullable(limit);
return this;
}
@@ -391,7 +399,7 @@ public class EventStreams {
* @param limit the value of the limit parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventStreamsListCallBuilder limit(final Optional<String> limit) {
public ListCallBuilder limit(final Optional<String> limit) {
this.limit = Objects.requireNonNull(limit, "limit is required");
return this;
}
@@ -432,18 +440,20 @@ public class EventStreams {
/**
* List all Event Streams available on this account.
*
* See also <a href="https://ngrok.com/docs/api#api-event-streams-list">https://ngrok.com/docs/api#api-event-streams-list</a>.
*
* @return a call builder for this API call
*/
public EventStreamsListCallBuilder list(
public ListCallBuilder list(
) {
return new EventStreamsListCallBuilder(
return new ListCallBuilder(
);
}
/**
* A builder object encapsulating state for an unsent Update API call.
*/
public class EventStreamsUpdateCallBuilder {
public class UpdateCallBuilder {
private final String id;
private Optional<String> metadata = Optional.empty();
private Optional<String> description = Optional.empty();
@@ -451,7 +461,7 @@ public class EventStreams {
private Optional<java.util.List<String>> destinationIds = Optional.empty();
private Optional<Double> samplingRate = Optional.empty();
private EventStreamsUpdateCallBuilder(
private UpdateCallBuilder(
final String id
) {
this.id = Objects.requireNonNull(id, "id is required");
@@ -464,7 +474,7 @@ public class EventStreams {
* @param metadata the value of the metadata parameter as a {@link String}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder metadata(final String metadata) {
public UpdateCallBuilder metadata(final String metadata) {
this.metadata = Optional.ofNullable(metadata);
return this;
}
@@ -476,7 +486,7 @@ public class EventStreams {
* @param metadata the value of the metadata parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder metadata(final Optional<String> metadata) {
public UpdateCallBuilder metadata(final Optional<String> metadata) {
this.metadata = Objects.requireNonNull(metadata, "metadata is required");
return this;
}
@@ -487,7 +497,7 @@ public class EventStreams {
* @param description the value of the description parameter as a {@link String}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder description(final String description) {
public UpdateCallBuilder description(final String description) {
this.description = Optional.ofNullable(description);
return this;
}
@@ -498,7 +508,7 @@ public class EventStreams {
* @param description the value of the description parameter as an {@link Optional} of {@link String}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder description(final Optional<String> description) {
public UpdateCallBuilder description(final Optional<String> description) {
this.description = Objects.requireNonNull(description, "description is required");
return this;
}
@@ -509,7 +519,7 @@ public class EventStreams {
* @param fields the value of the fields parameter as a {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder fields(final java.util.List<String> fields) {
public UpdateCallBuilder fields(final java.util.List<String> fields) {
this.fields = Optional.ofNullable(fields);
return this;
}
@@ -520,7 +530,7 @@ public class EventStreams {
* @param fields the value of the fields parameter as an {@link Optional} of {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder fields(final Optional<java.util.List<String>> fields) {
public UpdateCallBuilder fields(final Optional<java.util.List<String>> fields) {
this.fields = Objects.requireNonNull(fields, "fields is required");
return this;
}
@@ -532,7 +542,7 @@ public class EventStreams {
* @param destinationIds the value of the destination_ids parameter as a {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder destinationIds(final java.util.List<String> destinationIds) {
public UpdateCallBuilder destinationIds(final java.util.List<String> destinationIds) {
this.destinationIds = Optional.ofNullable(destinationIds);
return this;
}
@@ -544,7 +554,7 @@ public class EventStreams {
* @param destinationIds the value of the destination_ids parameter as an {@link Optional} of {@link java.util.List<String>}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder destinationIds(final Optional<java.util.List<String>> destinationIds) {
public UpdateCallBuilder destinationIds(final Optional<java.util.List<String>> destinationIds) {
this.destinationIds = Objects.requireNonNull(destinationIds, "destinationIds is required");
return this;
}
@@ -556,7 +566,7 @@ public class EventStreams {
* @param samplingRate the value of the sampling_rate parameter as a {@link double}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder samplingRate(final double samplingRate) {
public UpdateCallBuilder samplingRate(final double samplingRate) {
this.samplingRate = Optional.ofNullable(samplingRate);
return this;
}
@@ -568,7 +578,7 @@ public class EventStreams {
* @param samplingRate the value of the sampling_rate parameter as an {@link Optional} of {@link double}
* @return the call builder instance
*/
public EventStreamsUpdateCallBuilder samplingRate(final Optional<Double> samplingRate) {
public UpdateCallBuilder samplingRate(final Optional<Double> samplingRate) {
this.samplingRate = Objects.requireNonNull(samplingRate, "samplingRate is required");
return this;
}
@@ -612,13 +622,15 @@ public class EventStreams {
/**
* Update attributes of an Event Stream by ID.
*
* See also <a href="https://ngrok.com/docs/api#api-event-streams-update">https://ngrok.com/docs/api#api-event-streams-update</a>.
*
* @param id Unique identifier for this Event Stream.
* @return a call builder for this API call
*/
public EventStreamsUpdateCallBuilder update(
public UpdateCallBuilder update(
final String id
) {
return new EventStreamsUpdateCallBuilder(
return new UpdateCallBuilder(
id
);
}

Some files were not shown because too many files have changed in this diff Show More