├── docs ├── CNAME ├── module-search-index.js ├── element-list ├── resources │ ├── x.png │ └── glass.png ├── script-dir │ ├── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_dadada_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ └── jquery-ui.structure.min.css ├── tag-search-index.js ├── package-search-index.js ├── overview-summary.html ├── jquery-ui.overrides.css ├── legal │ ├── ASSEMBLY_EXCEPTION │ ├── jqueryUI.md │ ├── ADDITIONAL_LICENSE_INFO │ └── jquery.md ├── com │ └── ngrok │ │ ├── class-use │ │ └── Version.html │ │ └── definitions │ │ └── class-use │ │ └── NgrokApiError.html ├── allpackages-index.html └── index.html ├── .gitignore ├── scripts └── publish-docs.sh ├── src ├── main │ ├── java │ │ └── com │ │ │ └── ngrok │ │ │ ├── definitions │ │ │ ├── Pageable.java │ │ │ ├── Page.java │ │ │ ├── Ref.java │ │ │ ├── EventSource.java │ │ │ ├── IdentityProvider.java │ │ │ ├── EventSourceList.java │ │ │ ├── TlsCertificateSaNs.java │ │ │ ├── EndpointBackend.java │ │ │ ├── AbuseReportHostname.java │ │ │ ├── AwsRole.java │ │ │ ├── EndpointIpPolicy.java │ │ │ ├── AgentIngressCertStatus.java │ │ │ ├── ReservedDomainCertStatus.java │ │ │ ├── EndpointMutualTls.java │ │ │ ├── BrowserSession.java │ │ │ ├── ApiKeyList.java │ │ │ ├── TunnelList.java │ │ │ ├── BotUserList.java │ │ │ ├── TcpEdgeList.java │ │ │ ├── TlsEdgeList.java │ │ │ ├── VaultList.java │ │ │ ├── SecretList.java │ │ │ ├── EndpointList.java │ │ │ ├── IpPolicyList.java │ │ │ ├── HttpsEdgeList.java │ │ │ ├── StaticBackendTls.java │ │ │ ├── AgentIngressList.java │ │ │ ├── StaticBackendList.java │ │ │ ├── CredentialList.java │ │ │ ├── FailoverBackendList.java │ │ │ ├── ServiceUserList.java │ │ │ ├── WeightedBackendList.java │ │ │ ├── IpPolicyRuleList.java │ │ │ ├── ReservedAddrList.java │ │ │ ├── TunnelGroupBackendList.java │ │ │ ├── EventSourceReplace.java │ │ │ ├── IpRestrictionList.java │ │ │ ├── SshCredentialList.java │ │ │ ├── TunnelSessionList.java │ │ │ ├── ReservedDomainList.java │ │ │ ├── TlsCertificateList.java │ │ │ ├── ApplicationUserList.java │ │ │ ├── EventDestinationList.java │ │ │ ├── HttpResponseBackendList.java │ │ │ ├── EventSubscriptionList.java │ │ │ ├── ApplicationSessionList.java │ │ │ ├── NgrokApiError.java │ │ │ ├── SshHostCertificateList.java │ │ │ └── SshUserCertificateList.java │ │ │ └── NgrokApiClient.java │ └── java-templates │ │ └── com │ │ └── ngrok │ │ └── Version.java └── test │ └── java │ └── com │ └── ngrok │ ├── TestBase.java │ ├── ApiKeyTestBase.java │ └── definitions │ └── ApiKeyTest.java ├── LICENSE └── CHANGELOG.md /docs/CNAME: -------------------------------------------------------------------------------- 1 | java-api.docs.ngrok.com 2 | -------------------------------------------------------------------------------- /docs/module-search-index.js: -------------------------------------------------------------------------------- 1 | moduleSearchIndex = [];updateSearchResults(); -------------------------------------------------------------------------------- /docs/element-list: -------------------------------------------------------------------------------- 1 | com.ngrok 2 | com.ngrok.definitions 3 | com.ngrok.services 4 | -------------------------------------------------------------------------------- /docs/resources/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/resources/x.png -------------------------------------------------------------------------------- /docs/resources/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/resources/glass.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Code generated for API Clients. DO NOT EDIT. 2 | 3 | target/ 4 | .classpath 5 | .project 6 | .settings/ 7 | .idea/ 8 | *.iml 9 | -------------------------------------------------------------------------------- /docs/script-dir/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngrok/ngrok-api-java/HEAD/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /docs/tag-search-index.js: -------------------------------------------------------------------------------- 1 | tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"},{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); -------------------------------------------------------------------------------- /docs/package-search-index.js: -------------------------------------------------------------------------------- 1 | packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"com.ngrok"},{"l":"com.ngrok.definitions"},{"l":"com.ngrok.services"}];updateSearchResults(); -------------------------------------------------------------------------------- /scripts/publish-docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Code generated for API Clients. DO NOT EDIT. 4 | 5 | set -e 6 | 7 | rm -rf docs/ 8 | mkdir docs 9 | echo 'java-api.docs.ngrok.com' >docs/CNAME 10 | cp -av target/apidocs/* docs 11 | git add docs/ 12 | git commit -m 'Update docs' -- docs/ 13 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/Pageable.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import java.net.URI; 6 | import java.util.Optional; 7 | 8 | /** 9 | * Interface indicating a resource type that can have more than one page of responses. 10 | */ 11 | public interface Pageable { 12 | /** 13 | * Fetches the URI of the next page. 14 | * 15 | * @return a URI 16 | */ 17 | Optional getNextPageUri(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java-templates/com/ngrok/Version.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok; 4 | 5 | /** 6 | * Client version information 7 | */ 8 | public abstract class Version { 9 | /** 10 | * The ngrok API version in use 11 | */ 12 | public static final String API_VERSION = "2"; 13 | 14 | /** 15 | * This API client's version string 16 | */ 17 | public static final String CLIENT_VERSION = "${project.version}"; 18 | 19 | private Version() {} 20 | } 21 | -------------------------------------------------------------------------------- /docs/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ngrok Java API client 0.6.0 API 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 | 23 |

index.html

24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2021 ngrok, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /docs/jquery-ui.overrides.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | .ui-state-active, 27 | .ui-widget-content .ui-state-active, 28 | .ui-widget-header .ui-state-active, 29 | a.ui-button:active, 30 | .ui-button:active, 31 | .ui-button.ui-state-active:hover { 32 | /* Overrides the color of selection used in jQuery UI */ 33 | background: #F8981D; 34 | } 35 | -------------------------------------------------------------------------------- /docs/legal/ASSEMBLY_EXCEPTION: -------------------------------------------------------------------------------- 1 | 2 | OPENJDK ASSEMBLY EXCEPTION 3 | 4 | The OpenJDK source code made available by Oracle America, Inc. (Oracle) at 5 | openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU 6 | General Public License version 2 7 | only ("GPL2"), with the following clarification and special exception. 8 | 9 | Linking this OpenJDK Code statically or dynamically with other code 10 | is making a combined work based on this library. Thus, the terms 11 | and conditions of GPL2 cover the whole combination. 12 | 13 | As a special exception, Oracle gives you permission to link this 14 | OpenJDK Code with certain code licensed by Oracle as indicated at 15 | http://openjdk.java.net/legal/exception-modules-2007-05-08.html 16 | ("Designated Exception Modules") to produce an executable, 17 | regardless of the license terms of the Designated Exception Modules, 18 | and to copy and distribute the resulting executable under GPL2, 19 | provided that the Designated Exception Modules continue to be 20 | governed by the licenses under which they were offered by Oracle. 21 | 22 | As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code 23 | to build an executable that includes those portions of necessary code that 24 | Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 25 | with the Classpath exception). If you modify or add to the OpenJDK code, 26 | that new GPL2 code may still be combined with Designated Exception Modules 27 | if the new code is made subject to this exception by its copyright holder. 28 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/Page.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.ngrok.NgrokApiClient; 6 | 7 | import java.util.Optional; 8 | import java.util.concurrent.CompletableFuture; 9 | import java.util.concurrent.CompletionStage; 10 | 11 | /** 12 | * Wrapper class that holds a single page of a {@link Pageable} response. 13 | */ 14 | public class Page { 15 | private final NgrokApiClient apiClient; 16 | private final T page; 17 | 18 | /** 19 | * Create a new page. 20 | * 21 | * @param apiClient the API client used to fetch the page 22 | * @param page the page itself 23 | */ 24 | public Page(final NgrokApiClient apiClient, final T page) { 25 | this.apiClient = apiClient; 26 | this.page = page; 27 | } 28 | 29 | /** 30 | * Returns the current response page. 31 | * 32 | * @return a page 33 | */ 34 | public T getPage() { 35 | return page; 36 | } 37 | 38 | /** 39 | * Fetches the next page of responses, if any. 40 | * 41 | * @return a future encapsulating a possible next page 42 | */ 43 | @SuppressWarnings("unchecked") 44 | public CompletionStage>> next() { 45 | return page.getNextPageUri() 46 | .map(nextPageUri -> apiClient.sendRequest(nextPageUri, (Class) this.page.getClass()) 47 | .thenApply(nextPage -> Optional.of(new Page<>(this.apiClient, nextPage))) 48 | ) 49 | .orElseGet(() -> CompletableFuture.completedFuture(Optional.empty())); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /docs/script-dir/jquery-ui.structure.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.12.1 - 2018-12-06 2 | * http://jqueryui.com 3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 4 | 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} -------------------------------------------------------------------------------- /src/test/java/com/ngrok/TestBase.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok; 4 | 5 | import com.fasterxml.jackson.core.JsonProcessingException; 6 | import com.fasterxml.jackson.databind.ObjectMapper; 7 | import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; 8 | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; 9 | 10 | import java.net.URI; 11 | import java.util.AbstractMap; 12 | import java.util.Map; 13 | import java.util.Optional; 14 | 15 | public abstract class TestBase { 16 | public static final String FAKE_API_SECRET ="s3kr1t"; 17 | 18 | public static final String USER_AGENT = "ngrok-api-java/" + Version.CLIENT_VERSION + "/" + System.getProperty("java.version"); 19 | 20 | public static final boolean USE_LIVE_API = Optional.ofNullable(System.getenv("TEST_NO_MOCK")) 21 | .map(Boolean::valueOf) 22 | .orElse(false); 23 | 24 | public static final ObjectMapper MAPPER = new ObjectMapper() 25 | .registerModule(new Jdk8Module()) 26 | .registerModule(new JavaTimeModule()); 27 | 28 | public static Ngrok ngrok(final URI mockBaseUri) { 29 | final NgrokApiClient apiClient = DefaultNgrokApiClient 30 | .newBuilder(USE_LIVE_API ? System.getenv("NGROK_API_KEY") : FAKE_API_SECRET) 31 | .baseUri(USE_LIVE_API ? NgrokApiClient.DEFAULT_BASE_URI : mockBaseUri) 32 | .build(); 33 | return new Ngrok(apiClient); 34 | } 35 | 36 | public static Map.Entry entry(final K key, final V value) { 37 | return new AbstractMap.SimpleEntry<>(key, value); 38 | } 39 | 40 | public static String jsonStrForField(final Map fields, final String key) throws JsonProcessingException { 41 | return "\"" + key + "\":" + MAPPER.writeValueAsString(fields.get(key)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /docs/legal/jqueryUI.md: -------------------------------------------------------------------------------- 1 | ## jQuery UI v1.12.1 2 | 3 | ### jQuery UI License 4 | ``` 5 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 6 | 7 | This software consists of voluntary contributions made by many 8 | individuals. For exact contribution history, see the revision history 9 | available at https://github.com/jquery/jquery-ui 10 | 11 | The following license applies to all parts of this software except as 12 | documented below: 13 | 14 | ==== 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining 17 | a copy of this software and associated documentation files (the 18 | "Software"), to deal in the Software without restriction, including 19 | without limitation the rights to use, copy, modify, merge, publish, 20 | distribute, sublicense, and/or sell copies of the Software, and to 21 | permit persons to whom the Software is furnished to do so, subject to 22 | the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be 25 | included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 31 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 32 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 33 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | 35 | ==== 36 | 37 | Copyright and related rights for sample code are waived via CC0. Sample 38 | code is defined as all source code contained within the demos directory. 39 | 40 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 41 | 42 | ==== 43 | 44 | All files located in the node_modules and external directories are 45 | externally maintained libraries used by this software which have their 46 | own licenses; we recommend you read them, as their terms may differ from 47 | the terms above. 48 | 49 | ``` 50 | -------------------------------------------------------------------------------- /docs/legal/ADDITIONAL_LICENSE_INFO: -------------------------------------------------------------------------------- 1 | ADDITIONAL INFORMATION ABOUT LICENSING 2 | 3 | Certain files distributed by Oracle America, Inc. and/or its affiliates are 4 | subject to the following clarification and special exception to the GPLv2, 5 | based on the GNU Project exception for its Classpath libraries, known as the 6 | GNU Classpath Exception. 7 | 8 | Note that Oracle includes multiple, independent programs in this software 9 | package. Some of those programs are provided under licenses deemed 10 | incompatible with the GPLv2 by the Free Software Foundation and others. 11 | For example, the package includes programs licensed under the Apache 12 | License, Version 2.0 and may include FreeType. Such programs are licensed 13 | to you under their original licenses. 14 | 15 | Oracle facilitates your further distribution of this package by adding the 16 | Classpath Exception to the necessary parts of its GPLv2 code, which permits 17 | you to use that code in combination with other independent modules not 18 | licensed under the GPLv2. However, note that this would not permit you to 19 | commingle code under an incompatible license with Oracle's GPLv2 licensed 20 | code by, for example, cutting and pasting such code into a file also 21 | containing Oracle's GPLv2 licensed code and then distributing the result. 22 | 23 | Additionally, if you were to remove the Classpath Exception from any of the 24 | files to which it applies and distribute the result, you would likely be 25 | required to license some or all of the other code in that distribution under 26 | the GPLv2 as well, and since the GPLv2 is incompatible with the license terms 27 | of some items included in the distribution by Oracle, removing the Classpath 28 | Exception could therefore effectively compromise your ability to further 29 | distribute the package. 30 | 31 | Failing to distribute notices associated with some files may also create 32 | unexpected legal consequences. 33 | 34 | Proceed with caution and we recommend that you obtain the advice of a lawyer 35 | skilled in open source matters before removing the Classpath Exception or 36 | making modifications to this package which may subsequently be redistributed 37 | and/or involve the use of third party software. 38 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## 0.15.0 3 | * Add support for CEL filtering when listing resources. 4 | * Add support for service users 5 | * Add support for `vault_name` on Secrets 6 | * Make `pooling_enabled` on Endpoints optional 7 | 8 | ## 0.14.0 9 | * Change endpoint filtering query parameters to `id` and `url`. 10 | * Add support for getting secrets by vault. 11 | 12 | ## 0.13.0 13 | * Add support for `ids` and `urls` query parameters when listing endpoint resources. 14 | 15 | ## 0.12.0 16 | * Add support for `vaults` 17 | * Add support for `secrets` 18 | 19 | ## 0.11.0 20 | * Added support for Cloud Endpoints (currently in private beta). 21 | * Renamed `upstream_proto` to `upstream_protocol` for `endpoint` resources 22 | * Renamed `principal_id` to `principal` for `endpoint` resources 23 | 24 | ## 0.10.0 25 | * Renamed the Policy Module to the Traffic Policy Module on HTTP Edge Routes, TCP Edges, and TLS Edges, which allows you to configure rules that can be used to influence and control traffic to and from your upstream service. The Traffic Policy itself is now specified as either a JSON or YAML string. 26 | 27 | ## 0.9.0 28 | 29 | ENHANCEMENTS: 30 | 31 | * Added support for the Bot User API. The Bot User API allows you to manage the bots that are registered to your ngrok account. You can automate the creation, management, and deletion of bot users in your account. 32 | 33 | * Added support for the Policy Module on HTTP Edge Routes, TCP Edges, and TLS Edges, which allows you to configure rules that can be used to influence and control traffic to and from your upstream service. 34 | 35 | ## 0.8.0 36 | 37 | ENHANCEMENTS: 38 | 39 | * Added `owner_id` field to the `api_key`, `credential`, and `ssh_credential` resources. If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. 40 | * Added `failover_backend`, `http_response_backend`, and `tunnel_group_backend` resources. A Failover backend defines failover behavior within a list of referenced backends. Traffic is sent to the first backend in the list. If that backend is offline or no connection can be established, ngrok attempts to connect to the next backend in the list until one is successful. 41 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/Ref.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link Ref} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class Ref { 18 | @JsonProperty("id") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final String id; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | 25 | /** 26 | * Creates a new instance of {@link Ref}. 27 | * 28 | * @param id a resource identifier 29 | * @param uri a uri for locating a resource 30 | */ 31 | @JsonCreator 32 | public Ref( 33 | @JsonProperty("id") final String id, 34 | @JsonProperty("uri") final java.net.URI uri 35 | ) { 36 | this.id = Objects.requireNonNull(id, "id is required"); 37 | this.uri = Objects.requireNonNull(uri, "uri is required"); 38 | } 39 | 40 | /** 41 | * a resource identifier 42 | * 43 | * @return the value of the property as a {@link String} 44 | */ 45 | public String getId() { 46 | return this.id; 47 | } 48 | 49 | /** 50 | * a uri for locating a resource 51 | * 52 | * @return the value of the property as a {@link java.net.URI} 53 | */ 54 | public java.net.URI getUri() { 55 | return this.uri; 56 | } 57 | 58 | @Override 59 | public boolean equals(final Object o) { 60 | if (this == o) { 61 | return true; 62 | } 63 | if (o == null || getClass() != o.getClass()) { 64 | return false; 65 | } 66 | 67 | final Ref other = (Ref) o; 68 | return 69 | this.id.equals(other.id)&& 70 | this.uri.equals(other.uri); 71 | 72 | } 73 | 74 | @Override 75 | public int hashCode() { 76 | return Objects.hash( 77 | this.id, 78 | this.uri 79 | ); 80 | } 81 | 82 | @Override 83 | public String toString() { 84 | return "Ref{" + 85 | "id='" + this.id + 86 | "', uri='" + this.uri + 87 | "'}"; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EventSource.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EventSource} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EventSource { 18 | @JsonProperty("type") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final String type; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | 25 | /** 26 | * Creates a new instance of {@link EventSource}. 27 | * 28 | * @param type Type of event for which an event subscription will trigger 29 | * @param uri URI of the Event Source API resource. 30 | */ 31 | @JsonCreator 32 | public EventSource( 33 | @JsonProperty("type") final String type, 34 | @JsonProperty("uri") final java.net.URI uri 35 | ) { 36 | this.type = Objects.requireNonNull(type, "type is required"); 37 | this.uri = Objects.requireNonNull(uri, "uri is required"); 38 | } 39 | 40 | /** 41 | * Type of event for which an event subscription will trigger 42 | * 43 | * @return the value of the property as a {@link String} 44 | */ 45 | public String getType() { 46 | return this.type; 47 | } 48 | 49 | /** 50 | * URI of the Event Source API resource. 51 | * 52 | * @return the value of the property as a {@link java.net.URI} 53 | */ 54 | public java.net.URI getUri() { 55 | return this.uri; 56 | } 57 | 58 | @Override 59 | public boolean equals(final Object o) { 60 | if (this == o) { 61 | return true; 62 | } 63 | if (o == null || getClass() != o.getClass()) { 64 | return false; 65 | } 66 | 67 | final EventSource other = (EventSource) o; 68 | return 69 | this.type.equals(other.type)&& 70 | this.uri.equals(other.uri); 71 | 72 | } 73 | 74 | @Override 75 | public int hashCode() { 76 | return Objects.hash( 77 | this.type, 78 | this.uri 79 | ); 80 | } 81 | 82 | @Override 83 | public String toString() { 84 | return "EventSource{" + 85 | "type='" + this.type + 86 | "', uri='" + this.uri + 87 | "'}"; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/NgrokApiClient.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok; 4 | 5 | import java.net.URI; 6 | import java.util.Map; 7 | import java.util.Optional; 8 | import java.util.concurrent.CompletionStage; 9 | import java.util.stream.Stream; 10 | 11 | /** 12 | * API client interface. 13 | * 14 | * Concrete implementations can be written and passed to {@link Ngrok} on construction 15 | * in order to make HTTP requests or test business logic. 16 | * 17 | * @see DefaultNgrokApiClient 18 | */ 19 | public interface NgrokApiClient { 20 | /** 21 | * HTTP request methods 22 | */ 23 | enum HttpMethod { 24 | /** HTTP GET */ 25 | GET, 26 | /** HTTP POST */ 27 | POST, 28 | /** HTTP PUT */ 29 | PUT, 30 | /** HTTP PATCH */ 31 | PATCH, 32 | /** HTTP DELETE */ 33 | DELETE 34 | } 35 | 36 | /** 37 | * The default base URI for the public ngrok API server 38 | */ 39 | URI DEFAULT_BASE_URI = URI.create("https://api.ngrok.com"); 40 | 41 | /** 42 | * Sends a GET request directly to the specified URI. 43 | * 44 | * @param uri a URI to send the request to 45 | * @param responseClass the type of a Jackson-annotated POJO representing the HTTP response body 46 | * @param the return type for the API response 47 | * @return a future encapsulating the response type 48 | */ 49 | CompletionStage sendRequest(URI uri, Class responseClass); 50 | 51 | /** 52 | * Sends a request to the ngrok API. 53 | * 54 | * @param method the HTTP method to use 55 | * @param endpoint the endpoint (under the base URI) to send the request to 56 | * @param queryParams any query parameters to send along with the request (parameters with an empty 57 | * value will not be sent) 58 | * @param bodyParams any JSON body parameters to send along withthe request (parameters with an empty 59 | * value will not be sent). If this stream is empty, no body should be sent. 60 | * @param responseClass an optional type for a Jackson-annotated POJO representing the HTTP response body 61 | * @param the return type for the API response 62 | * @return a future encapsulating the response type (will be {@link Void} for empty responses) 63 | */ 64 | CompletionStage sendRequest(HttpMethod method, 65 | String endpoint, 66 | Stream>> queryParams, 67 | Stream>> bodyParams, 68 | Optional> responseClass); 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/IdentityProvider.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link IdentityProvider} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class IdentityProvider { 18 | @JsonProperty("name") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final String name; 21 | @JsonProperty("url") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final String url; 24 | 25 | /** 26 | * Creates a new instance of {@link IdentityProvider}. 27 | * 28 | * @param name name of the identity provider (e.g. Google) 29 | * @param url URL of the identity provider (e.g. https://accounts.google.com) 30 | */ 31 | @JsonCreator 32 | public IdentityProvider( 33 | @JsonProperty("name") final String name, 34 | @JsonProperty("url") final String url 35 | ) { 36 | this.name = Objects.requireNonNull(name, "name is required"); 37 | this.url = Objects.requireNonNull(url, "url is required"); 38 | } 39 | 40 | /** 41 | * name of the identity provider (e.g. Google) 42 | * 43 | * @return the value of the property as a {@link String} 44 | */ 45 | public String getName() { 46 | return this.name; 47 | } 48 | 49 | /** 50 | * URL of the identity provider (e.g. https://accounts.google.com) 52 | * 53 | * @return the value of the property as a {@link String} 54 | */ 55 | public String getUrl() { 56 | return this.url; 57 | } 58 | 59 | @Override 60 | public boolean equals(final Object o) { 61 | if (this == o) { 62 | return true; 63 | } 64 | if (o == null || getClass() != o.getClass()) { 65 | return false; 66 | } 67 | 68 | final IdentityProvider other = (IdentityProvider) o; 69 | return 70 | this.name.equals(other.name)&& 71 | this.url.equals(other.url); 72 | 73 | } 74 | 75 | @Override 76 | public int hashCode() { 77 | return Objects.hash( 78 | this.name, 79 | this.url 80 | ); 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | return "IdentityProvider{" + 86 | "name='" + this.name + 87 | "', url='" + this.url + 88 | "'}"; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EventSourceList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EventSourceList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EventSourceList { 18 | @JsonProperty("sources") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List sources; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | 25 | /** 26 | * Creates a new instance of {@link EventSourceList}. 27 | * 28 | * @param sources The list of all Event Sources for an Event Subscription 29 | * @param uri URI of the next page, or null if there is no next page. 30 | */ 31 | @JsonCreator 32 | public EventSourceList( 33 | @JsonProperty("sources") final java.util.List sources, 34 | @JsonProperty("uri") final java.net.URI uri 35 | ) { 36 | this.sources = sources != null ? sources : java.util.Collections.emptyList(); 37 | this.uri = Objects.requireNonNull(uri, "uri is required"); 38 | } 39 | 40 | /** 41 | * The list of all Event Sources for an Event Subscription 42 | * 43 | * @return the value of the property as a {@link java.util.List} of {@link EventSource} 44 | */ 45 | public java.util.List getSources() { 46 | return this.sources; 47 | } 48 | 49 | /** 50 | * URI of the next page, or null if there is no next page. 51 | * 52 | * @return the value of the property as a {@link java.net.URI} 53 | */ 54 | public java.net.URI getUri() { 55 | return this.uri; 56 | } 57 | 58 | @Override 59 | public boolean equals(final Object o) { 60 | if (this == o) { 61 | return true; 62 | } 63 | if (o == null || getClass() != o.getClass()) { 64 | return false; 65 | } 66 | 67 | final EventSourceList other = (EventSourceList) o; 68 | return 69 | this.sources.equals(other.sources)&& 70 | this.uri.equals(other.uri); 71 | 72 | } 73 | 74 | @Override 75 | public int hashCode() { 76 | return Objects.hash( 77 | this.sources, 78 | this.uri 79 | ); 80 | } 81 | 82 | @Override 83 | public String toString() { 84 | return "EventSourceList{" + 85 | "sources='" + this.sources + 86 | "', uri='" + this.uri + 87 | "'}"; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /docs/com/ngrok/class-use/Version.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.ngrok.Version (ngrok Java API client 0.6.0 API) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 49 |
50 |
51 |
52 |

Uses of Class
com.ngrok.Version

53 |
54 | No usage of com.ngrok.Version
55 |
56 |
57 | 58 |
59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/TlsCertificateSaNs.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link TlsCertificateSaNs} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class TlsCertificateSaNs { 18 | @JsonProperty("dns_names") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List dnsNames; 21 | @JsonProperty("ips") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.util.List ips; 24 | 25 | /** 26 | * Creates a new instance of {@link TlsCertificateSaNs}. 27 | * 28 | * @param dnsNames set of additional domains (including wildcards) this TLS certificate is valid for 29 | * @param ips set of IP addresses this TLS certificate is also valid for 30 | */ 31 | @JsonCreator 32 | public TlsCertificateSaNs( 33 | @JsonProperty("dns_names") final java.util.List dnsNames, 34 | @JsonProperty("ips") final java.util.List ips 35 | ) { 36 | this.dnsNames = dnsNames != null ? dnsNames : java.util.Collections.emptyList(); 37 | this.ips = ips != null ? ips : java.util.Collections.emptyList(); 38 | } 39 | 40 | /** 41 | * set of additional domains (including wildcards) this TLS certificate is valid 42 | * for 43 | * 44 | * @return the value of the property as a {@link java.util.List} of {@link String} 45 | */ 46 | public java.util.List getDnsNames() { 47 | return this.dnsNames; 48 | } 49 | 50 | /** 51 | * set of IP addresses this TLS certificate is also valid for 52 | * 53 | * @return the value of the property as a {@link java.util.List} of {@link String} 54 | */ 55 | public java.util.List getIps() { 56 | return this.ips; 57 | } 58 | 59 | @Override 60 | public boolean equals(final Object o) { 61 | if (this == o) { 62 | return true; 63 | } 64 | if (o == null || getClass() != o.getClass()) { 65 | return false; 66 | } 67 | 68 | final TlsCertificateSaNs other = (TlsCertificateSaNs) o; 69 | return 70 | this.dnsNames.equals(other.dnsNames)&& 71 | this.ips.equals(other.ips); 72 | 73 | } 74 | 75 | @Override 76 | public int hashCode() { 77 | return Objects.hash( 78 | this.dnsNames, 79 | this.ips 80 | ); 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | return "TlsCertificateSaNs{" + 86 | "dnsNames='" + this.dnsNames + 87 | "', ips='" + this.ips + 88 | "'}"; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EndpointBackend.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EndpointBackend} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EndpointBackend { 18 | @JsonProperty("enabled") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final Optional enabled; 21 | @JsonProperty("backend") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final Ref backend; 24 | 25 | /** 26 | * Creates a new instance of {@link EndpointBackend}. 27 | * 28 | * @param enabled true if the module will be applied to traffic, false to disable. default true if unspecified 29 | * @param backend backend to be used to back this endpoint 30 | */ 31 | @JsonCreator 32 | public EndpointBackend( 33 | @JsonProperty("enabled") final Optional enabled, 34 | @JsonProperty("backend") final Ref backend 35 | ) { 36 | this.enabled = enabled != null ? enabled : Optional.empty(); 37 | this.backend = Objects.requireNonNull(backend, "backend is required"); 38 | } 39 | 40 | /** 41 | * true if the module will be applied to traffic, false 42 | * to disable. default true if unspecified 43 | * 44 | * @return the value of the property as a {@link boolean} wrapped in an {@link Optional} 45 | */ 46 | public Optional getEnabled() { 47 | return this.enabled; 48 | } 49 | 50 | /** 51 | * backend to be used to back this endpoint 52 | * 53 | * @return the value of the property as a {@link Ref} 54 | */ 55 | public Ref getBackend() { 56 | return this.backend; 57 | } 58 | 59 | @Override 60 | public boolean equals(final Object o) { 61 | if (this == o) { 62 | return true; 63 | } 64 | if (o == null || getClass() != o.getClass()) { 65 | return false; 66 | } 67 | 68 | final EndpointBackend other = (EndpointBackend) o; 69 | return 70 | this.enabled.equals(other.enabled)&& 71 | this.backend.equals(other.backend); 72 | 73 | } 74 | 75 | @Override 76 | public int hashCode() { 77 | return Objects.hash( 78 | this.enabled, 79 | this.backend 80 | ); 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | return "EndpointBackend{" + 86 | "enabled='" + this.enabled.map(Object::toString).orElse("(null)") + 87 | "', backend='" + this.backend + 88 | "'}"; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /docs/com/ngrok/definitions/class-use/NgrokApiError.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.ngrok.definitions.NgrokApiError (ngrok Java API client 0.6.0 API) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 49 |
50 |
51 |
52 |

Uses of Class
com.ngrok.definitions.NgrokApiError

53 |
54 | No usage of com.ngrok.definitions.NgrokApiError
55 |
56 |
57 | 58 |
59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/AbuseReportHostname.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link AbuseReportHostname} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class AbuseReportHostname { 18 | @JsonProperty("hostname") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final String hostname; 21 | @JsonProperty("status") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final String status; 24 | 25 | /** 26 | * Creates a new instance of {@link AbuseReportHostname}. 27 | * 28 | * @param hostname the hostname ngrok has parsed out of one of the reported URLs in this abuse report 29 | * @param status indicates what action ngrok has taken against the hostname. one of PENDING, BANNED, UNBANNED, or IGNORE 30 | */ 31 | @JsonCreator 32 | public AbuseReportHostname( 33 | @JsonProperty("hostname") final String hostname, 34 | @JsonProperty("status") final String status 35 | ) { 36 | this.hostname = Objects.requireNonNull(hostname, "hostname is required"); 37 | this.status = Objects.requireNonNull(status, "status is required"); 38 | } 39 | 40 | /** 41 | * the hostname ngrok has parsed out of one of the reported URLs in this abuse 42 | * report 43 | * 44 | * @return the value of the property as a {@link String} 45 | */ 46 | public String getHostname() { 47 | return this.hostname; 48 | } 49 | 50 | /** 51 | * indicates what action ngrok has taken against the hostname. one of 52 | * PENDING, BANNED, UNBANNED, or 53 | * IGNORE 54 | * 55 | * @return the value of the property as a {@link String} 56 | */ 57 | public String getStatus() { 58 | return this.status; 59 | } 60 | 61 | @Override 62 | public boolean equals(final Object o) { 63 | if (this == o) { 64 | return true; 65 | } 66 | if (o == null || getClass() != o.getClass()) { 67 | return false; 68 | } 69 | 70 | final AbuseReportHostname other = (AbuseReportHostname) o; 71 | return 72 | this.hostname.equals(other.hostname)&& 73 | this.status.equals(other.status); 74 | 75 | } 76 | 77 | @Override 78 | public int hashCode() { 79 | return Objects.hash( 80 | this.hostname, 81 | this.status 82 | ); 83 | } 84 | 85 | @Override 86 | public String toString() { 87 | return "AbuseReportHostname{" + 88 | "hostname='" + this.hostname + 89 | "', status='" + this.status + 90 | "'}"; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /docs/legal/jquery.md: -------------------------------------------------------------------------------- 1 | ## jQuery v3.5.1 2 | 3 | ### jQuery License 4 | ``` 5 | jQuery v 3.5.1 6 | Copyright JS Foundation and other contributors, https://js.foundation/ 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | ****************************************** 28 | 29 | The jQuery JavaScript Library v3.5.1 also includes Sizzle.js 30 | 31 | Sizzle.js includes the following license: 32 | 33 | Copyright JS Foundation and other contributors, https://js.foundation/ 34 | 35 | This software consists of voluntary contributions made by many 36 | individuals. For exact contribution history, see the revision history 37 | available at https://github.com/jquery/sizzle 38 | 39 | The following license applies to all parts of this software except as 40 | documented below: 41 | 42 | ==== 43 | 44 | Permission is hereby granted, free of charge, to any person obtaining 45 | a copy of this software and associated documentation files (the 46 | "Software"), to deal in the Software without restriction, including 47 | without limitation the rights to use, copy, modify, merge, publish, 48 | distribute, sublicense, and/or sell copies of the Software, and to 49 | permit persons to whom the Software is furnished to do so, subject to 50 | the following conditions: 51 | 52 | The above copyright notice and this permission notice shall be 53 | included in all copies or substantial portions of the Software. 54 | 55 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 56 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 57 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 58 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 59 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 60 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 61 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 62 | 63 | ==== 64 | 65 | All files located in the node_modules and external directories are 66 | externally maintained libraries used by this software which have their 67 | own licenses; we recommend you read them, as their terms may differ from 68 | the terms above. 69 | 70 | ********************* 71 | 72 | ``` 73 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/AwsRole.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link AwsRole} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class AwsRole { 18 | /** 19 | * Builder class for {@link AwsRole}. 20 | */ 21 | public static class Builder { 22 | private final String roleArn; 23 | 24 | private Builder( 25 | final String roleArn 26 | ) { 27 | this.roleArn = Objects.requireNonNull(roleArn, "roleArn is required"); 28 | } 29 | 30 | /** 31 | * Constructs the {@link AwsRole} instance. 32 | * 33 | * @return a new {@link AwsRole} 34 | */ 35 | public AwsRole build() { 36 | return new AwsRole( 37 | this.roleArn 38 | ); 39 | } 40 | } 41 | 42 | /** 43 | * Creates a new builder for the {@link AwsRole} type. 44 | * 45 | * @param roleArn An ARN that specifies the role that ngrok should use to deliver to the configured target. 46 | * @return a new {@link Builder} 47 | */ 48 | public static Builder newBuilder( 49 | final String roleArn 50 | ) { 51 | return new Builder ( 52 | roleArn 53 | ); 54 | } 55 | 56 | @JsonProperty("role_arn") 57 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 58 | private final String roleArn; 59 | 60 | /** 61 | * Creates a new instance of {@link AwsRole}. 62 | * 63 | * @param roleArn An ARN that specifies the role that ngrok should use to deliver to the configured target. 64 | */ 65 | @JsonCreator 66 | private AwsRole( 67 | @JsonProperty("role_arn") final String roleArn 68 | ) { 69 | this.roleArn = Objects.requireNonNull(roleArn, "roleArn is required"); 70 | } 71 | 72 | /** 73 | * An ARN that specifies the role that ngrok should use to deliver to the 74 | * configured target. 75 | * 76 | * @return the value of the property as a {@link String} 77 | */ 78 | public String getRoleArn() { 79 | return this.roleArn; 80 | } 81 | 82 | @Override 83 | public boolean equals(final Object o) { 84 | if (this == o) { 85 | return true; 86 | } 87 | if (o == null || getClass() != o.getClass()) { 88 | return false; 89 | } 90 | 91 | final AwsRole other = (AwsRole) o; 92 | return 93 | this.roleArn.equals(other.roleArn); 94 | 95 | } 96 | 97 | @Override 98 | public int hashCode() { 99 | return Objects.hash( 100 | this.roleArn 101 | ); 102 | } 103 | 104 | @Override 105 | public String toString() { 106 | return "AwsRole{" + 107 | "roleArn='" + this.roleArn + 108 | "'}"; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EndpointIpPolicy.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EndpointIpPolicy} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EndpointIpPolicy { 18 | @JsonProperty("enabled") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final Optional enabled; 21 | @JsonProperty("ip_policies") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.util.List ipPolicies; 24 | 25 | /** 26 | * Creates a new instance of {@link EndpointIpPolicy}. 27 | * 28 | * @param enabled true if the module will be applied to traffic, false to disable. default true if unspecified 29 | * @param ipPolicies list of all IP policies that will be used to check if a source IP is allowed access to the endpoint 30 | */ 31 | @JsonCreator 32 | public EndpointIpPolicy( 33 | @JsonProperty("enabled") final Optional enabled, 34 | @JsonProperty("ip_policies") final java.util.List ipPolicies 35 | ) { 36 | this.enabled = enabled != null ? enabled : Optional.empty(); 37 | this.ipPolicies = ipPolicies != null ? ipPolicies : java.util.Collections.emptyList(); 38 | } 39 | 40 | /** 41 | * true if the module will be applied to traffic, false 42 | * to disable. default true if unspecified 43 | * 44 | * @return the value of the property as a {@link boolean} wrapped in an {@link Optional} 45 | */ 46 | public Optional getEnabled() { 47 | return this.enabled; 48 | } 49 | 50 | /** 51 | * list of all IP policies that will be used to check if a source IP is allowed 52 | * access to the endpoint 53 | * 54 | * @return the value of the property as a {@link java.util.List} of {@link Ref} 55 | */ 56 | public java.util.List getIpPolicies() { 57 | return this.ipPolicies; 58 | } 59 | 60 | @Override 61 | public boolean equals(final Object o) { 62 | if (this == o) { 63 | return true; 64 | } 65 | if (o == null || getClass() != o.getClass()) { 66 | return false; 67 | } 68 | 69 | final EndpointIpPolicy other = (EndpointIpPolicy) o; 70 | return 71 | this.enabled.equals(other.enabled)&& 72 | this.ipPolicies.equals(other.ipPolicies); 73 | 74 | } 75 | 76 | @Override 77 | public int hashCode() { 78 | return Objects.hash( 79 | this.enabled, 80 | this.ipPolicies 81 | ); 82 | } 83 | 84 | @Override 85 | public String toString() { 86 | return "EndpointIpPolicy{" + 87 | "enabled='" + this.enabled.map(Object::toString).orElse("(null)") + 88 | "', ipPolicies='" + this.ipPolicies + 89 | "'}"; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /docs/allpackages-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | All Packages (ngrok Java API client 0.6.0 API) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 49 |
50 |
51 |
52 |

All Packages

53 |
54 |
Package Summary
55 |
56 |
Package
57 |
Description
58 | 59 |
 
60 | 61 |
 
62 | 63 |
 
64 |
65 |
66 |
67 |
68 | 69 |
70 |
71 |
72 | 73 | 74 | -------------------------------------------------------------------------------- /src/test/java/com/ngrok/ApiKeyTestBase.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok; 4 | 5 | import com.ngrok.definitions.ApiKey; 6 | 7 | import java.net.URI; 8 | import java.time.Duration; 9 | import java.time.OffsetDateTime; 10 | import java.util.Map; 11 | import java.util.Optional; 12 | import java.util.stream.Collectors; 13 | import java.util.stream.Stream; 14 | 15 | import static org.assertj.core.api.Assertions.assertThat; 16 | 17 | // Test 18 | public abstract class ApiKeyTestBase extends TestBase { 19 | public static ApiKey API_KEY = new ApiKey( 20 | "abcdef123456", 21 | URI.create("https://api.ngrok.com/api_keys/abcdef123456"), 22 | Optional.of("this is a great API key"), 23 | Optional.of("this API key is quite meta"), 24 | OffsetDateTime.parse("2021-06-08T21:09:00-07:00"), 25 | Optional.of("qwertyuiop"), 26 | Optional.of("usr_abcdefghijklmnopqrstuvwxyz0") 27 | ); 28 | 29 | public static ApiKey API_KEY_NO_TOKEN = new ApiKey( 30 | API_KEY.getId(), 31 | API_KEY.getUri(), 32 | API_KEY.getDescription(), 33 | API_KEY.getMetadata(), 34 | API_KEY.getCreatedAt(), 35 | Optional.empty(), 36 | API_KEY.getOwnerId() 37 | ); 38 | 39 | public static final Map API_KEY_JSON_FIELDS = Stream.of( 40 | entry("id", API_KEY.getId()), 41 | entry("uri", API_KEY.getUri()), 42 | entry("description", API_KEY.getDescription()), 43 | entry("metadata", API_KEY.getMetadata()), 44 | entry("created_at", API_KEY.getCreatedAt()), 45 | entry("token", API_KEY.getToken().orElseThrow(() -> new AssertionError("Bad data in API_KEY"))) 46 | ).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); 47 | 48 | 49 | public static void assertApiKeyFields(final ApiKey apiKey, final Optional expectedDescription, boolean shouldHaveToken) { 50 | assertThat(apiKey).isNotNull(); 51 | 52 | if (USE_LIVE_API) { 53 | assertThat(apiKey.getId()).isNotBlank(); 54 | assertThat(apiKey.getUri().getHost()).isEqualTo(NgrokApiClient.DEFAULT_BASE_URI.getHost()); 55 | assertThat(apiKey.getCreatedAt()).isAfter(OffsetDateTime.now().minus(Duration.ofMinutes(20))); 56 | } else { 57 | assertThat(apiKey.getId()).isEqualTo(API_KEY.getId()); 58 | assertThat(apiKey.getUri()).isEqualTo(API_KEY.getUri()); 59 | assertThat(apiKey.getCreatedAt()).isEqualTo(API_KEY.getCreatedAt()); 60 | } 61 | 62 | assertThat(apiKey.getDescription()).isEqualTo(expectedDescription); 63 | assertThat(apiKey.getMetadata()).isEqualTo(API_KEY.getMetadata()); 64 | 65 | if (shouldHaveToken) { 66 | if (USE_LIVE_API) { 67 | assertThat(apiKey.getToken()).isNotEmpty(); 68 | assertThat(apiKey.getToken().get()).isNotBlank(); 69 | } else { 70 | assertThat(apiKey.getToken()).isEqualTo(API_KEY.getToken()); 71 | } 72 | } else { 73 | assertThat(apiKey.getToken()).isEmpty(); 74 | } 75 | } 76 | 77 | public static void assertApiKeyFields(final ApiKey apiKey) { 78 | assertApiKeyFields(apiKey, API_KEY.getDescription(), true); 79 | } 80 | 81 | public static void assertApiKeyFieldsNoToken(final ApiKey apiKey) { 82 | assertApiKeyFields( apiKey, API_KEY.getDescription(), false); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/AgentIngressCertStatus.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link AgentIngressCertStatus} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class AgentIngressCertStatus { 18 | @JsonProperty("renews_at") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final Optional renewsAt; 21 | @JsonProperty("provisioning_job") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final Optional provisioningJob; 24 | 25 | /** 26 | * Creates a new instance of {@link AgentIngressCertStatus}. 27 | * 28 | * @param renewsAt timestamp when the next renewal will be requested, RFC 3339 format 29 | * @param provisioningJob status of the certificate provisioning job, or null if the certificiate isn't being provisioned or renewed 30 | */ 31 | @JsonCreator 32 | public AgentIngressCertStatus( 33 | @JsonProperty("renews_at") final Optional renewsAt, 34 | @JsonProperty("provisioning_job") final Optional provisioningJob 35 | ) { 36 | this.renewsAt = renewsAt != null ? renewsAt : Optional.empty(); 37 | this.provisioningJob = provisioningJob != null ? provisioningJob : Optional.empty(); 38 | } 39 | 40 | /** 41 | * timestamp when the next renewal will be requested, RFC 3339 format 42 | * 43 | * @return the value of the property as a {@link java.time.OffsetDateTime} wrapped in an {@link Optional} 44 | */ 45 | public Optional getRenewsAt() { 46 | return this.renewsAt; 47 | } 48 | 49 | /** 50 | * status of the certificate provisioning job, or null if the certificiate 51 | * isn't being provisioned or renewed 52 | * 53 | * @return the value of the property as a {@link AgentIngressCertJob} wrapped in an {@link Optional} 54 | */ 55 | public Optional getProvisioningJob() { 56 | return this.provisioningJob; 57 | } 58 | 59 | @Override 60 | public boolean equals(final Object o) { 61 | if (this == o) { 62 | return true; 63 | } 64 | if (o == null || getClass() != o.getClass()) { 65 | return false; 66 | } 67 | 68 | final AgentIngressCertStatus other = (AgentIngressCertStatus) o; 69 | return 70 | this.renewsAt.equals(other.renewsAt)&& 71 | this.provisioningJob.equals(other.provisioningJob); 72 | 73 | } 74 | 75 | @Override 76 | public int hashCode() { 77 | return Objects.hash( 78 | this.renewsAt, 79 | this.provisioningJob 80 | ); 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | return "AgentIngressCertStatus{" + 86 | "renewsAt='" + this.renewsAt.map(Object::toString).orElse("(null)") + 87 | "', provisioningJob='" + this.provisioningJob.map(Object::toString).orElse("(null)") + 88 | "'}"; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/ReservedDomainCertStatus.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link ReservedDomainCertStatus} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class ReservedDomainCertStatus { 18 | @JsonProperty("renews_at") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final Optional renewsAt; 21 | @JsonProperty("provisioning_job") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final Optional provisioningJob; 24 | 25 | /** 26 | * Creates a new instance of {@link ReservedDomainCertStatus}. 27 | * 28 | * @param renewsAt timestamp when the next renewal will be requested, RFC 3339 format 29 | * @param provisioningJob status of the certificate provisioning job, or null if the certificiate isn't being provisioned or renewed 30 | */ 31 | @JsonCreator 32 | public ReservedDomainCertStatus( 33 | @JsonProperty("renews_at") final Optional renewsAt, 34 | @JsonProperty("provisioning_job") final Optional provisioningJob 35 | ) { 36 | this.renewsAt = renewsAt != null ? renewsAt : Optional.empty(); 37 | this.provisioningJob = provisioningJob != null ? provisioningJob : Optional.empty(); 38 | } 39 | 40 | /** 41 | * timestamp when the next renewal will be requested, RFC 3339 format 42 | * 43 | * @return the value of the property as a {@link java.time.OffsetDateTime} wrapped in an {@link Optional} 44 | */ 45 | public Optional getRenewsAt() { 46 | return this.renewsAt; 47 | } 48 | 49 | /** 50 | * status of the certificate provisioning job, or null if the certificiate 51 | * isn't being provisioned or renewed 52 | * 53 | * @return the value of the property as a {@link ReservedDomainCertJob} wrapped in an {@link Optional} 54 | */ 55 | public Optional getProvisioningJob() { 56 | return this.provisioningJob; 57 | } 58 | 59 | @Override 60 | public boolean equals(final Object o) { 61 | if (this == o) { 62 | return true; 63 | } 64 | if (o == null || getClass() != o.getClass()) { 65 | return false; 66 | } 67 | 68 | final ReservedDomainCertStatus other = (ReservedDomainCertStatus) o; 69 | return 70 | this.renewsAt.equals(other.renewsAt)&& 71 | this.provisioningJob.equals(other.provisioningJob); 72 | 73 | } 74 | 75 | @Override 76 | public int hashCode() { 77 | return Objects.hash( 78 | this.renewsAt, 79 | this.provisioningJob 80 | ); 81 | } 82 | 83 | @Override 84 | public String toString() { 85 | return "ReservedDomainCertStatus{" + 86 | "renewsAt='" + this.renewsAt.map(Object::toString).orElse("(null)") + 87 | "', provisioningJob='" + this.provisioningJob.map(Object::toString).orElse("(null)") + 88 | "'}"; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EndpointMutualTls.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EndpointMutualTls} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EndpointMutualTls { 18 | @JsonProperty("enabled") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final Optional enabled; 21 | @JsonProperty("certificate_authorities") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.util.List certificateAuthorities; 24 | 25 | /** 26 | * Creates a new instance of {@link EndpointMutualTls}. 27 | * 28 | * @param enabled true if the module will be applied to traffic, false to disable. default true if unspecified 29 | * @param certificateAuthorities PEM-encoded CA certificates that will be used to validate. Multiple CAs may be provided by concatenating them together. 30 | */ 31 | @JsonCreator 32 | public EndpointMutualTls( 33 | @JsonProperty("enabled") final Optional enabled, 34 | @JsonProperty("certificate_authorities") final java.util.List certificateAuthorities 35 | ) { 36 | this.enabled = enabled != null ? enabled : Optional.empty(); 37 | this.certificateAuthorities = certificateAuthorities != null ? certificateAuthorities : java.util.Collections.emptyList(); 38 | } 39 | 40 | /** 41 | * true if the module will be applied to traffic, false 42 | * to disable. default true if unspecified 43 | * 44 | * @return the value of the property as a {@link boolean} wrapped in an {@link Optional} 45 | */ 46 | public Optional getEnabled() { 47 | return this.enabled; 48 | } 49 | 50 | /** 51 | * PEM-encoded CA certificates that will be used to validate. Multiple CAs may be 52 | * provided by concatenating them together. 53 | * 54 | * @return the value of the property as a {@link java.util.List} of {@link Ref} 55 | */ 56 | public java.util.List getCertificateAuthorities() { 57 | return this.certificateAuthorities; 58 | } 59 | 60 | @Override 61 | public boolean equals(final Object o) { 62 | if (this == o) { 63 | return true; 64 | } 65 | if (o == null || getClass() != o.getClass()) { 66 | return false; 67 | } 68 | 69 | final EndpointMutualTls other = (EndpointMutualTls) o; 70 | return 71 | this.enabled.equals(other.enabled)&& 72 | this.certificateAuthorities.equals(other.certificateAuthorities); 73 | 74 | } 75 | 76 | @Override 77 | public int hashCode() { 78 | return Objects.hash( 79 | this.enabled, 80 | this.certificateAuthorities 81 | ); 82 | } 83 | 84 | @Override 85 | public String toString() { 86 | return "EndpointMutualTls{" + 87 | "enabled='" + this.enabled.map(Object::toString).orElse("(null)") + 88 | "', certificateAuthorities='" + this.certificateAuthorities + 89 | "'}"; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Overview (ngrok Java API client 0.6.0 API) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 24 |
25 | 49 |
50 |
51 |
52 |

ngrok Java API client 0.6.0 API

53 |
54 |
55 |
Packages
56 |
57 |
Package
58 |
Description
59 | 60 |
 
61 | 62 |
 
63 | 64 |
 
65 |
66 |
67 |
68 |
69 |
70 | 71 |
72 |
73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/BrowserSession.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link BrowserSession} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class BrowserSession { 18 | @JsonProperty("user_agent") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final UserAgent userAgent; 21 | @JsonProperty("ip_address") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final String ipAddress; 24 | @JsonProperty("location") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional location; 27 | 28 | /** 29 | * Creates a new instance of {@link BrowserSession}. 30 | * 31 | * @param userAgent HTTP User-Agent data 32 | * @param ipAddress IP address 33 | * @param location IP geolocation data 34 | */ 35 | @JsonCreator 36 | public BrowserSession( 37 | @JsonProperty("user_agent") final UserAgent userAgent, 38 | @JsonProperty("ip_address") final String ipAddress, 39 | @JsonProperty("location") final Optional location 40 | ) { 41 | this.userAgent = Objects.requireNonNull(userAgent, "userAgent is required"); 42 | this.ipAddress = Objects.requireNonNull(ipAddress, "ipAddress is required"); 43 | this.location = location != null ? location : Optional.empty(); 44 | } 45 | 46 | /** 47 | * HTTP User-Agent data 48 | * 49 | * @return the value of the property as a {@link UserAgent} 50 | */ 51 | public UserAgent getUserAgent() { 52 | return this.userAgent; 53 | } 54 | 55 | /** 56 | * IP address 57 | * 58 | * @return the value of the property as a {@link String} 59 | */ 60 | public String getIpAddress() { 61 | return this.ipAddress; 62 | } 63 | 64 | /** 65 | * IP geolocation data 66 | * 67 | * @return the value of the property as a {@link Location} wrapped in an {@link Optional} 68 | */ 69 | public Optional getLocation() { 70 | return this.location; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final BrowserSession other = (BrowserSession) o; 83 | return 84 | this.userAgent.equals(other.userAgent)&& 85 | this.ipAddress.equals(other.ipAddress)&& 86 | this.location.equals(other.location); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.userAgent, 94 | this.ipAddress, 95 | this.location 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "BrowserSession{" + 102 | "userAgent='" + this.userAgent + 103 | "', ipAddress='" + this.ipAddress + 104 | "', location='" + this.location.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/ApiKeyList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link ApiKeyList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class ApiKeyList implements Pageable { 18 | @JsonProperty("keys") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List keys; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link ApiKeyList}. 30 | * 31 | * @param keys the list of API keys for this account 32 | * @param uri URI of the API keys list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public ApiKeyList( 37 | @JsonProperty("keys") final java.util.List keys, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.keys = keys != null ? keys : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of API keys for this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link ApiKey} 50 | */ 51 | public java.util.List getKeys() { 52 | return this.keys; 53 | } 54 | 55 | /** 56 | * URI of the API keys list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final ApiKeyList other = (ApiKeyList) o; 83 | return 84 | this.keys.equals(other.keys)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.keys, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "ApiKeyList{" + 102 | "keys='" + this.keys + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/TunnelList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link TunnelList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class TunnelList implements Pageable { 18 | @JsonProperty("tunnels") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List tunnels; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link TunnelList}. 30 | * 31 | * @param tunnels the list of all online tunnels on this account 32 | * @param uri URI of the tunnels list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public TunnelList( 37 | @JsonProperty("tunnels") final java.util.List tunnels, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.tunnels = tunnels != null ? tunnels : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all online tunnels on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link Tunnel} 50 | */ 51 | public java.util.List getTunnels() { 52 | return this.tunnels; 53 | } 54 | 55 | /** 56 | * URI of the tunnels list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final TunnelList other = (TunnelList) o; 83 | return 84 | this.tunnels.equals(other.tunnels)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.tunnels, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "TunnelList{" + 102 | "tunnels='" + this.tunnels + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/BotUserList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link BotUserList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class BotUserList implements Pageable { 18 | @JsonProperty("bot_users") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List botUsers; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link BotUserList}. 30 | * 31 | * @param botUsers the list of all bot users on this account 32 | * @param uri URI of the bot users list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public BotUserList( 37 | @JsonProperty("bot_users") final java.util.List botUsers, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.botUsers = botUsers != null ? botUsers : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all bot users on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link BotUser} 50 | */ 51 | public java.util.List getBotUsers() { 52 | return this.botUsers; 53 | } 54 | 55 | /** 56 | * URI of the bot users list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final BotUserList other = (BotUserList) o; 83 | return 84 | this.botUsers.equals(other.botUsers)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.botUsers, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "BotUserList{" + 102 | "botUsers='" + this.botUsers + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/TcpEdgeList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link TcpEdgeList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class TcpEdgeList implements Pageable { 18 | @JsonProperty("tcp_edges") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List tcpEdges; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link TcpEdgeList}. 30 | * 31 | * @param tcpEdges the list of all TCP Edges on this account 32 | * @param uri URI of the TCP Edge list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public TcpEdgeList( 37 | @JsonProperty("tcp_edges") final java.util.List tcpEdges, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.tcpEdges = tcpEdges != null ? tcpEdges : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all TCP Edges on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link TcpEdge} 50 | */ 51 | public java.util.List getTcpEdges() { 52 | return this.tcpEdges; 53 | } 54 | 55 | /** 56 | * URI of the TCP Edge list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final TcpEdgeList other = (TcpEdgeList) o; 83 | return 84 | this.tcpEdges.equals(other.tcpEdges)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.tcpEdges, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "TcpEdgeList{" + 102 | "tcpEdges='" + this.tcpEdges + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/TlsEdgeList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link TlsEdgeList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class TlsEdgeList implements Pageable { 18 | @JsonProperty("tls_edges") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List tlsEdges; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link TlsEdgeList}. 30 | * 31 | * @param tlsEdges the list of all TLS Edges on this account 32 | * @param uri URI of the TLS Edge list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public TlsEdgeList( 37 | @JsonProperty("tls_edges") final java.util.List tlsEdges, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.tlsEdges = tlsEdges != null ? tlsEdges : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all TLS Edges on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link TlsEdge} 50 | */ 51 | public java.util.List getTlsEdges() { 52 | return this.tlsEdges; 53 | } 54 | 55 | /** 56 | * URI of the TLS Edge list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final TlsEdgeList other = (TlsEdgeList) o; 83 | return 84 | this.tlsEdges.equals(other.tlsEdges)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.tlsEdges, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "TlsEdgeList{" + 102 | "tlsEdges='" + this.tlsEdges + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/VaultList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link VaultList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class VaultList implements Pageable { 18 | @JsonProperty("vaults") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List vaults; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link VaultList}. 30 | * 31 | * @param vaults The list of Vaults for this account 32 | * @param uri the value of the uri parameter as a {@link java.net.URI} 33 | * @param nextPageUri URI of the next page of results, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public VaultList( 37 | @JsonProperty("vaults") final java.util.List vaults, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.vaults = vaults != null ? vaults : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * The list of Vaults for this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link Vault} 50 | */ 51 | public java.util.List getVaults() { 52 | return this.vaults; 53 | } 54 | 55 | /** 56 | * Fetches the value of the uri property. 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page of results, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final VaultList other = (VaultList) o; 83 | return 84 | this.vaults.equals(other.vaults)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.vaults, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "VaultList{" + 102 | "vaults='" + this.vaults + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/SecretList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link SecretList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class SecretList implements Pageable { 18 | @JsonProperty("secrets") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List secrets; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link SecretList}. 30 | * 31 | * @param secrets The list of Secrets for this account 32 | * @param uri the value of the uri parameter as a {@link java.net.URI} 33 | * @param nextPageUri URI of the next page of results, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public SecretList( 37 | @JsonProperty("secrets") final java.util.List secrets, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.secrets = secrets != null ? secrets : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * The list of Secrets for this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link Secret} 50 | */ 51 | public java.util.List getSecrets() { 52 | return this.secrets; 53 | } 54 | 55 | /** 56 | * Fetches the value of the uri property. 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page of results, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final SecretList other = (SecretList) o; 83 | return 84 | this.secrets.equals(other.secrets)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.secrets, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "SecretList{" + 102 | "secrets='" + this.secrets + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EndpointList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EndpointList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EndpointList implements Pageable { 18 | @JsonProperty("endpoints") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List endpoints; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link EndpointList}. 30 | * 31 | * @param endpoints the list of all active endpoints on this account 32 | * @param uri URI of the endpoints list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public EndpointList( 37 | @JsonProperty("endpoints") final java.util.List endpoints, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.endpoints = endpoints != null ? endpoints : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all active endpoints on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link Endpoint} 50 | */ 51 | public java.util.List getEndpoints() { 52 | return this.endpoints; 53 | } 54 | 55 | /** 56 | * URI of the endpoints list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final EndpointList other = (EndpointList) o; 83 | return 84 | this.endpoints.equals(other.endpoints)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.endpoints, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "EndpointList{" + 102 | "endpoints='" + this.endpoints + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/IpPolicyList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link IpPolicyList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class IpPolicyList implements Pageable { 18 | @JsonProperty("ip_policies") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List ipPolicies; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link IpPolicyList}. 30 | * 31 | * @param ipPolicies the list of all IP policies on this account 32 | * @param uri URI of the IP policy list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public IpPolicyList( 37 | @JsonProperty("ip_policies") final java.util.List ipPolicies, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.ipPolicies = ipPolicies != null ? ipPolicies : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all IP policies on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link IpPolicy} 50 | */ 51 | public java.util.List getIpPolicies() { 52 | return this.ipPolicies; 53 | } 54 | 55 | /** 56 | * URI of the IP policy list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final IpPolicyList other = (IpPolicyList) o; 83 | return 84 | this.ipPolicies.equals(other.ipPolicies)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.ipPolicies, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "IpPolicyList{" + 102 | "ipPolicies='" + this.ipPolicies + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/HttpsEdgeList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link HttpsEdgeList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class HttpsEdgeList implements Pageable { 18 | @JsonProperty("https_edges") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List httpsEdges; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link HttpsEdgeList}. 30 | * 31 | * @param httpsEdges the list of all HTTPS Edges on this account 32 | * @param uri URI of the HTTPS Edge list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public HttpsEdgeList( 37 | @JsonProperty("https_edges") final java.util.List httpsEdges, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.httpsEdges = httpsEdges != null ? httpsEdges : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all HTTPS Edges on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link HttpsEdge} 50 | */ 51 | public java.util.List getHttpsEdges() { 52 | return this.httpsEdges; 53 | } 54 | 55 | /** 56 | * URI of the HTTPS Edge list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final HttpsEdgeList other = (HttpsEdgeList) o; 83 | return 84 | this.httpsEdges.equals(other.httpsEdges)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.httpsEdges, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "HttpsEdgeList{" + 102 | "httpsEdges='" + this.httpsEdges + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/StaticBackendTls.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link StaticBackendTls} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class StaticBackendTls { 18 | /** 19 | * Builder class for {@link StaticBackendTls}. 20 | */ 21 | public static class Builder { 22 | private Optional enabled = Optional.empty(); 23 | 24 | private Builder( 25 | ) { 26 | } 27 | 28 | /** 29 | * if TLS is checked 30 | * 31 | * @param enabled the value of the enabled parameter as a {@link boolean} 32 | * @return this builder instance 33 | */ 34 | public Builder enabled(final boolean enabled) { 35 | this.enabled = Optional.of(Objects.requireNonNull(enabled, "enabled is required")); 36 | return this; 37 | } 38 | 39 | /** 40 | * if TLS is checked 41 | * 42 | * @param enabled the value of the enabled parameter as a {@link boolean}, wrapped in an {@link Optional} 43 | * @return this builder instance 44 | */ 45 | public Builder enabled(final Optional enabled) { 46 | this.enabled = Objects.requireNonNull(enabled, "enabled is required"); 47 | return this; 48 | } 49 | 50 | /** 51 | * Constructs the {@link StaticBackendTls} instance. 52 | * 53 | * @return a new {@link StaticBackendTls} 54 | */ 55 | public StaticBackendTls build() { 56 | return new StaticBackendTls( 57 | this.enabled.orElse(false) 58 | ); 59 | } 60 | } 61 | 62 | /** 63 | * Creates a new builder for the {@link StaticBackendTls} type. 64 | * 65 | * @return a new {@link Builder} 66 | */ 67 | public static Builder newBuilder( 68 | ) { 69 | return new Builder ( 70 | ); 71 | } 72 | 73 | @JsonProperty("enabled") 74 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 75 | private final boolean enabled; 76 | 77 | /** 78 | * Creates a new instance of {@link StaticBackendTls}. 79 | * 80 | * @param enabled if TLS is checked 81 | */ 82 | @JsonCreator 83 | private StaticBackendTls( 84 | @JsonProperty("enabled") final Boolean enabled 85 | ) { 86 | this.enabled = Objects.requireNonNull(enabled, "enabled is required"); 87 | } 88 | 89 | /** 90 | * if TLS is checked 91 | * 92 | * @return the value of the property as a {@link boolean} 93 | */ 94 | public boolean getEnabled() { 95 | return this.enabled; 96 | } 97 | 98 | @Override 99 | public boolean equals(final Object o) { 100 | if (this == o) { 101 | return true; 102 | } 103 | if (o == null || getClass() != o.getClass()) { 104 | return false; 105 | } 106 | 107 | final StaticBackendTls other = (StaticBackendTls) o; 108 | return 109 | this.enabled == other.enabled; 110 | 111 | } 112 | 113 | @Override 114 | public int hashCode() { 115 | return Objects.hash( 116 | this.enabled 117 | ); 118 | } 119 | 120 | @Override 121 | public String toString() { 122 | return "StaticBackendTls{" + 123 | "enabled='" + this.enabled + 124 | "'}"; 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/AgentIngressList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link AgentIngressList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class AgentIngressList implements Pageable { 18 | @JsonProperty("ingresses") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List ingresses; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link AgentIngressList}. 30 | * 31 | * @param ingresses the list of Agent Ingresses owned by this account 32 | * @param uri URI of the Agent Ingress list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public AgentIngressList( 37 | @JsonProperty("ingresses") final java.util.List ingresses, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.ingresses = ingresses != null ? ingresses : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of Agent Ingresses owned by this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link AgentIngress} 50 | */ 51 | public java.util.List getIngresses() { 52 | return this.ingresses; 53 | } 54 | 55 | /** 56 | * URI of the Agent Ingress list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final AgentIngressList other = (AgentIngressList) o; 83 | return 84 | this.ingresses.equals(other.ingresses)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.ingresses, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "AgentIngressList{" + 102 | "ingresses='" + this.ingresses + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/StaticBackendList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link StaticBackendList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class StaticBackendList implements Pageable { 18 | @JsonProperty("backends") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List backends; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link StaticBackendList}. 30 | * 31 | * @param backends the list of all static backends on this account 32 | * @param uri URI of the static backends list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public StaticBackendList( 37 | @JsonProperty("backends") final java.util.List backends, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.backends = backends != null ? backends : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all static backends on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link StaticBackend} 50 | */ 51 | public java.util.List getBackends() { 52 | return this.backends; 53 | } 54 | 55 | /** 56 | * URI of the static backends list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final StaticBackendList other = (StaticBackendList) o; 83 | return 84 | this.backends.equals(other.backends)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.backends, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "StaticBackendList{" + 102 | "backends='" + this.backends + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/CredentialList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link CredentialList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class CredentialList implements Pageable { 18 | @JsonProperty("credentials") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List credentials; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link CredentialList}. 30 | * 31 | * @param credentials the list of all tunnel credentials on this account 32 | * @param uri URI of the tunnel credential list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public CredentialList( 37 | @JsonProperty("credentials") final java.util.List credentials, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.credentials = credentials != null ? credentials : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all tunnel credentials on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link Credential} 50 | */ 51 | public java.util.List getCredentials() { 52 | return this.credentials; 53 | } 54 | 55 | /** 56 | * URI of the tunnel credential list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final CredentialList other = (CredentialList) o; 83 | return 84 | this.credentials.equals(other.credentials)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.credentials, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "CredentialList{" + 102 | "credentials='" + this.credentials + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/FailoverBackendList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link FailoverBackendList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class FailoverBackendList implements Pageable { 18 | @JsonProperty("backends") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List backends; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link FailoverBackendList}. 30 | * 31 | * @param backends the list of all Failover backends on this account 32 | * @param uri URI of the Failover backends list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public FailoverBackendList( 37 | @JsonProperty("backends") final java.util.List backends, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.backends = backends != null ? backends : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all Failover backends on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link FailoverBackend} 50 | */ 51 | public java.util.List getBackends() { 52 | return this.backends; 53 | } 54 | 55 | /** 56 | * URI of the Failover backends list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final FailoverBackendList other = (FailoverBackendList) o; 83 | return 84 | this.backends.equals(other.backends)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.backends, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "FailoverBackendList{" + 102 | "backends='" + this.backends + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/ServiceUserList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link ServiceUserList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class ServiceUserList implements Pageable { 18 | @JsonProperty("service_users") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List serviceUsers; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link ServiceUserList}. 30 | * 31 | * @param serviceUsers the list of all service users on this account 32 | * @param uri URI of the service users list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public ServiceUserList( 37 | @JsonProperty("service_users") final java.util.List serviceUsers, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.serviceUsers = serviceUsers != null ? serviceUsers : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all service users on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link ServiceUser} 50 | */ 51 | public java.util.List getServiceUsers() { 52 | return this.serviceUsers; 53 | } 54 | 55 | /** 56 | * URI of the service users list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final ServiceUserList other = (ServiceUserList) o; 83 | return 84 | this.serviceUsers.equals(other.serviceUsers)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.serviceUsers, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "ServiceUserList{" + 102 | "serviceUsers='" + this.serviceUsers + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/WeightedBackendList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link WeightedBackendList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class WeightedBackendList implements Pageable { 18 | @JsonProperty("backends") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List backends; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link WeightedBackendList}. 30 | * 31 | * @param backends the list of all Weighted backends on this account 32 | * @param uri URI of the Weighted backends list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public WeightedBackendList( 37 | @JsonProperty("backends") final java.util.List backends, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.backends = backends != null ? backends : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all Weighted backends on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link WeightedBackend} 50 | */ 51 | public java.util.List getBackends() { 52 | return this.backends; 53 | } 54 | 55 | /** 56 | * URI of the Weighted backends list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final WeightedBackendList other = (WeightedBackendList) o; 83 | return 84 | this.backends.equals(other.backends)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.backends, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "WeightedBackendList{" + 102 | "backends='" + this.backends + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/IpPolicyRuleList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link IpPolicyRuleList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class IpPolicyRuleList implements Pageable { 18 | @JsonProperty("ip_policy_rules") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List ipPolicyRules; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link IpPolicyRuleList}. 30 | * 31 | * @param ipPolicyRules the list of all IP policy rules on this account 32 | * @param uri URI of the IP policy rule list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public IpPolicyRuleList( 37 | @JsonProperty("ip_policy_rules") final java.util.List ipPolicyRules, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.ipPolicyRules = ipPolicyRules != null ? ipPolicyRules : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all IP policy rules on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link IpPolicyRule} 50 | */ 51 | public java.util.List getIpPolicyRules() { 52 | return this.ipPolicyRules; 53 | } 54 | 55 | /** 56 | * URI of the IP policy rule list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final IpPolicyRuleList other = (IpPolicyRuleList) o; 83 | return 84 | this.ipPolicyRules.equals(other.ipPolicyRules)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.ipPolicyRules, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "IpPolicyRuleList{" + 102 | "ipPolicyRules='" + this.ipPolicyRules + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/ReservedAddrList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link ReservedAddrList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class ReservedAddrList implements Pageable { 18 | @JsonProperty("reserved_addrs") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List reservedAddrs; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link ReservedAddrList}. 30 | * 31 | * @param reservedAddrs the list of all reserved addresses on this account 32 | * @param uri URI of the reserved address list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public ReservedAddrList( 37 | @JsonProperty("reserved_addrs") final java.util.List reservedAddrs, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.reservedAddrs = reservedAddrs != null ? reservedAddrs : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all reserved addresses on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link ReservedAddr} 50 | */ 51 | public java.util.List getReservedAddrs() { 52 | return this.reservedAddrs; 53 | } 54 | 55 | /** 56 | * URI of the reserved address list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final ReservedAddrList other = (ReservedAddrList) o; 83 | return 84 | this.reservedAddrs.equals(other.reservedAddrs)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.reservedAddrs, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "ReservedAddrList{" + 102 | "reservedAddrs='" + this.reservedAddrs + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/TunnelGroupBackendList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link TunnelGroupBackendList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class TunnelGroupBackendList implements Pageable { 18 | @JsonProperty("backends") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List backends; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link TunnelGroupBackendList}. 30 | * 31 | * @param backends the list of all TunnelGroup backends on this account 32 | * @param uri URI of the TunnelGroup backends list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public TunnelGroupBackendList( 37 | @JsonProperty("backends") final java.util.List backends, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.backends = backends != null ? backends : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all TunnelGroup backends on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link TunnelGroupBackend} 50 | */ 51 | public java.util.List getBackends() { 52 | return this.backends; 53 | } 54 | 55 | /** 56 | * URI of the TunnelGroup backends list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final TunnelGroupBackendList other = (TunnelGroupBackendList) o; 83 | return 84 | this.backends.equals(other.backends)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.backends, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "TunnelGroupBackendList{" + 102 | "backends='" + this.backends + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EventSourceReplace.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EventSourceReplace} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EventSourceReplace { 18 | /** 19 | * Builder class for {@link EventSourceReplace}. 20 | */ 21 | public static class Builder { 22 | private Optional type = Optional.empty(); 23 | 24 | private Builder( 25 | ) { 26 | } 27 | 28 | /** 29 | * Type of event for which an event subscription will trigger 30 | * 31 | * @param type the value of the type parameter as a {@link String} 32 | * @return this builder instance 33 | */ 34 | public Builder type(final String type) { 35 | this.type = Optional.of(Objects.requireNonNull(type, "type is required")); 36 | return this; 37 | } 38 | 39 | /** 40 | * Type of event for which an event subscription will trigger 41 | * 42 | * @param type the value of the type parameter as a {@link String}, wrapped in an {@link Optional} 43 | * @return this builder instance 44 | */ 45 | public Builder type(final Optional type) { 46 | this.type = Objects.requireNonNull(type, "type is required"); 47 | return this; 48 | } 49 | 50 | /** 51 | * Constructs the {@link EventSourceReplace} instance. 52 | * 53 | * @return a new {@link EventSourceReplace} 54 | */ 55 | public EventSourceReplace build() { 56 | return new EventSourceReplace( 57 | this.type.orElse("") 58 | ); 59 | } 60 | } 61 | 62 | /** 63 | * Creates a new builder for the {@link EventSourceReplace} type. 64 | * 65 | * @return a new {@link Builder} 66 | */ 67 | public static Builder newBuilder( 68 | ) { 69 | return new Builder ( 70 | ); 71 | } 72 | 73 | @JsonProperty("type") 74 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 75 | private final String type; 76 | 77 | /** 78 | * Creates a new instance of {@link EventSourceReplace}. 79 | * 80 | * @param type Type of event for which an event subscription will trigger 81 | */ 82 | @JsonCreator 83 | private EventSourceReplace( 84 | @JsonProperty("type") final String type 85 | ) { 86 | this.type = Objects.requireNonNull(type, "type is required"); 87 | } 88 | 89 | /** 90 | * Type of event for which an event subscription will trigger 91 | * 92 | * @return the value of the property as a {@link String} 93 | */ 94 | public String getType() { 95 | return this.type; 96 | } 97 | 98 | @Override 99 | public boolean equals(final Object o) { 100 | if (this == o) { 101 | return true; 102 | } 103 | if (o == null || getClass() != o.getClass()) { 104 | return false; 105 | } 106 | 107 | final EventSourceReplace other = (EventSourceReplace) o; 108 | return 109 | this.type.equals(other.type); 110 | 111 | } 112 | 113 | @Override 114 | public int hashCode() { 115 | return Objects.hash( 116 | this.type 117 | ); 118 | } 119 | 120 | @Override 121 | public String toString() { 122 | return "EventSourceReplace{" + 123 | "type='" + this.type + 124 | "'}"; 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/IpRestrictionList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link IpRestrictionList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class IpRestrictionList implements Pageable { 18 | @JsonProperty("ip_restrictions") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List ipRestrictions; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link IpRestrictionList}. 30 | * 31 | * @param ipRestrictions the list of all IP restrictions on this account 32 | * @param uri URI of the IP restrictions list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public IpRestrictionList( 37 | @JsonProperty("ip_restrictions") final java.util.List ipRestrictions, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.ipRestrictions = ipRestrictions != null ? ipRestrictions : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all IP restrictions on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link IpRestriction} 50 | */ 51 | public java.util.List getIpRestrictions() { 52 | return this.ipRestrictions; 53 | } 54 | 55 | /** 56 | * URI of the IP restrictions list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final IpRestrictionList other = (IpRestrictionList) o; 83 | return 84 | this.ipRestrictions.equals(other.ipRestrictions)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.ipRestrictions, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "IpRestrictionList{" + 102 | "ipRestrictions='" + this.ipRestrictions + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/SshCredentialList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link SshCredentialList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class SshCredentialList implements Pageable { 18 | @JsonProperty("ssh_credentials") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List sshCredentials; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link SshCredentialList}. 30 | * 31 | * @param sshCredentials the list of all ssh credentials on this account 32 | * @param uri URI of the ssh credential list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public SshCredentialList( 37 | @JsonProperty("ssh_credentials") final java.util.List sshCredentials, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.sshCredentials = sshCredentials != null ? sshCredentials : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all ssh credentials on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link SshCredential} 50 | */ 51 | public java.util.List getSshCredentials() { 52 | return this.sshCredentials; 53 | } 54 | 55 | /** 56 | * URI of the ssh credential list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final SshCredentialList other = (SshCredentialList) o; 83 | return 84 | this.sshCredentials.equals(other.sshCredentials)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.sshCredentials, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "SshCredentialList{" + 102 | "sshCredentials='" + this.sshCredentials + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/TunnelSessionList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link TunnelSessionList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class TunnelSessionList implements Pageable { 18 | @JsonProperty("tunnel_sessions") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List tunnelSessions; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link TunnelSessionList}. 30 | * 31 | * @param tunnelSessions list of all tunnel sessions on this account 32 | * @param uri URI to the API resource of the tunnel session list 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public TunnelSessionList( 37 | @JsonProperty("tunnel_sessions") final java.util.List tunnelSessions, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.tunnelSessions = tunnelSessions != null ? tunnelSessions : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * list of all tunnel sessions on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link TunnelSession} 50 | */ 51 | public java.util.List getTunnelSessions() { 52 | return this.tunnelSessions; 53 | } 54 | 55 | /** 56 | * URI to the API resource of the tunnel session list 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final TunnelSessionList other = (TunnelSessionList) o; 83 | return 84 | this.tunnelSessions.equals(other.tunnelSessions)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.tunnelSessions, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "TunnelSessionList{" + 102 | "tunnelSessions='" + this.tunnelSessions + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/ReservedDomainList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link ReservedDomainList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class ReservedDomainList implements Pageable { 18 | @JsonProperty("reserved_domains") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List reservedDomains; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link ReservedDomainList}. 30 | * 31 | * @param reservedDomains the list of all reserved domains on this account 32 | * @param uri URI of the reserved domain list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public ReservedDomainList( 37 | @JsonProperty("reserved_domains") final java.util.List reservedDomains, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.reservedDomains = reservedDomains != null ? reservedDomains : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all reserved domains on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link ReservedDomain} 50 | */ 51 | public java.util.List getReservedDomains() { 52 | return this.reservedDomains; 53 | } 54 | 55 | /** 56 | * URI of the reserved domain list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final ReservedDomainList other = (ReservedDomainList) o; 83 | return 84 | this.reservedDomains.equals(other.reservedDomains)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.reservedDomains, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "ReservedDomainList{" + 102 | "reservedDomains='" + this.reservedDomains + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/TlsCertificateList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link TlsCertificateList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class TlsCertificateList implements Pageable { 18 | @JsonProperty("tls_certificates") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List tlsCertificates; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link TlsCertificateList}. 30 | * 31 | * @param tlsCertificates the list of all TLS certificates on this account 32 | * @param uri URI of the TLS certificates list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public TlsCertificateList( 37 | @JsonProperty("tls_certificates") final java.util.List tlsCertificates, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.tlsCertificates = tlsCertificates != null ? tlsCertificates : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all TLS certificates on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link TlsCertificate} 50 | */ 51 | public java.util.List getTlsCertificates() { 52 | return this.tlsCertificates; 53 | } 54 | 55 | /** 56 | * URI of the TLS certificates list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final TlsCertificateList other = (TlsCertificateList) o; 83 | return 84 | this.tlsCertificates.equals(other.tlsCertificates)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.tlsCertificates, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "TlsCertificateList{" + 102 | "tlsCertificates='" + this.tlsCertificates + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/ApplicationUserList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link ApplicationUserList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class ApplicationUserList implements Pageable { 18 | @JsonProperty("application_users") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List applicationUsers; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link ApplicationUserList}. 30 | * 31 | * @param applicationUsers list of all application users on this account 32 | * @param uri URI of the application user list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public ApplicationUserList( 37 | @JsonProperty("application_users") final java.util.List applicationUsers, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.applicationUsers = applicationUsers != null ? applicationUsers : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * list of all application users on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link ApplicationUser} 50 | */ 51 | public java.util.List getApplicationUsers() { 52 | return this.applicationUsers; 53 | } 54 | 55 | /** 56 | * URI of the application user list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final ApplicationUserList other = (ApplicationUserList) o; 83 | return 84 | this.applicationUsers.equals(other.applicationUsers)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.applicationUsers, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "ApplicationUserList{" + 102 | "applicationUsers='" + this.applicationUsers + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EventDestinationList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EventDestinationList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EventDestinationList implements Pageable { 18 | @JsonProperty("event_destinations") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List eventDestinations; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link EventDestinationList}. 30 | * 31 | * @param eventDestinations The list of all Event Destinations on this account. 32 | * @param uri URI of the Event Destinations list API resource. 33 | * @param nextPageUri URI of the next page, or null if there is no next page. 34 | */ 35 | @JsonCreator 36 | public EventDestinationList( 37 | @JsonProperty("event_destinations") final java.util.List eventDestinations, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.eventDestinations = eventDestinations != null ? eventDestinations : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * The list of all Event Destinations on this account. 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link EventDestination} 50 | */ 51 | public java.util.List getEventDestinations() { 52 | return this.eventDestinations; 53 | } 54 | 55 | /** 56 | * URI of the Event Destinations list API resource. 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page. 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final EventDestinationList other = (EventDestinationList) o; 83 | return 84 | this.eventDestinations.equals(other.eventDestinations)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.eventDestinations, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "EventDestinationList{" + 102 | "eventDestinations='" + this.eventDestinations + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/HttpResponseBackendList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link HttpResponseBackendList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class HttpResponseBackendList implements Pageable { 18 | @JsonProperty("backends") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List backends; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link HttpResponseBackendList}. 30 | * 31 | * @param backends the value of the backends parameter as a {@link java.util.List} of {@link HttpResponseBackend} 32 | * @param uri the value of the uri parameter as a {@link java.net.URI} 33 | * @param nextPageUri the value of the next_page_uri parameter as a {@link java.net.URI} 34 | */ 35 | @JsonCreator 36 | public HttpResponseBackendList( 37 | @JsonProperty("backends") final java.util.List backends, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.backends = backends != null ? backends : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * Fetches the value of the backends property. 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link HttpResponseBackend} 50 | */ 51 | public java.util.List getBackends() { 52 | return this.backends; 53 | } 54 | 55 | /** 56 | * Fetches the value of the uri property. 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * Fetches the value of the nextPageUri property. 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final HttpResponseBackendList other = (HttpResponseBackendList) o; 83 | return 84 | this.backends.equals(other.backends)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.backends, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "HttpResponseBackendList{" + 102 | "backends='" + this.backends + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/EventSubscriptionList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link EventSubscriptionList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class EventSubscriptionList implements Pageable { 18 | @JsonProperty("event_subscriptions") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List eventSubscriptions; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link EventSubscriptionList}. 30 | * 31 | * @param eventSubscriptions The list of all Event Subscriptions on this account. 32 | * @param uri URI of the Event Subscriptions list API resource. 33 | * @param nextPageUri URI of next page, or null if there is no next page. 34 | */ 35 | @JsonCreator 36 | public EventSubscriptionList( 37 | @JsonProperty("event_subscriptions") final java.util.List eventSubscriptions, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.eventSubscriptions = eventSubscriptions != null ? eventSubscriptions : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * The list of all Event Subscriptions on this account. 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link EventSubscription} 50 | */ 51 | public java.util.List getEventSubscriptions() { 52 | return this.eventSubscriptions; 53 | } 54 | 55 | /** 56 | * URI of the Event Subscriptions list API resource. 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of next page, or null if there is no next page. 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final EventSubscriptionList other = (EventSubscriptionList) o; 83 | return 84 | this.eventSubscriptions.equals(other.eventSubscriptions)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.eventSubscriptions, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "EventSubscriptionList{" + 102 | "eventSubscriptions='" + this.eventSubscriptions + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/ApplicationSessionList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link ApplicationSessionList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class ApplicationSessionList implements Pageable { 18 | @JsonProperty("application_sessions") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List applicationSessions; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link ApplicationSessionList}. 30 | * 31 | * @param applicationSessions list of all application sessions on this account 32 | * @param uri URI of the application session list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public ApplicationSessionList( 37 | @JsonProperty("application_sessions") final java.util.List applicationSessions, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.applicationSessions = applicationSessions != null ? applicationSessions : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * list of all application sessions on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link ApplicationSession} 50 | */ 51 | public java.util.List getApplicationSessions() { 52 | return this.applicationSessions; 53 | } 54 | 55 | /** 56 | * URI of the application session list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final ApplicationSessionList other = (ApplicationSessionList) o; 83 | return 84 | this.applicationSessions.equals(other.applicationSessions)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.applicationSessions, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "ApplicationSessionList{" + 102 | "applicationSessions='" + this.applicationSessions + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/test/java/com/ngrok/definitions/ApiKeyTest.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.core.JsonProcessingException; 6 | import com.ngrok.ApiKeyTestBase; 7 | import org.junit.jupiter.api.Test; 8 | 9 | import static org.assertj.core.api.Assertions.assertThat; 10 | import static org.junit.jupiter.api.Assertions.assertThrows; 11 | 12 | public class ApiKeyTest extends ApiKeyTestBase { 13 | @Test 14 | public void testApiKeySerialization() throws JsonProcessingException { 15 | final String jsonRep = MAPPER.writeValueAsString(API_KEY); 16 | assertThat(jsonRep).contains( 17 | jsonStrForField(API_KEY_JSON_FIELDS, "id"), 18 | jsonStrForField(API_KEY_JSON_FIELDS, "uri"), 19 | jsonStrForField(API_KEY_JSON_FIELDS, "description"), 20 | jsonStrForField(API_KEY_JSON_FIELDS, "metadata"), 21 | jsonStrForField(API_KEY_JSON_FIELDS, "created_at"), 22 | jsonStrForField(API_KEY_JSON_FIELDS, "token") 23 | ); 24 | } 25 | 26 | @Test 27 | public void testApiKeySerializationOptionalField() throws JsonProcessingException { 28 | final String jsonRep = MAPPER.writeValueAsString(API_KEY_NO_TOKEN); 29 | assertThat(jsonRep).contains( 30 | jsonStrForField(API_KEY_JSON_FIELDS, "id"), 31 | jsonStrForField(API_KEY_JSON_FIELDS, "uri"), 32 | jsonStrForField(API_KEY_JSON_FIELDS, "description"), 33 | jsonStrForField(API_KEY_JSON_FIELDS, "metadata"), 34 | jsonStrForField(API_KEY_JSON_FIELDS, "created_at") 35 | ); 36 | } 37 | 38 | @Test 39 | public void testApiKeyDeserialization() throws JsonProcessingException { 40 | final String jsonStr = "{" + 41 | String.join(",", 42 | jsonStrForField(API_KEY_JSON_FIELDS, "id"), 43 | jsonStrForField(API_KEY_JSON_FIELDS, "uri"), 44 | jsonStrForField(API_KEY_JSON_FIELDS, "description"), 45 | jsonStrForField(API_KEY_JSON_FIELDS, "metadata"), 46 | jsonStrForField(API_KEY_JSON_FIELDS, "created_at"), 47 | jsonStrForField(API_KEY_JSON_FIELDS, "token") 48 | ) + 49 | "}"; 50 | 51 | final ApiKey apiKey = MAPPER.readValue(jsonStr, ApiKey.class); 52 | assertApiKeyFields(apiKey); 53 | } 54 | 55 | @Test 56 | public void testApiKeyDeserializationOptionalField() throws JsonProcessingException { 57 | final String jsonStr = "{" + 58 | String.join(",", 59 | jsonStrForField(API_KEY_JSON_FIELDS, "id"), 60 | jsonStrForField(API_KEY_JSON_FIELDS, "uri"), 61 | jsonStrForField(API_KEY_JSON_FIELDS, "description"), 62 | jsonStrForField(API_KEY_JSON_FIELDS, "metadata"), 63 | jsonStrForField(API_KEY_JSON_FIELDS, "created_at") 64 | ) + 65 | "}"; 66 | 67 | final ApiKey apiKey = MAPPER.readValue(jsonStr, ApiKey.class); 68 | assertThat(apiKey.getId()).isEqualTo(API_KEY_JSON_FIELDS.get("id")); 69 | assertThat(apiKey.getUri()).isEqualTo(API_KEY_JSON_FIELDS.get("uri")); 70 | assertThat(apiKey.getDescription()).isEqualTo(API_KEY_JSON_FIELDS.get("description")); 71 | assertThat(apiKey.getMetadata()).isEqualTo(API_KEY_JSON_FIELDS.get("metadata")); 72 | assertThat(apiKey.getCreatedAt()).isEqualTo(API_KEY_JSON_FIELDS.get("created_at")); 73 | assertThat(apiKey.getToken()).isEmpty(); 74 | } 75 | 76 | @Test 77 | public void testApiKeyDeserializationMissingRequiredField() throws JsonProcessingException { 78 | final String jsonStr = "{" + 79 | String.join(",", 80 | jsonStrForField(API_KEY_JSON_FIELDS, "id"), 81 | jsonStrForField(API_KEY_JSON_FIELDS, "uri"), 82 | jsonStrForField(API_KEY_JSON_FIELDS, "description"), 83 | jsonStrForField(API_KEY_JSON_FIELDS, "metadata") 84 | ) + 85 | "}"; 86 | assertThrows(JsonProcessingException.class, () -> 87 | MAPPER.readValue(jsonStr, ApiKey.class) 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/NgrokApiError.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonProperty; 8 | 9 | import java.util.Arrays; 10 | import java.util.Collections; 11 | import java.util.HashMap; 12 | import java.util.HashSet; 13 | import java.util.Map; 14 | import java.util.Optional; 15 | import java.util.Set; 16 | 17 | /** 18 | * Representation of an API error from ngrok. 19 | */ 20 | @JsonIgnoreProperties(ignoreUnknown = true) 21 | public class NgrokApiError extends RuntimeException { 22 | /** */ 23 | private final int httpStatusCode; 24 | /** */ 25 | private final Optional errorCode; 26 | /** */ 27 | private final Map details; 28 | 29 | /** 30 | * Creates a new API error. 31 | * 32 | * @param message informative message 33 | * @param httpStatusCode HTTP response status 34 | * @param errorCode ngrok API error code 35 | * @param details arbitrary error details 36 | */ 37 | @JsonCreator 38 | public NgrokApiError(@JsonProperty("msg") final String message, 39 | @JsonProperty("status_code") final int httpStatusCode, 40 | @JsonProperty("error_code") final Optional errorCode, 41 | @JsonProperty("details") final Map details) 42 | { 43 | super(message != null ? message : "HTTP server returned status " + httpStatusCode); 44 | this.httpStatusCode = httpStatusCode; 45 | this.errorCode = errorCode != null ? errorCode : Optional.empty(); 46 | this.details = details != null ? details : Collections.emptyMap(); 47 | } 48 | 49 | /** 50 | * Creates a new API error. 51 | * 52 | * @param httpStatusCode HTTP response status 53 | * @param responseBody possible response body 54 | * @param cause exception cause 55 | */ 56 | public NgrokApiError(final int httpStatusCode, final Optional responseBody, final Throwable cause) { 57 | super(cause.getMessage(), cause); 58 | this.httpStatusCode = httpStatusCode; 59 | this.errorCode = Optional.empty(); 60 | this.details = responseBody.map(body -> { 61 | final Map details = new HashMap<>(); 62 | details.put("response_body", body); 63 | return Collections.unmodifiableMap(details); 64 | }).orElse(Collections.emptyMap()); 65 | } 66 | 67 | /** 68 | * Creates a new API error. 69 | * 70 | * @param httpStatusCode HTTP response status 71 | */ 72 | public NgrokApiError(final int httpStatusCode) { 73 | this("HTTP server returned status " + httpStatusCode, httpStatusCode, Optional.empty(), Collections.emptyMap()); 74 | } 75 | 76 | /** 77 | * Fetches the HTTP status code. 78 | * 79 | * @return HTTP response status 80 | */ 81 | public int getHttpStatusCode() { 82 | return this.httpStatusCode; 83 | } 84 | 85 | /** 86 | * Fetches the ngrok API error code, if any. 87 | * 88 | * @return ngrok API error code 89 | */ 90 | public Optional getErrorCode() { 91 | return this.errorCode; 92 | } 93 | 94 | /** 95 | * Fetches any further details about the error. 96 | * 97 | * @return key-value map containing error details 98 | */ 99 | public Map getDetails() { 100 | return this.details; 101 | } 102 | 103 | /** 104 | * Checks if this error object contains one of the provided codes. 105 | * 106 | * @param codes error codes to check 107 | * @return whether or not one of the codes matches what is in this error object 108 | */ 109 | public boolean isErrorCode(final String... codes) { 110 | final Set codeSet = new HashSet<>(Arrays.asList(codes)); 111 | return this.errorCode.filter(codeSet::contains).isPresent(); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/SshHostCertificateList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link SshHostCertificateList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class SshHostCertificateList implements Pageable { 18 | @JsonProperty("ssh_host_certificates") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List sshHostCertificates; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link SshHostCertificateList}. 30 | * 31 | * @param sshHostCertificates the list of all ssh host certificates on this account 32 | * @param uri URI of the ssh host certificates list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public SshHostCertificateList( 37 | @JsonProperty("ssh_host_certificates") final java.util.List sshHostCertificates, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.sshHostCertificates = sshHostCertificates != null ? sshHostCertificates : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all ssh host certificates on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link SshHostCertificate} 50 | */ 51 | public java.util.List getSshHostCertificates() { 52 | return this.sshHostCertificates; 53 | } 54 | 55 | /** 56 | * URI of the ssh host certificates list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final SshHostCertificateList other = (SshHostCertificateList) o; 83 | return 84 | this.sshHostCertificates.equals(other.sshHostCertificates)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.sshHostCertificates, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "SshHostCertificateList{" + 102 | "sshHostCertificates='" + this.sshHostCertificates + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/ngrok/definitions/SshUserCertificateList.java: -------------------------------------------------------------------------------- 1 | /* Code generated for API Clients. DO NOT EDIT. */ 2 | 3 | package com.ngrok.definitions; 4 | 5 | import com.fasterxml.jackson.annotation.JsonCreator; 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 7 | import com.fasterxml.jackson.annotation.JsonInclude; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | import java.util.Objects; 11 | import java.util.Optional; 12 | 13 | /** 14 | * A class encapsulating the {@link SshUserCertificateList} resource. 15 | */ 16 | @JsonIgnoreProperties(ignoreUnknown = true) 17 | public class SshUserCertificateList implements Pageable { 18 | @JsonProperty("ssh_user_certificates") 19 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 20 | private final java.util.List sshUserCertificates; 21 | @JsonProperty("uri") 22 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 23 | private final java.net.URI uri; 24 | @JsonProperty("next_page_uri") 25 | @JsonInclude(value = JsonInclude.Include.NON_ABSENT) 26 | private final Optional nextPageUri; 27 | 28 | /** 29 | * Creates a new instance of {@link SshUserCertificateList}. 30 | * 31 | * @param sshUserCertificates the list of all ssh user certificates on this account 32 | * @param uri URI of the ssh user certificates list API resource 33 | * @param nextPageUri URI of the next page, or null if there is no next page 34 | */ 35 | @JsonCreator 36 | public SshUserCertificateList( 37 | @JsonProperty("ssh_user_certificates") final java.util.List sshUserCertificates, 38 | @JsonProperty("uri") final java.net.URI uri, 39 | @JsonProperty("next_page_uri") final Optional nextPageUri 40 | ) { 41 | this.sshUserCertificates = sshUserCertificates != null ? sshUserCertificates : java.util.Collections.emptyList(); 42 | this.uri = Objects.requireNonNull(uri, "uri is required"); 43 | this.nextPageUri = nextPageUri != null ? nextPageUri : Optional.empty(); 44 | } 45 | 46 | /** 47 | * the list of all ssh user certificates on this account 48 | * 49 | * @return the value of the property as a {@link java.util.List} of {@link SshUserCertificate} 50 | */ 51 | public java.util.List getSshUserCertificates() { 52 | return this.sshUserCertificates; 53 | } 54 | 55 | /** 56 | * URI of the ssh user certificates list API resource 57 | * 58 | * @return the value of the property as a {@link java.net.URI} 59 | */ 60 | public java.net.URI getUri() { 61 | return this.uri; 62 | } 63 | 64 | /** 65 | * URI of the next page, or null if there is no next page 66 | * 67 | * @return the value of the property as a {@link java.net.URI} wrapped in an {@link Optional} 68 | */ 69 | public Optional getNextPageUri() { 70 | return this.nextPageUri; 71 | } 72 | 73 | @Override 74 | public boolean equals(final Object o) { 75 | if (this == o) { 76 | return true; 77 | } 78 | if (o == null || getClass() != o.getClass()) { 79 | return false; 80 | } 81 | 82 | final SshUserCertificateList other = (SshUserCertificateList) o; 83 | return 84 | this.sshUserCertificates.equals(other.sshUserCertificates)&& 85 | this.uri.equals(other.uri)&& 86 | this.nextPageUri.equals(other.nextPageUri); 87 | 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash( 93 | this.sshUserCertificates, 94 | this.uri, 95 | this.nextPageUri 96 | ); 97 | } 98 | 99 | @Override 100 | public String toString() { 101 | return "SshUserCertificateList{" + 102 | "sshUserCertificates='" + this.sshUserCertificates + 103 | "', uri='" + this.uri + 104 | "', nextPageUri='" + this.nextPageUri.map(Object::toString).orElse("(null)") + 105 | "'}"; 106 | } 107 | } 108 | --------------------------------------------------------------------------------