ngrok_api/
types.rs

1// Code generated for API Clients. DO NOT EDIT.
2
3use serde::{Deserialize, Serialize};
4use std::collections::HashMap;
5
6#[derive(Clone, Debug, Default, Deserialize, Serialize)]
7pub struct Item {
8    /// a resource identifier
9    pub id: String,
10}
11
12#[derive(Clone, Debug, Default, Deserialize, Serialize)]
13pub struct Paging {
14    pub before_id: Option<String>,
15    pub limit: Option<String>,
16}
17
18#[derive(Clone, Debug, Default, Deserialize, Serialize)]
19pub struct FilteredPaging {
20    /// Expects a resource ID as its input. Returns earlier entries in the result set,
21    /// sorted by ID.
22    pub before_id: Option<String>,
23    /// Constrains the number of results in the dataset. See the [API
24    /// Overview](https://ngrok.com/docs/api/index#pagination) for details.
25    pub limit: Option<String>,
26    /// A CEL expression to filter the list results. Supports logical and comparison
27    /// operators to match on fields such as `id`, `metadata`, `created_at`, and more.
28    /// See ngrok API Filtering for syntax and field details:
29    /// https://ngrok.com/docs/api/api-filtering.
30    pub filter: Option<String>,
31}
32
33#[derive(Clone, Debug, Default, Deserialize, Serialize)]
34pub struct ItemPaging {
35    /// a resource identifier
36    pub id: String,
37    pub before_id: Option<String>,
38    pub limit: Option<String>,
39}
40
41#[derive(Clone, Debug, Default, Deserialize, Serialize)]
42pub struct Error {
43    pub error_code: String,
44    pub status_code: i32,
45    pub msg: String,
46    pub details: HashMap<String, String>,
47}
48
49#[derive(Clone, Debug, Default, Deserialize, Serialize)]
50pub struct Ref {
51    /// a resource identifier
52    pub id: String,
53    /// a uri for locating a resource
54    pub uri: String,
55}
56
57#[derive(Clone, Debug, Default, Deserialize, Serialize)]
58pub struct AbuseReport {
59    /// ID of the abuse report
60    pub id: String,
61    /// URI of the abuse report API resource
62    pub uri: String,
63    /// timestamp that the abuse report record was created in RFC 3339 format
64    pub created_at: String,
65    /// a list of URLs containing suspected abusive content
66    pub urls: Vec<String>,
67    /// arbitrary user-defined data about this abuse report. Optional, max 4096 bytes.
68    pub metadata: String,
69    /// Indicates whether ngrok has processed the abuse report. one of `PENDING`,
70    /// `PROCESSED`, or `PARTIALLY_PROCESSED`
71    pub status: String,
72    /// an array of hostname statuses related to the report
73    pub hostnames: Vec<AbuseReportHostname>,
74}
75
76#[derive(Clone, Debug, Default, Deserialize, Serialize)]
77pub struct AbuseReportHostname {
78    /// the hostname ngrok has parsed out of one of the reported URLs in this abuse
79    /// report
80    pub hostname: String,
81    /// indicates what action ngrok has taken against the hostname. one of `PENDING`,
82    /// `BANNED`, `UNBANNED`, or `IGNORE`
83    pub status: String,
84}
85
86#[derive(Clone, Debug, Default, Deserialize, Serialize)]
87pub struct AbuseReportCreate {
88    /// a list of URLs containing suspected abusive content
89    pub urls: Vec<String>,
90    /// arbitrary user-defined data about this abuse report. Optional, max 4096 bytes.
91    pub metadata: String,
92}
93
94#[derive(Clone, Debug, Default, Deserialize, Serialize)]
95pub struct AgentIngressCreate {
96    /// human-readable description of the use of this Agent Ingress. optional, max 255
97    /// bytes.
98    pub description: String,
99    /// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
100    /// max 4096 bytes
101    pub metadata: String,
102    /// the domain that you own to be used as the base domain name to generate regional
103    /// agent ingress domains.
104    pub domain: String,
105    /// configuration for automatic management of TLS certificates for this domain, or
106    /// null if automatic management is disabled. Optional.
107    pub certificate_management_policy: Option<AgentIngressCertPolicy>,
108}
109
110#[derive(Clone, Debug, Default, Deserialize, Serialize)]
111pub struct AgentIngressUpdate {
112    pub id: String,
113    /// human-readable description of the use of this Agent Ingress. optional, max 255
114    /// bytes.
115    pub description: Option<String>,
116    /// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
117    /// max 4096 bytes
118    pub metadata: Option<String>,
119    /// configuration for automatic management of TLS certificates for this domain, or
120    /// null if automatic management is disabled. Optional.
121    pub certificate_management_policy: Option<AgentIngressCertPolicy>,
122}
123
124#[derive(Clone, Debug, Default, Deserialize, Serialize)]
125pub struct AgentIngress {
126    /// unique Agent Ingress resource identifier
127    pub id: String,
128    /// URI to the API resource of this Agent ingress
129    pub uri: String,
130    /// human-readable description of the use of this Agent Ingress. optional, max 255
131    /// bytes.
132    pub description: String,
133    /// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
134    /// max 4096 bytes
135    pub metadata: String,
136    /// the domain that you own to be used as the base domain name to generate regional
137    /// agent ingress domains.
138    pub domain: String,
139    /// a list of target values to use as the values of NS records for the domain
140    /// property these values will delegate control over the domain to ngrok
141    pub ns_targets: Vec<String>,
142    /// a list of regional agent ingress domains that are subdomains of the value of
143    /// domain this value may increase over time as ngrok adds more regions
144    pub region_domains: Vec<String>,
145    /// timestamp when the Agent Ingress was created, RFC 3339 format
146    pub created_at: String,
147    /// configuration for automatic management of TLS certificates for this domain, or
148    /// null if automatic management is disabled
149    pub certificate_management_policy: Option<AgentIngressCertPolicy>,
150    /// status of the automatic certificate management for this domain, or null if
151    /// automatic management is disabled
152    pub certificate_management_status: Option<AgentIngressCertStatus>,
153}
154
155#[derive(Clone, Debug, Default, Deserialize, Serialize)]
156pub struct AgentIngressList {
157    /// the list of Agent Ingresses owned by this account
158    pub ingresses: Vec<AgentIngress>,
159    /// URI of the Agent Ingress list API resource
160    pub uri: String,
161    /// URI of the next page, or null if there is no next page
162    pub next_page_uri: Option<String>,
163}
164
165#[derive(Clone, Debug, Default, Deserialize, Serialize)]
166pub struct AgentIngressCertPolicy {
167    /// certificate authority to request certificates from. The only supported value is
168    /// letsencrypt.
169    pub authority: String,
170    /// type of private key to use when requesting certificates. Defaults to rsa, can be
171    /// either rsa or ecdsa.
172    pub private_key_type: String,
173}
174
175#[derive(Clone, Debug, Default, Deserialize, Serialize)]
176pub struct AgentIngressCertStatus {
177    /// timestamp when the next renewal will be requested, RFC 3339 format
178    pub renews_at: Option<String>,
179    /// status of the certificate provisioning job, or null if the certificiate isn't
180    /// being provisioned or renewed
181    pub provisioning_job: Option<AgentIngressCertJob>,
182}
183
184#[derive(Clone, Debug, Default, Deserialize, Serialize)]
185pub struct AgentIngressCertJob {
186    /// if present, an error code indicating why provisioning is failing. It may be
187    /// either a temporary condition (INTERNAL_ERROR), or a permanent one the user must
188    /// correct (DNS_ERROR).
189    pub error_code: Option<String>,
190    /// a message describing the current status or error
191    pub msg: String,
192    /// timestamp when the provisioning job started, RFC 3339 format
193    pub started_at: String,
194    /// timestamp when the provisioning job will be retried
195    pub retries_at: Option<String>,
196}
197
198#[derive(Clone, Debug, Default, Deserialize, Serialize)]
199pub struct APIKeyCreate {
200    /// human-readable description of what uses the API key to authenticate. optional,
201    /// max 255 bytes.
202    pub description: String,
203    /// arbitrary user-defined data of this API key. optional, max 4096 bytes
204    pub metadata: String,
205    /// If supplied at credential creation, ownership will be assigned to the specified
206    /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
207    /// the authenticated User or Bot.
208    pub owner_id: Option<String>,
209}
210
211#[derive(Clone, Debug, Default, Deserialize, Serialize)]
212pub struct APIKeyUpdate {
213    pub id: String,
214    /// human-readable description of what uses the API key to authenticate. optional,
215    /// max 255 bytes.
216    pub description: Option<String>,
217    /// arbitrary user-defined data of this API key. optional, max 4096 bytes
218    pub metadata: Option<String>,
219}
220
221#[derive(Clone, Debug, Default, Deserialize, Serialize)]
222pub struct APIKey {
223    /// unique API key resource identifier
224    pub id: String,
225    /// URI to the API resource of this API key
226    pub uri: String,
227    /// human-readable description of what uses the API key to authenticate. optional,
228    /// max 255 bytes.
229    pub description: String,
230    /// arbitrary user-defined data of this API key. optional, max 4096 bytes
231    pub metadata: String,
232    /// timestamp when the api key was created, RFC 3339 format
233    pub created_at: String,
234    /// the bearer token that can be placed into the Authorization header to
235    /// authenticate request to the ngrok API. **This value is only available one time,
236    /// on the API response from key creation. Otherwise it is null.**
237    pub token: Option<String>,
238    /// If supplied at credential creation, ownership will be assigned to the specified
239    /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
240    /// the authenticated User or Bot.
241    pub owner_id: Option<String>,
242}
243
244#[derive(Clone, Debug, Default, Deserialize, Serialize)]
245pub struct APIKeyList {
246    /// the list of API keys for this account
247    pub keys: Vec<APIKey>,
248    /// URI of the API keys list API resource
249    pub uri: String,
250    /// URI of the next page, or null if there is no next page
251    pub next_page_uri: Option<String>,
252}
253
254#[derive(Clone, Debug, Default, Deserialize, Serialize)]
255pub struct ApplicationSession {
256    /// unique application session resource identifier
257    pub id: String,
258    /// URI of the application session API resource
259    pub uri: String,
260    /// URL of the hostport served by this endpoint
261    pub public_url: String,
262    /// browser session details of the application session
263    pub browser_session: BrowserSession,
264    /// application user this session is associated with
265    pub application_user: Option<Ref>,
266    /// timestamp when the user was created in RFC 3339 format
267    pub created_at: String,
268    /// timestamp when the user was last active in RFC 3339 format
269    pub last_active: String,
270    /// timestamp when session expires in RFC 3339 format
271    pub expires_at: String,
272    /// ephemeral endpoint this session is associated with
273    pub endpoint: Option<Ref>,
274    /// edge this session is associated with, null if the endpoint is agent-initiated
275    pub edge: Option<Ref>,
276    /// route this session is associated with, null if the endpoint is agent-initiated
277    pub route: Option<Ref>,
278}
279
280#[derive(Clone, Debug, Default, Deserialize, Serialize)]
281pub struct ApplicationSessionList {
282    /// list of all application sessions on this account
283    pub application_sessions: Vec<ApplicationSession>,
284    /// URI of the application session list API resource
285    pub uri: String,
286    /// URI of the next page, or null if there is no next page
287    pub next_page_uri: Option<String>,
288}
289
290#[derive(Clone, Debug, Default, Deserialize, Serialize)]
291pub struct BrowserSession {
292    /// HTTP User-Agent data
293    pub user_agent: UserAgent,
294    /// IP address
295    pub ip_address: String,
296    /// IP geolocation data
297    pub location: Option<Location>,
298}
299
300#[derive(Clone, Debug, Default, Deserialize, Serialize)]
301pub struct UserAgent {
302    /// raw User-Agent request header
303    pub raw: String,
304    /// browser name (e.g. Chrome)
305    pub browser_name: String,
306    /// browser version (e.g. 102)
307    pub browser_version: String,
308    /// type of device (e.g. Desktop)
309    pub device_type: String,
310    /// operating system name (e.g. MacOS)
311    pub os_name: String,
312    /// operating system version (e.g. 10.15.7)
313    pub os_version: String,
314}
315
316#[derive(Clone, Debug, Default, Deserialize, Serialize)]
317pub struct Location {
318    /// ISO country code
319    pub country_code: Option<String>,
320    /// geographical latitude
321    pub latitude: Option<f64>,
322    /// geographical longitude
323    pub longitude: Option<f64>,
324    /// accuracy radius of the geographical coordinates
325    pub lat_long_radius_km: Option<u64>,
326}
327
328#[derive(Clone, Debug, Default, Deserialize, Serialize)]
329pub struct ApplicationUser {
330    /// unique application user resource identifier
331    pub id: String,
332    /// URI of the application user API resource
333    pub uri: String,
334    /// identity provider that the user authenticated with
335    pub identity_provider: IdentityProvider,
336    /// unique user identifier
337    pub provider_user_id: String,
338    /// user username
339    pub username: String,
340    /// user email
341    pub email: String,
342    /// user common name
343    pub name: String,
344    /// timestamp when the user was created in RFC 3339 format
345    pub created_at: String,
346    /// timestamp when the user was last active in RFC 3339 format
347    pub last_active: String,
348    /// timestamp when the user last signed-in in RFC 3339 format
349    pub last_login: String,
350}
351
352#[derive(Clone, Debug, Default, Deserialize, Serialize)]
353pub struct ApplicationUserList {
354    /// list of all application users on this account
355    pub application_users: Vec<ApplicationUser>,
356    /// URI of the application user list API resource
357    pub uri: String,
358    /// URI of the next page, or null if there is no next page
359    pub next_page_uri: Option<String>,
360}
361
362#[derive(Clone, Debug, Default, Deserialize, Serialize)]
363pub struct IdentityProvider {
364    /// name of the identity provider (e.g. Google)
365    pub name: String,
366    /// URL of the identity provider (e.g. https://accounts.google.com)
367    pub url: String,
368}
369
370#[derive(Clone, Debug, Default, Deserialize, Serialize)]
371pub struct TunnelSession {
372    /// version of the ngrok agent that started this ngrok tunnel session
373    pub agent_version: String,
374    /// reference to the tunnel credential or ssh credential used by the ngrok agent to
375    /// start this tunnel session
376    pub credential: Ref,
377    /// unique tunnel session resource identifier
378    pub id: String,
379    /// source ip address of the tunnel session
380    pub ip: String,
381    /// arbitrary user-defined data specified in the metadata property in the ngrok
382    /// configuration file. See the metadata configuration option
383    pub metadata: String,
384    /// operating system of the host the ngrok agent is running on
385    pub os: String,
386    /// the ngrok region identifier in which this tunnel session was started
387    pub region: String,
388    /// time when the tunnel session first connected to the ngrok servers
389    pub started_at: String,
390    /// the transport protocol used to start the tunnel session. Either `ngrok/v2` or
391    /// `ssh`
392    pub transport: String,
393    /// URI to the API resource of the tunnel session
394    pub uri: String,
395}
396
397#[derive(Clone, Debug, Default, Deserialize, Serialize)]
398pub struct TunnelSessionList {
399    /// list of all tunnel sessions on this account
400    pub tunnel_sessions: Vec<TunnelSession>,
401    /// URI to the API resource of the tunnel session list
402    pub uri: String,
403    /// URI of the next page, or null if there is no next page
404    pub next_page_uri: Option<String>,
405}
406
407#[derive(Clone, Debug, Default, Deserialize, Serialize)]
408pub struct TunnelSessionsUpdate {
409    pub id: String,
410}
411
412#[derive(Clone, Debug, Default, Deserialize, Serialize)]
413pub struct FailoverBackend {
414    /// unique identifier for this Failover backend
415    pub id: String,
416    /// URI of the FailoverBackend API resource
417    pub uri: String,
418    /// timestamp when the backend was created, RFC 3339 format
419    pub created_at: String,
420    /// human-readable description of this backend. Optional
421    pub description: String,
422    /// arbitrary user-defined machine-readable data of this backend. Optional
423    pub metadata: String,
424    /// the ids of the child backends in order
425    pub backends: Vec<String>,
426}
427
428#[derive(Clone, Debug, Default, Deserialize, Serialize)]
429pub struct FailoverBackendCreate {
430    /// human-readable description of this backend. Optional
431    pub description: String,
432    /// arbitrary user-defined machine-readable data of this backend. Optional
433    pub metadata: String,
434    /// the ids of the child backends in order
435    pub backends: Vec<String>,
436}
437
438#[derive(Clone, Debug, Default, Deserialize, Serialize)]
439pub struct FailoverBackendUpdate {
440    pub id: String,
441    /// human-readable description of this backend. Optional
442    pub description: Option<String>,
443    /// arbitrary user-defined machine-readable data of this backend. Optional
444    pub metadata: Option<String>,
445    /// the ids of the child backends in order
446    pub backends: Vec<String>,
447}
448
449#[derive(Clone, Debug, Default, Deserialize, Serialize)]
450pub struct FailoverBackendList {
451    /// the list of all Failover backends on this account
452    pub backends: Vec<FailoverBackend>,
453    /// URI of the Failover backends list API resource
454    pub uri: String,
455    /// URI of the next page, or null if there is no next page
456    pub next_page_uri: Option<String>,
457}
458
459#[derive(Clone, Debug, Default, Deserialize, Serialize)]
460pub struct HTTPResponseBackend {
461    pub id: String,
462    /// URI of the HTTPResponseBackend API resource
463    pub uri: String,
464    /// timestamp when the backend was created, RFC 3339 format
465    pub created_at: String,
466    /// human-readable description of this backend. Optional
467    pub description: String,
468    /// arbitrary user-defined machine-readable data of this backend. Optional
469    pub metadata: String,
470    /// body to return as fixed content
471    pub body: String,
472    /// headers to return
473    pub headers: HashMap<String, String>,
474    /// status code to return
475    pub status_code: i32,
476}
477
478#[derive(Clone, Debug, Default, Deserialize, Serialize)]
479pub struct HTTPResponseBackendCreate {
480    /// human-readable description of this backend. Optional
481    pub description: String,
482    /// arbitrary user-defined machine-readable data of this backend. Optional
483    pub metadata: String,
484    /// body to return as fixed content
485    pub body: String,
486    /// headers to return
487    pub headers: HashMap<String, String>,
488    /// status code to return
489    pub status_code: Option<i32>,
490}
491
492#[derive(Clone, Debug, Default, Deserialize, Serialize)]
493pub struct HTTPResponseBackendUpdate {
494    pub id: String,
495    /// human-readable description of this backend. Optional
496    pub description: Option<String>,
497    /// arbitrary user-defined machine-readable data of this backend. Optional
498    pub metadata: Option<String>,
499    /// body to return as fixed content
500    pub body: Option<String>,
501    /// headers to return
502    pub headers: Option<HashMap<String, String>>,
503    /// status code to return
504    pub status_code: Option<i32>,
505}
506
507#[derive(Clone, Debug, Default, Deserialize, Serialize)]
508pub struct HTTPResponseBackendList {
509    pub backends: Vec<HTTPResponseBackend>,
510    pub uri: String,
511    pub next_page_uri: Option<String>,
512}
513
514#[derive(Clone, Debug, Default, Deserialize, Serialize)]
515pub struct StaticBackend {
516    /// unique identifier for this static backend
517    pub id: String,
518    /// URI of the StaticBackend API resource
519    pub uri: String,
520    /// timestamp when the backend was created, RFC 3339 format
521    pub created_at: String,
522    /// human-readable description of this backend. Optional
523    pub description: String,
524    /// arbitrary user-defined machine-readable data of this backend. Optional
525    pub metadata: String,
526    /// the address to forward to
527    pub address: String,
528    /// tls configuration to use
529    pub tls: StaticBackendTLS,
530}
531
532#[derive(Clone, Debug, Default, Deserialize, Serialize)]
533pub struct StaticBackendTLS {
534    /// if TLS is checked
535    pub enabled: bool,
536}
537
538#[derive(Clone, Debug, Default, Deserialize, Serialize)]
539pub struct StaticBackendCreate {
540    /// human-readable description of this backend. Optional
541    pub description: String,
542    /// arbitrary user-defined machine-readable data of this backend. Optional
543    pub metadata: String,
544    /// the address to forward to
545    pub address: String,
546    /// tls configuration to use
547    pub tls: StaticBackendTLS,
548}
549
550#[derive(Clone, Debug, Default, Deserialize, Serialize)]
551pub struct StaticBackendUpdate {
552    pub id: String,
553    /// human-readable description of this backend. Optional
554    pub description: Option<String>,
555    /// arbitrary user-defined machine-readable data of this backend. Optional
556    pub metadata: Option<String>,
557    /// the address to forward to
558    pub address: String,
559    /// tls configuration to use
560    pub tls: StaticBackendTLS,
561}
562
563#[derive(Clone, Debug, Default, Deserialize, Serialize)]
564pub struct StaticBackendList {
565    /// the list of all static backends on this account
566    pub backends: Vec<StaticBackend>,
567    /// URI of the static backends list API resource
568    pub uri: String,
569    /// URI of the next page, or null if there is no next page
570    pub next_page_uri: Option<String>,
571}
572
573#[derive(Clone, Debug, Default, Deserialize, Serialize)]
574pub struct TunnelGroupBackend {
575    /// unique identifier for this TunnelGroup backend
576    pub id: String,
577    /// URI of the TunnelGroupBackend API resource
578    pub uri: String,
579    /// timestamp when the backend was created, RFC 3339 format
580    pub created_at: String,
581    /// human-readable description of this backend. Optional
582    pub description: String,
583    /// arbitrary user-defined machine-readable data of this backend. Optional
584    pub metadata: String,
585    /// labels to watch for tunnels on, e.g. app->foo, dc->bar
586    pub labels: HashMap<String, String>,
587    /// tunnels matching this backend
588    pub tunnels: Vec<Ref>,
589}
590
591#[derive(Clone, Debug, Default, Deserialize, Serialize)]
592pub struct TunnelGroupBackendCreate {
593    /// human-readable description of this backend. Optional
594    pub description: String,
595    /// arbitrary user-defined machine-readable data of this backend. Optional
596    pub metadata: String,
597    /// labels to watch for tunnels on, e.g. app->foo, dc->bar
598    pub labels: HashMap<String, String>,
599}
600
601#[derive(Clone, Debug, Default, Deserialize, Serialize)]
602pub struct TunnelGroupBackendUpdate {
603    pub id: String,
604    /// human-readable description of this backend. Optional
605    pub description: Option<String>,
606    /// arbitrary user-defined machine-readable data of this backend. Optional
607    pub metadata: Option<String>,
608    /// labels to watch for tunnels on, e.g. app->foo, dc->bar
609    pub labels: HashMap<String, String>,
610}
611
612#[derive(Clone, Debug, Default, Deserialize, Serialize)]
613pub struct TunnelGroupBackendList {
614    /// the list of all TunnelGroup backends on this account
615    pub backends: Vec<TunnelGroupBackend>,
616    /// URI of the TunnelGroup backends list API resource
617    pub uri: String,
618    /// URI of the next page, or null if there is no next page
619    pub next_page_uri: Option<String>,
620}
621
622#[derive(Clone, Debug, Default, Deserialize, Serialize)]
623pub struct WeightedBackend {
624    /// unique identifier for this Weighted backend
625    pub id: String,
626    /// URI of the WeightedBackend API resource
627    pub uri: String,
628    /// timestamp when the backend was created, RFC 3339 format
629    pub created_at: String,
630    /// human-readable description of this backend. Optional
631    pub description: String,
632    /// arbitrary user-defined machine-readable data of this backend. Optional
633    pub metadata: String,
634    /// the ids of the child backends to their weights [0-10000]
635    pub backends: HashMap<String, i64>,
636}
637
638#[derive(Clone, Debug, Default, Deserialize, Serialize)]
639pub struct WeightedBackendCreate {
640    /// human-readable description of this backend. Optional
641    pub description: String,
642    /// arbitrary user-defined machine-readable data of this backend. Optional
643    pub metadata: String,
644    /// the ids of the child backends to their weights [0-10000]
645    pub backends: HashMap<String, i64>,
646}
647
648#[derive(Clone, Debug, Default, Deserialize, Serialize)]
649pub struct WeightedBackendUpdate {
650    pub id: String,
651    /// human-readable description of this backend. Optional
652    pub description: Option<String>,
653    /// arbitrary user-defined machine-readable data of this backend. Optional
654    pub metadata: Option<String>,
655    /// the ids of the child backends to their weights [0-10000]
656    pub backends: HashMap<String, i64>,
657}
658
659#[derive(Clone, Debug, Default, Deserialize, Serialize)]
660pub struct WeightedBackendList {
661    /// the list of all Weighted backends on this account
662    pub backends: Vec<WeightedBackend>,
663    /// URI of the Weighted backends list API resource
664    pub uri: String,
665    /// URI of the next page, or null if there is no next page
666    pub next_page_uri: Option<String>,
667}
668
669#[derive(Clone, Debug, Default, Deserialize, Serialize)]
670pub struct BotUser {
671    /// unique API key resource identifier
672    pub id: String,
673    /// URI to the API resource of this bot user
674    pub uri: String,
675    /// human-readable name used to identify the bot
676    pub name: String,
677    /// whether or not the bot is active
678    pub active: bool,
679    /// timestamp when the api key was created, RFC 3339 format
680    pub created_at: String,
681}
682
683#[derive(Clone, Debug, Default, Deserialize, Serialize)]
684pub struct BotUserCreate {
685    /// human-readable name used to identify the bot
686    pub name: String,
687    /// whether or not the bot is active
688    pub active: Option<bool>,
689}
690
691#[derive(Clone, Debug, Default, Deserialize, Serialize)]
692pub struct BotUserUpdate {
693    pub id: String,
694    /// human-readable name used to identify the bot
695    pub name: Option<String>,
696    /// whether or not the bot is active
697    pub active: Option<bool>,
698}
699
700#[derive(Clone, Debug, Default, Deserialize, Serialize)]
701pub struct BotUserList {
702    /// the list of all bot users on this account
703    pub bot_users: Vec<BotUser>,
704    /// URI of the bot users list API resource
705    pub uri: String,
706    /// URI of the next page, or null if there is no next page
707    pub next_page_uri: Option<String>,
708}
709
710#[derive(Clone, Debug, Default, Deserialize, Serialize)]
711pub struct CertificateAuthorityCreate {
712    /// human-readable description of this Certificate Authority. optional, max 255
713    /// bytes.
714    pub description: String,
715    /// arbitrary user-defined machine-readable data of this Certificate Authority.
716    /// optional, max 4096 bytes.
717    pub metadata: String,
718    /// raw PEM of the Certificate Authority
719    pub ca_pem: String,
720}
721
722#[derive(Clone, Debug, Default, Deserialize, Serialize)]
723pub struct CertificateAuthorityUpdate {
724    pub id: String,
725    /// human-readable description of this Certificate Authority. optional, max 255
726    /// bytes.
727    pub description: Option<String>,
728    /// arbitrary user-defined machine-readable data of this Certificate Authority.
729    /// optional, max 4096 bytes.
730    pub metadata: Option<String>,
731}
732
733#[derive(Clone, Debug, Default, Deserialize, Serialize)]
734pub struct CertificateAuthority {
735    /// unique identifier for this Certificate Authority
736    pub id: String,
737    /// URI of the Certificate Authority API resource
738    pub uri: String,
739    /// timestamp when the Certificate Authority was created, RFC 3339 format
740    pub created_at: String,
741    /// human-readable description of this Certificate Authority. optional, max 255
742    /// bytes.
743    pub description: String,
744    /// arbitrary user-defined machine-readable data of this Certificate Authority.
745    /// optional, max 4096 bytes.
746    pub metadata: String,
747    /// raw PEM of the Certificate Authority
748    pub ca_pem: String,
749    /// subject common name of the Certificate Authority
750    pub subject_common_name: String,
751    /// timestamp when this Certificate Authority becomes valid, RFC 3339 format
752    pub not_before: String,
753    /// timestamp when this Certificate Authority becomes invalid, RFC 3339 format
754    pub not_after: String,
755    /// set of actions the private key of this Certificate Authority can be used for
756    pub key_usages: Vec<String>,
757    /// extended set of actions the private key of this Certificate Authority can be
758    /// used for
759    pub extended_key_usages: Vec<String>,
760}
761
762#[derive(Clone, Debug, Default, Deserialize, Serialize)]
763pub struct CertificateAuthorityList {
764    /// the list of all certificate authorities on this account
765    pub certificate_authorities: Vec<CertificateAuthority>,
766    /// URI of the certificates authorities list API resource
767    pub uri: String,
768    /// URI of the next page, or null if there is no next page
769    pub next_page_uri: Option<String>,
770}
771
772#[derive(Clone, Debug, Default, Deserialize, Serialize)]
773pub struct CredentialCreate {
774    /// human-readable description of who or what will use the credential to
775    /// authenticate. Optional, max 255 bytes.
776    pub description: String,
777    /// arbitrary user-defined machine-readable data of this credential. Optional, max
778    /// 4096 bytes.
779    pub metadata: String,
780    /// optional list of ACL rules. If unspecified, the credential will have no
781    /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
782    /// `bind` rule allows the caller to restrict what domains, addresses, and labels
783    /// the token is allowed to bind. For example, to allow the token to open a tunnel
784    /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
785    /// Bind rules for domains may specify a leading wildcard to match multiple domains
786    /// with a common suffix. For example, you may specify a rule of
787    /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
788    /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
789    /// value to match multiple labels. For example, you may specify a rule of
790    /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
791    /// is equivalent to no acl at all and will explicitly permit all actions.
792    pub acl: Vec<String>,
793    /// If supplied at credential creation, ownership will be assigned to the specified
794    /// User or Service User. Only admins may specify an owner other than themselves.
795    /// Defaults to the authenticated User or Service User. Accepts one of: User ID,
796    /// User email, or SCIM User ID.
797    pub owner_id: Option<String>,
798}
799
800#[derive(Clone, Debug, Default, Deserialize, Serialize)]
801pub struct CredentialUpdate {
802    pub id: String,
803    /// human-readable description of who or what will use the credential to
804    /// authenticate. Optional, max 255 bytes.
805    pub description: Option<String>,
806    /// arbitrary user-defined machine-readable data of this credential. Optional, max
807    /// 4096 bytes.
808    pub metadata: Option<String>,
809    /// optional list of ACL rules. If unspecified, the credential will have no
810    /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
811    /// `bind` rule allows the caller to restrict what domains, addresses, and labels
812    /// the token is allowed to bind. For example, to allow the token to open a tunnel
813    /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
814    /// Bind rules for domains may specify a leading wildcard to match multiple domains
815    /// with a common suffix. For example, you may specify a rule of
816    /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
817    /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
818    /// value to match multiple labels. For example, you may specify a rule of
819    /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
820    /// is equivalent to no acl at all and will explicitly permit all actions.
821    pub acl: Option<Vec<String>>,
822}
823
824#[derive(Clone, Debug, Default, Deserialize, Serialize)]
825pub struct Credential {
826    /// unique tunnel credential resource identifier
827    pub id: String,
828    /// URI of the tunnel credential API resource
829    pub uri: String,
830    /// timestamp when the tunnel credential was created, RFC 3339 format
831    pub created_at: String,
832    /// human-readable description of who or what will use the credential to
833    /// authenticate. Optional, max 255 bytes.
834    pub description: String,
835    /// arbitrary user-defined machine-readable data of this credential. Optional, max
836    /// 4096 bytes.
837    pub metadata: String,
838    /// the credential's authtoken that can be used to authenticate an ngrok agent.
839    /// **This value is only available one time, on the API response from credential
840    /// creation, otherwise it is null.**
841    pub token: Option<String>,
842    /// optional list of ACL rules. If unspecified, the credential will have no
843    /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
844    /// `bind` rule allows the caller to restrict what domains, addresses, and labels
845    /// the token is allowed to bind. For example, to allow the token to open a tunnel
846    /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
847    /// Bind rules for domains may specify a leading wildcard to match multiple domains
848    /// with a common suffix. For example, you may specify a rule of
849    /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
850    /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
851    /// value to match multiple labels. For example, you may specify a rule of
852    /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
853    /// is equivalent to no acl at all and will explicitly permit all actions.
854    pub acl: Vec<String>,
855    /// If supplied at credential creation, ownership will be assigned to the specified
856    /// User or Service User. Only admins may specify an owner other than themselves.
857    /// Defaults to the authenticated User or Service User. Accepts one of: User ID,
858    /// User email, or SCIM User ID.
859    pub owner_id: Option<String>,
860}
861
862#[derive(Clone, Debug, Default, Deserialize, Serialize)]
863pub struct CredentialList {
864    /// the list of all tunnel credentials on this account
865    pub credentials: Vec<Credential>,
866    /// URI of the tunnel credential list API resource
867    pub uri: String,
868    /// URI of the next page, or null if there is no next page
869    pub next_page_uri: Option<String>,
870}
871
872#[derive(Clone, Debug, Default, Deserialize, Serialize)]
873pub struct EndpointWebhookValidation {
874    /// `true` if the module will be applied to traffic, `false` to disable. default
875    /// `true` if unspecified
876    pub enabled: Option<bool>,
877    /// a string indicating which webhook provider will be sending webhooks to this
878    /// endpoint. Value must be one of the supported providers defined at
879    /// https://ngrok.com/docs/cloud-edge/modules/webhook-verification
880    pub provider: String,
881    /// a string secret used to validate requests from the given provider. All providers
882    /// except AWS SNS require a secret
883    pub secret: String,
884}
885
886#[derive(Clone, Debug, Default, Deserialize, Serialize)]
887pub struct EndpointCompression {
888    /// `true` if the module will be applied to traffic, `false` to disable. default
889    /// `true` if unspecified
890    pub enabled: Option<bool>,
891}
892
893#[derive(Clone, Debug, Default, Deserialize, Serialize)]
894pub struct EndpointMutualTLS {
895    /// `true` if the module will be applied to traffic, `false` to disable. default
896    /// `true` if unspecified
897    pub enabled: Option<bool>,
898    /// PEM-encoded CA certificates that will be used to validate. Multiple CAs may be
899    /// provided by concatenating them together.
900    pub certificate_authorities: Vec<Ref>,
901}
902
903#[derive(Clone, Debug, Default, Deserialize, Serialize)]
904pub struct EndpointMutualTLSMutate {
905    /// `true` if the module will be applied to traffic, `false` to disable. default
906    /// `true` if unspecified
907    pub enabled: Option<bool>,
908    /// list of certificate authorities that will be used to validate the TLS client
909    /// certificate presented by the initiator of the TLS connection
910    pub certificate_authority_ids: Vec<String>,
911}
912
913#[derive(Clone, Debug, Default, Deserialize, Serialize)]
914pub struct EndpointTLSTermination {
915    /// `true` if the module will be applied to traffic, `false` to disable. default
916    /// `true` if unspecified
917    pub enabled: Option<bool>,
918    /// `edge` if the ngrok edge should terminate TLS traffic, `upstream` if TLS traffic
919    /// should be passed through to the upstream ngrok agent / application server for
920    /// termination. if `upstream` is chosen, most other modules will be disallowed
921    /// because they rely on the ngrok edge being able to access the underlying traffic.
922    pub terminate_at: String,
923    /// The minimum TLS version used for termination and advertised to the client during
924    /// the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
925    /// This value must be null if `terminate_at` is set to `upstream`.
926    pub min_version: Option<String>,
927}
928
929#[derive(Clone, Debug, Default, Deserialize, Serialize)]
930pub struct EndpointTLSTerminationAtEdge {
931    /// `true` if the module will be applied to traffic, `false` to disable. default
932    /// `true` if unspecified
933    pub enabled: Option<bool>,
934    /// The minimum TLS version used for termination and advertised to the client during
935    /// the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
936    /// This value must be null if `terminate_at` is set to `upstream`.
937    pub min_version: Option<String>,
938}
939
940#[derive(Clone, Debug, Default, Deserialize, Serialize)]
941pub struct EndpointRequestHeaders {
942    /// `true` if the module will be applied to traffic, `false` to disable. default
943    /// `true` if unspecified
944    pub enabled: Option<bool>,
945    /// a map of header key to header value that will be injected into the HTTP Request
946    /// before being sent to the upstream application server
947    pub add: HashMap<String, String>,
948    /// a list of header names that will be removed from the HTTP Request before being
949    /// sent to the upstream application server
950    pub remove: Vec<String>,
951}
952
953#[derive(Clone, Debug, Default, Deserialize, Serialize)]
954pub struct EndpointResponseHeaders {
955    /// `true` if the module will be applied to traffic, `false` to disable. default
956    /// `true` if unspecified
957    pub enabled: Option<bool>,
958    /// a map of header key to header value that will be injected into the HTTP Response
959    /// returned to the HTTP client
960    pub add: HashMap<String, String>,
961    /// a list of header names that will be removed from the HTTP Response returned to
962    /// the HTTP client
963    pub remove: Vec<String>,
964}
965
966#[derive(Clone, Debug, Default, Deserialize, Serialize)]
967pub struct EndpointIPPolicy {
968    /// `true` if the module will be applied to traffic, `false` to disable. default
969    /// `true` if unspecified
970    pub enabled: Option<bool>,
971    /// list of all IP policies that will be used to check if a source IP is allowed
972    /// access to the endpoint
973    pub ip_policies: Vec<Ref>,
974}
975
976#[derive(Clone, Debug, Default, Deserialize, Serialize)]
977pub struct EndpointIPPolicyMutate {
978    /// `true` if the module will be applied to traffic, `false` to disable. default
979    /// `true` if unspecified
980    pub enabled: Option<bool>,
981    /// list of all IP policies that will be used to check if a source IP is allowed
982    /// access to the endpoint
983    pub ip_policy_ids: Vec<String>,
984}
985
986#[derive(Clone, Debug, Default, Deserialize, Serialize)]
987pub struct EndpointCircuitBreaker {
988    /// `true` if the module will be applied to traffic, `false` to disable. default
989    /// `true` if unspecified
990    pub enabled: Option<bool>,
991    /// Integer number of seconds after which the circuit is tripped to wait before
992    /// re-evaluating upstream health
993    pub tripped_duration: u32,
994    /// Integer number of seconds in the statistical rolling window that metrics are
995    /// retained for.
996    pub rolling_window: u32,
997    /// Integer number of buckets into which metrics are retained. Max 128.
998    pub num_buckets: u32,
999    /// Integer number of requests in a rolling window that will trip the circuit.
1000    /// Helpful if traffic volume is low.
1001    pub volume_threshold: u32,
1002    /// Error threshold percentage should be between 0 - 1.0, not 0-100.0
1003    pub error_threshold_percentage: f64,
1004}
1005
1006#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1007pub struct EndpointOAuth {
1008    /// `true` if the module will be applied to traffic, `false` to disable. default
1009    /// `true` if unspecified
1010    pub enabled: Option<bool>,
1011    /// an object which defines the identity provider to use for authentication and
1012    /// configuration for who may access the endpoint
1013    pub provider: EndpointOAuthProvider,
1014    /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
1015    /// supporting CORS.
1016    pub options_passthrough: bool,
1017    /// the prefix of the session cookie that ngrok sets on the http client to cache
1018    /// authentication. default is 'ngrok.'
1019    pub cookie_prefix: String,
1020    /// Integer number of seconds of inactivity after which if the user has not accessed
1021    /// the endpoint, their session will time out and they will be forced to
1022    /// reauthenticate.
1023    pub inactivity_timeout: u32,
1024    /// Integer number of seconds of the maximum duration of an authenticated session.
1025    /// After this period is exceeded, a user must reauthenticate.
1026    pub maximum_duration: u32,
1027    /// Integer number of seconds after which ngrok guarantees it will refresh user
1028    /// state from the identity provider and recheck whether the user is still
1029    /// authorized to access the endpoint. This is the preferred tunable to use to
1030    /// enforce a minimum amount of time after which a revoked user will no longer be
1031    /// able to access the resource.
1032    pub auth_check_interval: u32,
1033}
1034
1035#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1036pub struct EndpointOAuthProvider {
1037    /// configuration for using github as the identity provider
1038    pub github: Option<EndpointOAuthGitHub>,
1039    /// configuration for using facebook as the identity provider
1040    pub facebook: Option<EndpointOAuthFacebook>,
1041    /// configuration for using microsoft as the identity provider
1042    pub microsoft: Option<EndpointOAuthMicrosoft>,
1043    /// configuration for using google as the identity provider
1044    pub google: Option<EndpointOAuthGoogle>,
1045    /// configuration for using linkedin as the identity provider
1046    pub linkedin: Option<EndpointOAuthLinkedIn>,
1047    /// configuration for using gitlab as the identity provider
1048    pub gitlab: Option<EndpointOAuthGitLab>,
1049    /// configuration for using twitch as the identity provider
1050    pub twitch: Option<EndpointOAuthTwitch>,
1051    /// configuration for using amazon as the identity provider
1052    pub amazon: Option<EndpointOAuthAmazon>,
1053}
1054
1055#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1056pub struct EndpointOAuthGitHub {
1057    /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1058    /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1059    /// its own managed oauth application which has additional restrictions. see the
1060    /// OAuth module docs for more details. if present, client_secret must be present as
1061    /// well.
1062    pub client_id: Option<String>,
1063    /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1064    /// where you created your own OAuth app. optional, see all of the caveats in the
1065    /// docs for `client_id`.
1066    pub client_secret: Option<String>,
1067    /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1068    /// would like to ask for. these may not be set if you are using the ngrok-managed
1069    /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1070    /// scopes)
1071    pub scopes: Option<Vec<String>>,
1072    /// a list of email addresses of users authenticated by identity provider who are
1073    /// allowed access to the endpoint
1074    pub email_addresses: Option<Vec<String>>,
1075    /// a list of email domains of users authenticated by identity provider who are
1076    /// allowed access to the endpoint
1077    pub email_domains: Option<Vec<String>>,
1078    /// a list of github teams identifiers. users will be allowed access to the endpoint
1079    /// if they are a member of any of these teams. identifiers should be in the 'slug'
1080    /// format qualified with the org name, e.g. `org-name/team-name`
1081    pub teams: Option<Vec<String>>,
1082    /// a list of github org identifiers. users who are members of any of the listed
1083    /// organizations will be allowed access. identifiers should be the organization's
1084    /// 'slug'
1085    pub organizations: Option<Vec<String>>,
1086}
1087
1088#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1089pub struct EndpointOAuthFacebook {
1090    /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1091    /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1092    /// its own managed oauth application which has additional restrictions. see the
1093    /// OAuth module docs for more details. if present, client_secret must be present as
1094    /// well.
1095    pub client_id: Option<String>,
1096    /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1097    /// where you created your own OAuth app. optional, see all of the caveats in the
1098    /// docs for `client_id`.
1099    pub client_secret: Option<String>,
1100    /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1101    /// would like to ask for. these may not be set if you are using the ngrok-managed
1102    /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1103    /// scopes)
1104    pub scopes: Vec<String>,
1105    /// a list of email addresses of users authenticated by identity provider who are
1106    /// allowed access to the endpoint
1107    pub email_addresses: Vec<String>,
1108    /// a list of email domains of users authenticated by identity provider who are
1109    /// allowed access to the endpoint
1110    pub email_domains: Vec<String>,
1111}
1112
1113#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1114pub struct EndpointOAuthMicrosoft {
1115    /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1116    /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1117    /// its own managed oauth application which has additional restrictions. see the
1118    /// OAuth module docs for more details. if present, client_secret must be present as
1119    /// well.
1120    pub client_id: Option<String>,
1121    /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1122    /// where you created your own OAuth app. optional, see all of the caveats in the
1123    /// docs for `client_id`.
1124    pub client_secret: Option<String>,
1125    /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1126    /// would like to ask for. these may not be set if you are using the ngrok-managed
1127    /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1128    /// scopes)
1129    pub scopes: Vec<String>,
1130    /// a list of email addresses of users authenticated by identity provider who are
1131    /// allowed access to the endpoint
1132    pub email_addresses: Vec<String>,
1133    /// a list of email domains of users authenticated by identity provider who are
1134    /// allowed access to the endpoint
1135    pub email_domains: Vec<String>,
1136}
1137
1138#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1139pub struct EndpointOAuthGoogle {
1140    /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1141    /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1142    /// its own managed oauth application which has additional restrictions. see the
1143    /// OAuth module docs for more details. if present, client_secret must be present as
1144    /// well.
1145    pub client_id: Option<String>,
1146    /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1147    /// where you created your own OAuth app. optional, see all of the caveats in the
1148    /// docs for `client_id`.
1149    pub client_secret: Option<String>,
1150    /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1151    /// would like to ask for. these may not be set if you are using the ngrok-managed
1152    /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1153    /// scopes)
1154    pub scopes: Vec<String>,
1155    /// a list of email addresses of users authenticated by identity provider who are
1156    /// allowed access to the endpoint
1157    pub email_addresses: Vec<String>,
1158    /// a list of email domains of users authenticated by identity provider who are
1159    /// allowed access to the endpoint
1160    pub email_domains: Vec<String>,
1161}
1162
1163#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1164pub struct EndpointOAuthLinkedIn {
1165    pub client_id: Option<String>,
1166    pub client_secret: Option<String>,
1167    pub scopes: Vec<String>,
1168    pub email_addresses: Vec<String>,
1169    pub email_domains: Vec<String>,
1170}
1171
1172#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1173pub struct EndpointOAuthGitLab {
1174    pub client_id: Option<String>,
1175    pub client_secret: Option<String>,
1176    pub scopes: Vec<String>,
1177    pub email_addresses: Vec<String>,
1178    pub email_domains: Vec<String>,
1179}
1180
1181#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1182pub struct EndpointOAuthTwitch {
1183    pub client_id: Option<String>,
1184    pub client_secret: Option<String>,
1185    pub scopes: Vec<String>,
1186    pub email_addresses: Vec<String>,
1187    pub email_domains: Vec<String>,
1188}
1189
1190#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1191pub struct EndpointOAuthAmazon {
1192    pub client_id: Option<String>,
1193    pub client_secret: Option<String>,
1194    pub scopes: Vec<String>,
1195    pub email_addresses: Vec<String>,
1196    pub email_domains: Vec<String>,
1197}
1198
1199#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1200pub struct EndpointSAML {
1201    /// `true` if the module will be applied to traffic, `false` to disable. default
1202    /// `true` if unspecified
1203    pub enabled: Option<bool>,
1204    /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
1205    /// supporting CORS.
1206    pub options_passthrough: bool,
1207    /// the prefix of the session cookie that ngrok sets on the http client to cache
1208    /// authentication. default is 'ngrok.'
1209    pub cookie_prefix: String,
1210    /// Integer number of seconds of inactivity after which if the user has not accessed
1211    /// the endpoint, their session will time out and they will be forced to
1212    /// reauthenticate.
1213    pub inactivity_timeout: u32,
1214    /// Integer number of seconds of the maximum duration of an authenticated session.
1215    /// After this period is exceeded, a user must reauthenticate.
1216    pub maximum_duration: u32,
1217    /// The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
1218    /// to download or as a URL.
1219    pub idp_metadata: String,
1220    /// If true, indicates that whenever we redirect a user to the IdP for
1221    /// authentication that the IdP must prompt the user for authentication credentials
1222    /// even if the user already has a valid session with the IdP.
1223    pub force_authn: bool,
1224    /// If true, the IdP may initiate a login directly (e.g. the user does not need to
1225    /// visit the endpoint first and then be redirected). The IdP should set the
1226    /// `RelayState` parameter to the target URL of the resource they want the user to
1227    /// be redirected to after the SAML login assertion has been processed.
1228    pub allow_idp_initiated: Option<bool>,
1229    /// If present, only users who are a member of one of the listed groups may access
1230    /// the target endpoint.
1231    pub authorized_groups: Vec<String>,
1232    /// The SP Entity's unique ID. This always takes the form of a URL. In ngrok's
1233    /// implementation, this URL is the same as the metadata URL. This will need to be
1234    /// specified to the IdP as configuration.
1235    pub entity_id: String,
1236    /// The public URL of the SP's Assertion Consumer Service. This is where the IdP
1237    /// will redirect to during an authentication flow. This will need to be specified
1238    /// to the IdP as configuration.
1239    pub assertion_consumer_service_url: String,
1240    /// The public URL of the SP's Single Logout Service. This is where the IdP will
1241    /// redirect to during a single logout flow. This will optionally need to be
1242    /// specified to the IdP as configuration.
1243    pub single_logout_url: String,
1244    /// PEM-encoded x.509 certificate of the key pair that is used to sign all SAML
1245    /// requests that the ngrok SP makes to the IdP. Many IdPs do not support request
1246    /// signing verification, but we highly recommend specifying this in the IdP's
1247    /// configuration if it is supported.
1248    pub request_signing_certificate_pem: String,
1249    /// A public URL where the SP's metadata is hosted. If an IdP supports dynamic
1250    /// configuration, this is the URL it can use to retrieve the SP metadata.
1251    pub metadata_url: String,
1252    /// Defines the name identifier format the SP expects the IdP to use in its
1253    /// assertions to identify subjects. If unspecified, a default value of
1254    /// `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` will be used. A subset of
1255    /// the allowed values enumerated by the SAML specification are supported.
1256    pub nameid_format: String,
1257}
1258
1259#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1260pub struct EndpointSAMLMutate {
1261    /// `true` if the module will be applied to traffic, `false` to disable. default
1262    /// `true` if unspecified
1263    pub enabled: Option<bool>,
1264    /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
1265    /// supporting CORS.
1266    pub options_passthrough: bool,
1267    /// the prefix of the session cookie that ngrok sets on the http client to cache
1268    /// authentication. default is 'ngrok.'
1269    pub cookie_prefix: String,
1270    /// Integer number of seconds of inactivity after which if the user has not accessed
1271    /// the endpoint, their session will time out and they will be forced to
1272    /// reauthenticate.
1273    pub inactivity_timeout: u32,
1274    /// Integer number of seconds of the maximum duration of an authenticated session.
1275    /// After this period is exceeded, a user must reauthenticate.
1276    pub maximum_duration: u32,
1277    /// The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
1278    /// to download or as a URL.
1279    pub idp_metadata: String,
1280    /// If true, indicates that whenever we redirect a user to the IdP for
1281    /// authentication that the IdP must prompt the user for authentication credentials
1282    /// even if the user already has a valid session with the IdP.
1283    pub force_authn: bool,
1284    /// If true, the IdP may initiate a login directly (e.g. the user does not need to
1285    /// visit the endpoint first and then be redirected). The IdP should set the
1286    /// `RelayState` parameter to the target URL of the resource they want the user to
1287    /// be redirected to after the SAML login assertion has been processed.
1288    pub allow_idp_initiated: Option<bool>,
1289    /// If present, only users who are a member of one of the listed groups may access
1290    /// the target endpoint.
1291    pub authorized_groups: Vec<String>,
1292    /// Defines the name identifier format the SP expects the IdP to use in its
1293    /// assertions to identify subjects. If unspecified, a default value of
1294    /// `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` will be used. A subset of
1295    /// the allowed values enumerated by the SAML specification are supported.
1296    pub nameid_format: String,
1297}
1298
1299#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1300pub struct EndpointOIDC {
1301    /// `true` if the module will be applied to traffic, `false` to disable. default
1302    /// `true` if unspecified
1303    pub enabled: Option<bool>,
1304    /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
1305    /// supporting CORS.
1306    pub options_passthrough: bool,
1307    /// the prefix of the session cookie that ngrok sets on the http client to cache
1308    /// authentication. default is 'ngrok.'
1309    pub cookie_prefix: String,
1310    /// Integer number of seconds of inactivity after which if the user has not accessed
1311    /// the endpoint, their session will time out and they will be forced to
1312    /// reauthenticate.
1313    pub inactivity_timeout: u32,
1314    /// Integer number of seconds of the maximum duration of an authenticated session.
1315    /// After this period is exceeded, a user must reauthenticate.
1316    pub maximum_duration: u32,
1317    /// URL of the OIDC "OpenID provider". This is the base URL used for discovery.
1318    pub issuer: String,
1319    /// The OIDC app's client ID and OIDC audience.
1320    pub client_id: String,
1321    /// The OIDC app's client secret.
1322    pub client_secret: String,
1323    /// The set of scopes to request from the OIDC identity provider.
1324    pub scopes: Vec<String>,
1325}
1326
1327#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1328pub struct EndpointBackend {
1329    /// `true` if the module will be applied to traffic, `false` to disable. default
1330    /// `true` if unspecified
1331    pub enabled: Option<bool>,
1332    /// backend to be used to back this endpoint
1333    pub backend: Ref,
1334}
1335
1336#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1337pub struct EndpointBackendMutate {
1338    /// `true` if the module will be applied to traffic, `false` to disable. default
1339    /// `true` if unspecified
1340    pub enabled: Option<bool>,
1341    /// backend to be used to back this endpoint
1342    pub backend_id: String,
1343}
1344
1345#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1346pub struct EndpointWebsocketTCPConverter {
1347    /// `true` if the module will be applied to traffic, `false` to disable. default
1348    /// `true` if unspecified
1349    pub enabled: Option<bool>,
1350}
1351
1352#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1353pub struct EndpointUserAgentFilter {
1354    pub enabled: Option<bool>,
1355    pub allow: Vec<String>,
1356    pub deny: Vec<String>,
1357}
1358
1359#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1360pub struct EndpointTrafficPolicy {
1361    /// `true` if the module will be applied to traffic, `false` to disable. default
1362    /// `true` if unspecified
1363    pub enabled: Option<bool>,
1364    /// the traffic policy that should be applied to the traffic on your endpoint.
1365    pub value: String,
1366}
1367
1368#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1369pub struct EdgeRouteItem {
1370    /// unique identifier of this edge
1371    pub edge_id: String,
1372    /// unique identifier of this edge route
1373    pub id: String,
1374}
1375
1376#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1377pub struct HTTPSEdgeRouteCreate {
1378    /// unique identifier of this edge
1379    pub edge_id: String,
1380    /// Type of match to use for this route. Valid values are "exact_path" and
1381    /// "path_prefix".
1382    pub match_type: String,
1383    /// Route selector: "/blog" or "example.com" or "example.com/blog"
1384    pub r#match: String,
1385    /// human-readable description of what this edge will be used for; optional, max 255
1386    /// bytes.
1387    pub description: String,
1388    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1389    /// bytes.
1390    pub metadata: String,
1391    /// backend module configuration or `null`
1392    pub backend: Option<EndpointBackendMutate>,
1393    /// ip restriction module configuration or `null`
1394    pub ip_restriction: Option<EndpointIPPolicyMutate>,
1395    /// circuit breaker module configuration or `null`
1396    pub circuit_breaker: Option<EndpointCircuitBreaker>,
1397    /// compression module configuration or `null`
1398    pub compression: Option<EndpointCompression>,
1399    /// request headers module configuration or `null`
1400    pub request_headers: Option<EndpointRequestHeaders>,
1401    /// response headers module configuration or `null`
1402    pub response_headers: Option<EndpointResponseHeaders>,
1403    /// webhook verification module configuration or `null`
1404    pub webhook_verification: Option<EndpointWebhookValidation>,
1405    /// oauth module configuration or `null`
1406    pub oauth: Option<EndpointOAuth>,
1407    /// saml module configuration or `null`
1408    pub saml: Option<EndpointSAMLMutate>,
1409    /// oidc module configuration or `null`
1410    pub oidc: Option<EndpointOIDC>,
1411    /// websocket to tcp adapter configuration or `null`
1412    pub websocket_tcp_converter: Option<EndpointWebsocketTCPConverter>,
1413    pub user_agent_filter: Option<EndpointUserAgentFilter>,
1414    /// the traffic policy associated with this edge or null
1415    pub traffic_policy: Option<EndpointTrafficPolicy>,
1416}
1417
1418#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1419pub struct HTTPSEdgeRouteUpdate {
1420    /// unique identifier of this edge
1421    pub edge_id: String,
1422    /// unique identifier of this edge route
1423    pub id: String,
1424    /// Type of match to use for this route. Valid values are "exact_path" and
1425    /// "path_prefix".
1426    pub match_type: String,
1427    /// Route selector: "/blog" or "example.com" or "example.com/blog"
1428    pub r#match: String,
1429    /// human-readable description of what this edge will be used for; optional, max 255
1430    /// bytes.
1431    pub description: String,
1432    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1433    /// bytes.
1434    pub metadata: String,
1435    /// backend module configuration or `null`
1436    pub backend: Option<EndpointBackendMutate>,
1437    /// ip restriction module configuration or `null`
1438    pub ip_restriction: Option<EndpointIPPolicyMutate>,
1439    /// circuit breaker module configuration or `null`
1440    pub circuit_breaker: Option<EndpointCircuitBreaker>,
1441    /// compression module configuration or `null`
1442    pub compression: Option<EndpointCompression>,
1443    /// request headers module configuration or `null`
1444    pub request_headers: Option<EndpointRequestHeaders>,
1445    /// response headers module configuration or `null`
1446    pub response_headers: Option<EndpointResponseHeaders>,
1447    /// webhook verification module configuration or `null`
1448    pub webhook_verification: Option<EndpointWebhookValidation>,
1449    /// oauth module configuration or `null`
1450    pub oauth: Option<EndpointOAuth>,
1451    /// saml module configuration or `null`
1452    pub saml: Option<EndpointSAMLMutate>,
1453    /// oidc module configuration or `null`
1454    pub oidc: Option<EndpointOIDC>,
1455    /// websocket to tcp adapter configuration or `null`
1456    pub websocket_tcp_converter: Option<EndpointWebsocketTCPConverter>,
1457    pub user_agent_filter: Option<EndpointUserAgentFilter>,
1458    /// the traffic policy associated with this edge or null
1459    pub traffic_policy: Option<EndpointTrafficPolicy>,
1460}
1461
1462#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1463pub struct HTTPSEdgeRoute {
1464    /// unique identifier of this edge
1465    pub edge_id: String,
1466    /// unique identifier of this edge route
1467    pub id: String,
1468    /// timestamp when the edge configuration was created, RFC 3339 format
1469    pub created_at: String,
1470    /// Type of match to use for this route. Valid values are "exact_path" and
1471    /// "path_prefix".
1472    pub match_type: String,
1473    /// Route selector: "/blog" or "example.com" or "example.com/blog"
1474    pub r#match: String,
1475    /// URI of the edge API resource
1476    pub uri: String,
1477    /// human-readable description of what this edge will be used for; optional, max 255
1478    /// bytes.
1479    pub description: String,
1480    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1481    /// bytes.
1482    pub metadata: String,
1483    /// backend module configuration or `null`
1484    pub backend: Option<EndpointBackend>,
1485    /// ip restriction module configuration or `null`
1486    pub ip_restriction: Option<EndpointIPPolicy>,
1487    /// circuit breaker module configuration or `null`
1488    pub circuit_breaker: Option<EndpointCircuitBreaker>,
1489    /// compression module configuration or `null`
1490    pub compression: Option<EndpointCompression>,
1491    /// request headers module configuration or `null`
1492    pub request_headers: Option<EndpointRequestHeaders>,
1493    /// response headers module configuration or `null`
1494    pub response_headers: Option<EndpointResponseHeaders>,
1495    /// webhook verification module configuration or `null`
1496    pub webhook_verification: Option<EndpointWebhookValidation>,
1497    /// oauth module configuration or `null`
1498    pub oauth: Option<EndpointOAuth>,
1499    /// saml module configuration or `null`
1500    pub saml: Option<EndpointSAML>,
1501    /// oidc module configuration or `null`
1502    pub oidc: Option<EndpointOIDC>,
1503    /// websocket to tcp adapter configuration or `null`
1504    pub websocket_tcp_converter: Option<EndpointWebsocketTCPConverter>,
1505    pub user_agent_filter: Option<EndpointUserAgentFilter>,
1506    /// the traffic policy associated with this edge or null
1507    pub traffic_policy: Option<EndpointTrafficPolicy>,
1508}
1509
1510#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1511pub struct HTTPSEdgeList {
1512    /// the list of all HTTPS Edges on this account
1513    pub https_edges: Vec<HTTPSEdge>,
1514    /// URI of the HTTPS Edge list API resource
1515    pub uri: String,
1516    /// URI of the next page, or null if there is no next page
1517    pub next_page_uri: Option<String>,
1518}
1519
1520#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1521pub struct HTTPSEdgeCreate {
1522    /// human-readable description of what this edge will be used for; optional, max 255
1523    /// bytes.
1524    pub description: String,
1525    /// arbitrary user-defined machine-readable data of this edge; optional, max 4096
1526    /// bytes.
1527    pub metadata: String,
1528    /// hostports served by this edge
1529    pub hostports: Option<Vec<String>>,
1530    /// edge modules
1531    pub mutual_tls: Option<EndpointMutualTLSMutate>,
1532    pub tls_termination: Option<EndpointTLSTerminationAtEdge>,
1533}
1534
1535#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1536pub struct HTTPSEdgeUpdate {
1537    /// unique identifier of this edge
1538    pub id: String,
1539    /// human-readable description of what this edge will be used for; optional, max 255
1540    /// bytes.
1541    pub description: Option<String>,
1542    /// arbitrary user-defined machine-readable data of this edge; optional, max 4096
1543    /// bytes.
1544    pub metadata: Option<String>,
1545    /// hostports served by this edge
1546    pub hostports: Option<Vec<String>>,
1547    /// edge modules
1548    pub mutual_tls: Option<EndpointMutualTLSMutate>,
1549    pub tls_termination: Option<EndpointTLSTerminationAtEdge>,
1550}
1551
1552#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1553pub struct HTTPSEdge {
1554    /// unique identifier of this edge
1555    pub id: String,
1556    /// human-readable description of what this edge will be used for; optional, max 255
1557    /// bytes.
1558    pub description: String,
1559    /// arbitrary user-defined machine-readable data of this edge; optional, max 4096
1560    /// bytes.
1561    pub metadata: String,
1562    /// timestamp when the edge configuration was created, RFC 3339 format
1563    pub created_at: String,
1564    /// URI of the edge API resource
1565    pub uri: String,
1566    /// hostports served by this edge
1567    pub hostports: Option<Vec<String>>,
1568    /// edge modules
1569    pub mutual_tls: Option<EndpointMutualTLS>,
1570    pub tls_termination: Option<EndpointTLSTermination>,
1571    /// routes
1572    pub routes: Vec<HTTPSEdgeRoute>,
1573}
1574
1575#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1576pub struct EdgeBackendReplace {
1577    pub id: String,
1578    pub module: EndpointBackendMutate,
1579}
1580
1581#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1582pub struct EdgeIPRestrictionReplace {
1583    pub id: String,
1584    pub module: EndpointIPPolicyMutate,
1585}
1586
1587#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1588pub struct EdgeMutualTLSReplace {
1589    pub id: String,
1590    pub module: EndpointMutualTLSMutate,
1591}
1592
1593#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1594pub struct EdgeTLSTerminationReplace {
1595    pub id: String,
1596    pub module: EndpointTLSTermination,
1597}
1598
1599#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1600pub struct EdgeTLSTerminationAtEdgeReplace {
1601    pub id: String,
1602    pub module: EndpointTLSTerminationAtEdge,
1603}
1604
1605#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1606pub struct EdgeTrafficPolicyReplace {
1607    pub id: String,
1608    pub module: EndpointTrafficPolicy,
1609}
1610
1611#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1612pub struct EdgeRouteBackendReplace {
1613    pub edge_id: String,
1614    pub id: String,
1615    pub module: EndpointBackendMutate,
1616}
1617
1618#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1619pub struct EdgeRouteIPRestrictionReplace {
1620    pub edge_id: String,
1621    pub id: String,
1622    pub module: EndpointIPPolicyMutate,
1623}
1624
1625#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1626pub struct EdgeRouteRequestHeadersReplace {
1627    pub edge_id: String,
1628    pub id: String,
1629    pub module: EndpointRequestHeaders,
1630}
1631
1632#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1633pub struct EdgeRouteResponseHeadersReplace {
1634    pub edge_id: String,
1635    pub id: String,
1636    pub module: EndpointResponseHeaders,
1637}
1638
1639#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1640pub struct EdgeRouteCompressionReplace {
1641    pub edge_id: String,
1642    pub id: String,
1643    pub module: EndpointCompression,
1644}
1645
1646#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1647pub struct EdgeRouteCircuitBreakerReplace {
1648    pub edge_id: String,
1649    pub id: String,
1650    pub module: EndpointCircuitBreaker,
1651}
1652
1653#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1654pub struct EdgeRouteWebhookVerificationReplace {
1655    pub edge_id: String,
1656    pub id: String,
1657    pub module: EndpointWebhookValidation,
1658}
1659
1660#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1661pub struct EdgeRouteOAuthReplace {
1662    pub edge_id: String,
1663    pub id: String,
1664    pub module: EndpointOAuth,
1665}
1666
1667#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1668pub struct EdgeRouteSAMLReplace {
1669    pub edge_id: String,
1670    pub id: String,
1671    pub module: EndpointSAMLMutate,
1672}
1673
1674#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1675pub struct EdgeRouteOIDCReplace {
1676    pub edge_id: String,
1677    pub id: String,
1678    pub module: EndpointOIDC,
1679}
1680
1681#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1682pub struct EdgeRouteWebsocketTCPConverterReplace {
1683    pub edge_id: String,
1684    pub id: String,
1685    pub module: EndpointWebsocketTCPConverter,
1686}
1687
1688#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1689pub struct EdgeRouteUserAgentFilterReplace {
1690    pub edge_id: String,
1691    pub id: String,
1692    pub module: EndpointUserAgentFilter,
1693}
1694
1695#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1696pub struct EdgeRouteTrafficPolicyReplace {
1697    pub edge_id: String,
1698    pub id: String,
1699    pub module: EndpointTrafficPolicy,
1700}
1701
1702#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1703pub struct TCPEdgeList {
1704    /// the list of all TCP Edges on this account
1705    pub tcp_edges: Vec<TCPEdge>,
1706    /// URI of the TCP Edge list API resource
1707    pub uri: String,
1708    /// URI of the next page, or null if there is no next page
1709    pub next_page_uri: Option<String>,
1710}
1711
1712#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1713pub struct TCPEdgeCreate {
1714    /// human-readable description of what this edge will be used for; optional, max 255
1715    /// bytes.
1716    pub description: String,
1717    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1718    /// bytes.
1719    pub metadata: String,
1720    /// hostports served by this edge
1721    pub hostports: Option<Vec<String>>,
1722    /// edge modules
1723    pub backend: Option<EndpointBackendMutate>,
1724    pub ip_restriction: Option<EndpointIPPolicyMutate>,
1725    /// the traffic policy associated with this edge or null
1726    pub traffic_policy: Option<EndpointTrafficPolicy>,
1727}
1728
1729#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1730pub struct TCPEdgeUpdate {
1731    /// unique identifier of this edge
1732    pub id: String,
1733    /// human-readable description of what this edge will be used for; optional, max 255
1734    /// bytes.
1735    pub description: Option<String>,
1736    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1737    /// bytes.
1738    pub metadata: Option<String>,
1739    /// hostports served by this edge
1740    pub hostports: Option<Vec<String>>,
1741    /// edge modules
1742    pub backend: Option<EndpointBackendMutate>,
1743    pub ip_restriction: Option<EndpointIPPolicyMutate>,
1744    /// the traffic policy associated with this edge or null
1745    pub traffic_policy: Option<EndpointTrafficPolicy>,
1746}
1747
1748#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1749pub struct TCPEdge {
1750    /// unique identifier of this edge
1751    pub id: String,
1752    /// human-readable description of what this edge will be used for; optional, max 255
1753    /// bytes.
1754    pub description: String,
1755    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1756    /// bytes.
1757    pub metadata: String,
1758    /// timestamp when the edge was created, RFC 3339 format
1759    pub created_at: String,
1760    /// URI of the edge API resource
1761    pub uri: String,
1762    /// hostports served by this edge
1763    pub hostports: Option<Vec<String>>,
1764    /// edge modules
1765    pub backend: Option<EndpointBackend>,
1766    pub ip_restriction: Option<EndpointIPPolicy>,
1767    /// the traffic policy associated with this edge or null
1768    pub traffic_policy: Option<EndpointTrafficPolicy>,
1769}
1770
1771#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1772pub struct TLSEdgeList {
1773    /// the list of all TLS Edges on this account
1774    pub tls_edges: Vec<TLSEdge>,
1775    /// URI of the TLS Edge list API resource
1776    pub uri: String,
1777    /// URI of the next page, or null if there is no next page
1778    pub next_page_uri: Option<String>,
1779}
1780
1781#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1782pub struct TLSEdgeCreate {
1783    /// human-readable description of what this edge will be used for; optional, max 255
1784    /// bytes.
1785    pub description: String,
1786    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1787    /// bytes.
1788    pub metadata: String,
1789    /// hostports served by this edge
1790    pub hostports: Option<Vec<String>>,
1791    /// edge modules
1792    pub backend: Option<EndpointBackendMutate>,
1793    pub ip_restriction: Option<EndpointIPPolicyMutate>,
1794    pub mutual_tls: Option<EndpointMutualTLSMutate>,
1795    pub tls_termination: Option<EndpointTLSTermination>,
1796    /// the traffic policy associated with this edge or null
1797    pub traffic_policy: Option<EndpointTrafficPolicy>,
1798}
1799
1800#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1801pub struct TLSEdgeUpdate {
1802    /// unique identifier of this edge
1803    pub id: String,
1804    /// human-readable description of what this edge will be used for; optional, max 255
1805    /// bytes.
1806    pub description: Option<String>,
1807    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1808    /// bytes.
1809    pub metadata: Option<String>,
1810    /// hostports served by this edge
1811    pub hostports: Option<Vec<String>>,
1812    /// edge modules
1813    pub backend: Option<EndpointBackendMutate>,
1814    pub ip_restriction: Option<EndpointIPPolicyMutate>,
1815    pub mutual_tls: Option<EndpointMutualTLSMutate>,
1816    pub tls_termination: Option<EndpointTLSTermination>,
1817    /// the traffic policy associated with this edge or null
1818    pub traffic_policy: Option<EndpointTrafficPolicy>,
1819}
1820
1821#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1822pub struct TLSEdge {
1823    /// unique identifier of this edge
1824    pub id: String,
1825    /// human-readable description of what this edge will be used for; optional, max 255
1826    /// bytes.
1827    pub description: String,
1828    /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1829    /// bytes.
1830    pub metadata: String,
1831    /// timestamp when the edge configuration was created, RFC 3339 format
1832    pub created_at: String,
1833    /// URI of the edge API resource
1834    pub uri: String,
1835    /// hostports served by this edge
1836    pub hostports: Option<Vec<String>>,
1837    /// edge modules
1838    pub backend: Option<EndpointBackend>,
1839    pub ip_restriction: Option<EndpointIPPolicy>,
1840    pub mutual_tls: Option<EndpointMutualTLS>,
1841    pub tls_termination: Option<EndpointTLSTermination>,
1842    /// the traffic policy associated with this edge or null
1843    pub traffic_policy: Option<EndpointTrafficPolicy>,
1844}
1845
1846#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1847pub struct Endpoint {
1848    /// unique endpoint resource identifier
1849    pub id: String,
1850    /// identifier of the region this endpoint belongs to
1851    pub region: String,
1852    /// timestamp when the endpoint was created in RFC 3339 format
1853    pub created_at: String,
1854    /// timestamp when the endpoint was updated in RFC 3339 format
1855    pub updated_at: String,
1856    /// deprecated [replaced by URL]: URL of the hostport served by this endpoint
1857    pub public_url: String,
1858    /// protocol served by this endpoint. one of `http`, `https`, `tcp`, or `tls`
1859    pub proto: String,
1860    pub scheme: String,
1861    /// hostport served by this endpoint (hostname:port) -> soon to be deprecated
1862    pub hostport: String,
1863    pub host: String,
1864    pub port: i64,
1865    /// whether the endpoint is `ephemeral` (served directly by an agent-initiated
1866    /// tunnel) or `edge` (served by an edge) or `cloud (represents a cloud endpoint)`
1867    pub r#type: String,
1868    /// user-supplied metadata of the associated tunnel or edge object
1869    pub metadata: String,
1870    /// user-supplied description of the associated tunnel
1871    pub description: String,
1872    /// the domain reserved for this endpoint
1873    pub domain: Option<Ref>,
1874    /// the address reserved for this endpoint
1875    pub tcp_addr: Option<Ref>,
1876    /// the tunnel serving requests to this endpoint, if this is an ephemeral endpoint
1877    pub tunnel: Option<Ref>,
1878    /// the edge serving requests to this endpoint, if this is an edge endpoint
1879    pub edge: Option<Ref>,
1880    /// the local address the tunnel forwards to
1881    pub upstream_url: String,
1882    /// the protocol the agent uses to forward with
1883    pub upstream_protocol: String,
1884    /// the url of the endpoint
1885    pub url: String,
1886    /// The ID of the owner (bot or user) that owns this endpoint
1887    pub principal: Option<Ref>,
1888    /// The traffic policy attached to this endpoint
1889    pub traffic_policy: String,
1890    /// the bindings associated with this endpoint
1891    pub bindings: Option<Vec<String>>,
1892    /// The tunnel session of the agent for this endpoint
1893    pub tunnel_session: Option<Ref>,
1894    /// URI of the Cloud Endpoint API resource
1895    pub uri: String,
1896    /// user supplied name for the endpoint
1897    pub name: String,
1898    /// whether the endpoint allows pooling
1899    pub pooling_enabled: bool,
1900}
1901
1902#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1903pub struct EndpointList {
1904    /// the list of all active endpoints on this account
1905    pub endpoints: Vec<Endpoint>,
1906    /// URI of the endpoints list API resource
1907    pub uri: String,
1908    /// URI of the next page, or null if there is no next page
1909    pub next_page_uri: Option<String>,
1910}
1911
1912#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1913pub struct EndpointCreate {
1914    /// the url of the endpoint
1915    pub url: String,
1916    /// Type of endpoint. Only 'cloud' is currently supported (represents a cloud
1917    /// endpoint). Defaults to 'cloud' if not specified.
1918    pub r#type: String,
1919    /// The traffic policy attached to this endpoint
1920    pub traffic_policy: String,
1921    /// user-supplied description of the associated tunnel
1922    pub description: Option<String>,
1923    /// user-supplied metadata of the associated tunnel or edge object
1924    pub metadata: Option<String>,
1925    /// the bindings associated with this endpoint
1926    pub bindings: Option<Vec<String>>,
1927    pub pooling_enabled: Option<bool>,
1928}
1929
1930#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1931pub struct EndpointListArgs {
1932    /// Expects a resource ID as its input. Returns earlier entries in the result set,
1933    /// sorted by ID.
1934    pub before_id: Option<String>,
1935    /// Constrains the number of results in the dataset. See the [API
1936    /// Overview](https://ngrok.com/docs/api/index#pagination) for details.
1937    pub limit: Option<String>,
1938    /// Filter results by endpoint IDs. Deprecated: use `filter` instead.
1939    pub id: Vec<String>,
1940    /// Filter results by endpoint URLs. Deprecated: use `filter` instead.
1941    pub url: Vec<String>,
1942    /// A CEL expression to filter the list results. Supports logical and comparison
1943    /// operators to match on fields such as `id`, `metadata`, `created_at`, and more.
1944    /// See ngrok API Filtering for syntax and field details:
1945    /// https://ngrok.com/docs/api/api-filtering.
1946    pub filter: Option<String>,
1947}
1948
1949#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1950pub struct EndpointUpdate {
1951    /// unique endpoint resource identifier
1952    pub id: String,
1953    /// the url of the endpoint
1954    pub url: Option<String>,
1955    /// The traffic policy attached to this endpoint
1956    pub traffic_policy: Option<String>,
1957    /// user-supplied description of the associated tunnel
1958    pub description: Option<String>,
1959    /// user-supplied metadata of the associated tunnel or edge object
1960    pub metadata: Option<String>,
1961    /// the bindings associated with this endpoint
1962    pub bindings: Option<Vec<String>>,
1963    pub pooling_enabled: Option<bool>,
1964}
1965
1966#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1967pub struct EventDestinationCreate {
1968    /// Arbitrary user-defined machine-readable data of this Event Destination.
1969    /// Optional, max 4096 bytes.
1970    pub metadata: String,
1971    /// Human-readable description of the Event Destination. Optional, max 255 bytes.
1972    pub description: String,
1973    /// The output format you would like to serialize events into when sending to their
1974    /// target. Currently the only accepted value is `JSON`.
1975    pub format: String,
1976    /// An object that encapsulates where and how to send your events. An event
1977    /// destination must contain exactly one of the following objects, leaving the rest
1978    /// null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`.
1979    pub target: EventTarget,
1980}
1981
1982#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1983pub struct EventDestinationUpdate {
1984    /// Unique identifier for this Event Destination.
1985    pub id: String,
1986    /// Arbitrary user-defined machine-readable data of this Event Destination.
1987    /// Optional, max 4096 bytes.
1988    pub metadata: Option<String>,
1989    /// Human-readable description of the Event Destination. Optional, max 255 bytes.
1990    pub description: Option<String>,
1991    /// The output format you would like to serialize events into when sending to their
1992    /// target. Currently the only accepted value is `JSON`.
1993    pub format: Option<String>,
1994    /// An object that encapsulates where and how to send your events. An event
1995    /// destination must contain exactly one of the following objects, leaving the rest
1996    /// null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`.
1997    pub target: Option<EventTarget>,
1998}
1999
2000#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2001pub struct EventDestination {
2002    /// Unique identifier for this Event Destination.
2003    pub id: String,
2004    /// Arbitrary user-defined machine-readable data of this Event Destination.
2005    /// Optional, max 4096 bytes.
2006    pub metadata: String,
2007    /// Timestamp when the Event Destination was created, RFC 3339 format.
2008    pub created_at: String,
2009    /// Human-readable description of the Event Destination. Optional, max 255 bytes.
2010    pub description: String,
2011    /// The output format you would like to serialize events into when sending to their
2012    /// target. Currently the only accepted value is `JSON`.
2013    pub format: String,
2014    /// An object that encapsulates where and how to send your events. An event
2015    /// destination must contain exactly one of the following objects, leaving the rest
2016    /// null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`.
2017    pub target: EventTarget,
2018    /// URI of the Event Destination API resource.
2019    pub uri: String,
2020}
2021
2022#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2023pub struct EventDestinationList {
2024    /// The list of all Event Destinations on this account.
2025    pub event_destinations: Vec<EventDestination>,
2026    /// URI of the Event Destinations list API resource.
2027    pub uri: String,
2028    /// URI of the next page, or null if there is no next page.
2029    pub next_page_uri: Option<String>,
2030}
2031
2032#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2033pub struct EventTarget {
2034    /// Configuration used to send events to Amazon Kinesis Data Firehose.
2035    pub firehose: Option<EventTargetFirehose>,
2036    /// Configuration used to send events to Amazon Kinesis.
2037    pub kinesis: Option<EventTargetKinesis>,
2038    /// Configuration used to send events to Amazon CloudWatch Logs.
2039    pub cloudwatch_logs: Option<EventTargetCloudwatchLogs>,
2040    /// Configuration used to send events to Datadog.
2041    pub datadog: Option<EventTargetDatadog>,
2042    pub azure_logs_ingestion: Option<EventTargetAzureLogsIngestion>,
2043}
2044
2045#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2046pub struct EventTargetFirehose {
2047    /// Configuration for how to authenticate into your AWS account. Exactly one of
2048    /// `role` or `creds` should be configured.
2049    pub auth: AWSAuth,
2050    /// An Amazon Resource Name specifying the Firehose delivery stream to deposit
2051    /// events into.
2052    pub delivery_stream_arn: String,
2053}
2054
2055#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2056pub struct EventTargetKinesis {
2057    /// Configuration for how to authenticate into your AWS account. Exactly one of
2058    /// `role` or `creds` should be configured.
2059    pub auth: AWSAuth,
2060    /// An Amazon Resource Name specifying the Kinesis stream to deposit events into.
2061    pub stream_arn: String,
2062}
2063
2064#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2065pub struct EventTargetCloudwatchLogs {
2066    /// Configuration for how to authenticate into your AWS account. Exactly one of
2067    /// `role` or `creds` should be configured.
2068    pub auth: AWSAuth,
2069    /// An Amazon Resource Name specifying the CloudWatch Logs group to deposit events
2070    /// into.
2071    pub log_group_arn: String,
2072}
2073
2074#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2075pub struct EventTargetDatadog {
2076    /// Datadog API key to use.
2077    pub api_key: Option<String>,
2078    /// Tags to send with the event.
2079    pub ddtags: Option<String>,
2080    /// Service name to send with the event.
2081    pub service: Option<String>,
2082    /// Datadog site to send event to.
2083    pub ddsite: Option<String>,
2084}
2085
2086#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2087pub struct EventTargetAzureLogsIngestion {
2088    /// Tenant ID for the Azure account
2089    pub tenant_id: String,
2090    /// Client ID for the application client
2091    pub client_id: String,
2092    /// Client Secret for the application client
2093    pub client_secret: String,
2094    /// Data collection endpoint logs ingestion URI
2095    pub logs_ingestion_uri: String,
2096    /// Data collection rule immutable ID
2097    pub data_collection_rule_id: String,
2098    /// Data collection stream name to use as destination, located inside the DCR
2099    pub data_collection_stream_name: String,
2100}
2101
2102#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2103pub struct AWSAuth {
2104    /// A role for ngrok to assume on your behalf to deposit events into your AWS
2105    /// account.
2106    pub role: Option<AWSRole>,
2107    /// Credentials to your AWS account if you prefer ngrok to sign in with long-term
2108    /// access keys.
2109    pub creds: Option<AWSCredentials>,
2110}
2111
2112#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2113pub struct AWSRole {
2114    /// An ARN that specifies the role that ngrok should use to deliver to the
2115    /// configured target.
2116    pub role_arn: String,
2117}
2118
2119#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2120pub struct AWSCredentials {
2121    /// The ID portion of an AWS access key.
2122    pub aws_access_key_id: String,
2123    /// The secret portion of an AWS access key.
2124    pub aws_secret_access_key: Option<String>,
2125}
2126
2127#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2128pub struct EventSubscriptionCreate {
2129    /// Arbitrary customer supplied information intended to be machine readable.
2130    /// Optional, max 4096 chars.
2131    pub metadata: String,
2132    /// Arbitrary customer supplied information intended to be human readable. Optional,
2133    /// max 255 chars.
2134    pub description: String,
2135    /// Sources containing the types for which this event subscription will trigger
2136    pub sources: Vec<EventSourceReplace>,
2137    /// A list of Event Destination IDs which should be used for this Event
2138    /// Subscription.
2139    pub destination_ids: Vec<String>,
2140}
2141
2142#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2143pub struct EventSubscriptionUpdate {
2144    /// Unique identifier for this Event Subscription.
2145    pub id: String,
2146    /// Arbitrary customer supplied information intended to be machine readable.
2147    /// Optional, max 4096 chars.
2148    pub metadata: Option<String>,
2149    /// Arbitrary customer supplied information intended to be human readable. Optional,
2150    /// max 255 chars.
2151    pub description: Option<String>,
2152    /// Sources containing the types for which this event subscription will trigger
2153    pub sources: Option<Vec<EventSourceReplace>>,
2154    /// A list of Event Destination IDs which should be used for this Event
2155    /// Subscription.
2156    pub destination_ids: Option<Vec<String>>,
2157}
2158
2159#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2160pub struct EventSubscriptionList {
2161    /// The list of all Event Subscriptions on this account.
2162    pub event_subscriptions: Vec<EventSubscription>,
2163    /// URI of the Event Subscriptions list API resource.
2164    pub uri: String,
2165    /// URI of next page, or null if there is no next page.
2166    pub next_page_uri: Option<String>,
2167}
2168
2169#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2170pub struct EventSubscription {
2171    /// Unique identifier for this Event Subscription.
2172    pub id: String,
2173    /// URI of the Event Subscription API resource.
2174    pub uri: String,
2175    /// When the Event Subscription was created (RFC 3339 format).
2176    pub created_at: String,
2177    /// Arbitrary customer supplied information intended to be machine readable.
2178    /// Optional, max 4096 chars.
2179    pub metadata: String,
2180    /// Arbitrary customer supplied information intended to be human readable. Optional,
2181    /// max 255 chars.
2182    pub description: String,
2183    /// Sources containing the types for which this event subscription will trigger
2184    pub sources: Vec<EventSource>,
2185    /// Destinations to which these events will be sent
2186    pub destinations: Vec<Ref>,
2187}
2188
2189#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2190pub struct EventSourceReplace {
2191    /// Type of event for which an event subscription will trigger
2192    pub r#type: String,
2193}
2194
2195#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2196pub struct EventSource {
2197    /// Type of event for which an event subscription will trigger
2198    pub r#type: String,
2199    /// URI of the Event Source API resource.
2200    pub uri: String,
2201}
2202
2203#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2204pub struct EventSourceList {
2205    /// The list of all Event Sources for an Event Subscription
2206    pub sources: Vec<EventSource>,
2207    /// URI of the next page, or null if there is no next page.
2208    pub uri: String,
2209}
2210
2211#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2212pub struct EventSourceCreate {
2213    /// The unique identifier for the Event Subscription that this Event Source is
2214    /// attached to.
2215    pub subscription_id: String,
2216    /// Type of event for which an event subscription will trigger
2217    pub r#type: String,
2218}
2219
2220#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2221pub struct EventSourceUpdate {
2222    /// The unique identifier for the Event Subscription that this Event Source is
2223    /// attached to.
2224    pub subscription_id: String,
2225    /// Type of event for which an event subscription will trigger
2226    pub r#type: String,
2227}
2228
2229/// This is needed instead of Item because the parameters are different.
2230#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2231pub struct EventSourceItem {
2232    /// The unique identifier for the Event Subscription that this Event Source is
2233    /// attached to.
2234    pub subscription_id: String,
2235    /// Type of event for which an event subscription will trigger
2236    pub r#type: String,
2237}
2238
2239/// This is needed instead of Paging because the parameters are different. We also don't need the typical pagination params because pagination of this isn't necessary or supported.
2240#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2241pub struct EventSourcePaging {
2242    /// The unique identifier for the Event Subscription that this Event Source is
2243    /// attached to.
2244    pub subscription_id: String,
2245}
2246
2247#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2248pub struct IPPolicyCreate {
2249    /// human-readable description of the source IPs of this IP policy. optional, max
2250    /// 255 bytes.
2251    pub description: String,
2252    /// arbitrary user-defined machine-readable data of this IP policy. optional, max
2253    /// 4096 bytes.
2254    pub metadata: String,
2255}
2256
2257#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2258pub struct IPPolicyUpdate {
2259    pub id: String,
2260    /// human-readable description of the source IPs of this IP policy. optional, max
2261    /// 255 bytes.
2262    pub description: Option<String>,
2263    /// arbitrary user-defined machine-readable data of this IP policy. optional, max
2264    /// 4096 bytes.
2265    pub metadata: Option<String>,
2266}
2267
2268#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2269pub struct IPPolicy {
2270    /// unique identifier for this IP policy
2271    pub id: String,
2272    /// URI of the IP Policy API resource
2273    pub uri: String,
2274    /// timestamp when the IP policy was created, RFC 3339 format
2275    pub created_at: String,
2276    /// human-readable description of the source IPs of this IP policy. optional, max
2277    /// 255 bytes.
2278    pub description: String,
2279    /// arbitrary user-defined machine-readable data of this IP policy. optional, max
2280    /// 4096 bytes.
2281    pub metadata: String,
2282}
2283
2284#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2285pub struct IPPolicyList {
2286    /// the list of all IP policies on this account
2287    pub ip_policies: Vec<IPPolicy>,
2288    /// URI of the IP policy list API resource
2289    pub uri: String,
2290    /// URI of the next page, or null if there is no next page
2291    pub next_page_uri: Option<String>,
2292}
2293
2294#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2295pub struct IPPolicyRuleCreate {
2296    /// human-readable description of the source IPs of this IP rule. optional, max 255
2297    /// bytes.
2298    pub description: String,
2299    /// arbitrary user-defined machine-readable data of this IP policy rule. optional,
2300    /// max 4096 bytes.
2301    pub metadata: String,
2302    /// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
2303    pub cidr: String,
2304    /// ID of the IP policy this IP policy rule will be attached to
2305    pub ip_policy_id: String,
2306    /// the action to apply to the policy rule, either `allow` or `deny`
2307    pub action: Option<String>,
2308}
2309
2310#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2311pub struct IPPolicyRuleUpdate {
2312    pub id: String,
2313    /// human-readable description of the source IPs of this IP rule. optional, max 255
2314    /// bytes.
2315    pub description: Option<String>,
2316    /// arbitrary user-defined machine-readable data of this IP policy rule. optional,
2317    /// max 4096 bytes.
2318    pub metadata: Option<String>,
2319    /// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
2320    pub cidr: Option<String>,
2321}
2322
2323#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2324pub struct IPPolicyRule {
2325    /// unique identifier for this IP policy rule
2326    pub id: String,
2327    /// URI of the IP policy rule API resource
2328    pub uri: String,
2329    /// timestamp when the IP policy rule was created, RFC 3339 format
2330    pub created_at: String,
2331    /// human-readable description of the source IPs of this IP rule. optional, max 255
2332    /// bytes.
2333    pub description: String,
2334    /// arbitrary user-defined machine-readable data of this IP policy rule. optional,
2335    /// max 4096 bytes.
2336    pub metadata: String,
2337    /// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
2338    pub cidr: String,
2339    /// object describing the IP policy this IP Policy Rule belongs to
2340    pub ip_policy: Ref,
2341    /// the action to apply to the policy rule, either `allow` or `deny`
2342    pub action: String,
2343}
2344
2345#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2346pub struct IPPolicyRuleList {
2347    /// the list of all IP policy rules on this account
2348    pub ip_policy_rules: Vec<IPPolicyRule>,
2349    /// URI of the IP policy rule list API resource
2350    pub uri: String,
2351    /// URI of the next page, or null if there is no next page
2352    pub next_page_uri: Option<String>,
2353}
2354
2355#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2356pub struct IPRestrictionCreate {
2357    /// human-readable description of this IP restriction. optional, max 255 bytes.
2358    pub description: String,
2359    /// arbitrary user-defined machine-readable data of this IP restriction. optional,
2360    /// max 4096 bytes.
2361    pub metadata: String,
2362    /// true if the IP restriction will be enforced. if false, only warnings will be
2363    /// issued
2364    pub enforced: bool,
2365    /// the type of IP restriction. this defines what traffic will be restricted with
2366    /// the attached policies. four values are currently supported: `dashboard`, `api`,
2367    /// `agent`, and `endpoints`
2368    pub r#type: String,
2369    /// the set of IP policy identifiers that are used to enforce the restriction
2370    pub ip_policy_ids: Vec<String>,
2371}
2372
2373#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2374pub struct IPRestrictionUpdate {
2375    pub id: String,
2376    /// human-readable description of this IP restriction. optional, max 255 bytes.
2377    pub description: Option<String>,
2378    /// arbitrary user-defined machine-readable data of this IP restriction. optional,
2379    /// max 4096 bytes.
2380    pub metadata: Option<String>,
2381    /// true if the IP restriction will be enforced. if false, only warnings will be
2382    /// issued
2383    pub enforced: Option<bool>,
2384    /// the set of IP policy identifiers that are used to enforce the restriction
2385    pub ip_policy_ids: Vec<String>,
2386}
2387
2388#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2389pub struct IPRestriction {
2390    /// unique identifier for this IP restriction
2391    pub id: String,
2392    /// URI of the IP restriction API resource
2393    pub uri: String,
2394    /// timestamp when the IP restriction was created, RFC 3339 format
2395    pub created_at: String,
2396    /// human-readable description of this IP restriction. optional, max 255 bytes.
2397    pub description: String,
2398    /// arbitrary user-defined machine-readable data of this IP restriction. optional,
2399    /// max 4096 bytes.
2400    pub metadata: String,
2401    /// true if the IP restriction will be enforced. if false, only warnings will be
2402    /// issued
2403    pub enforced: bool,
2404    /// the type of IP restriction. this defines what traffic will be restricted with
2405    /// the attached policies. four values are currently supported: `dashboard`, `api`,
2406    /// `agent`, and `endpoints`
2407    pub r#type: String,
2408    /// the set of IP policies that are used to enforce the restriction
2409    pub ip_policies: Vec<Ref>,
2410}
2411
2412#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2413pub struct IPRestrictionList {
2414    /// the list of all IP restrictions on this account
2415    pub ip_restrictions: Vec<IPRestriction>,
2416    /// URI of the IP restrictions list API resource
2417    pub uri: String,
2418    /// URI of the next page, or null if there is no next page
2419    pub next_page_uri: Option<String>,
2420}
2421
2422#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2423pub struct ReservedAddrCreate {
2424    /// human-readable description of what this reserved address will be used for
2425    pub description: String,
2426    /// arbitrary user-defined machine-readable data of this reserved address. Optional,
2427    /// max 4096 bytes.
2428    pub metadata: String,
2429    /// reserve the address in this geographic ngrok datacenter. Optional, default is
2430    /// us. (au, eu, ap, us, jp, in, sa)
2431    pub region: String,
2432}
2433
2434#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2435pub struct ReservedAddrUpdate {
2436    pub id: String,
2437    /// human-readable description of what this reserved address will be used for
2438    pub description: Option<String>,
2439    /// arbitrary user-defined machine-readable data of this reserved address. Optional,
2440    /// max 4096 bytes.
2441    pub metadata: Option<String>,
2442}
2443
2444#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2445pub struct ReservedAddr {
2446    /// unique reserved address resource identifier
2447    pub id: String,
2448    /// URI of the reserved address API resource
2449    pub uri: String,
2450    /// timestamp when the reserved address was created, RFC 3339 format
2451    pub created_at: String,
2452    /// human-readable description of what this reserved address will be used for
2453    pub description: String,
2454    /// arbitrary user-defined machine-readable data of this reserved address. Optional,
2455    /// max 4096 bytes.
2456    pub metadata: String,
2457    /// hostname:port of the reserved address that was assigned at creation time
2458    pub addr: String,
2459    /// reserve the address in this geographic ngrok datacenter. Optional, default is
2460    /// us. (au, eu, ap, us, jp, in, sa)
2461    pub region: String,
2462}
2463
2464#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2465pub struct ReservedAddrList {
2466    /// the list of all reserved addresses on this account
2467    pub reserved_addrs: Vec<ReservedAddr>,
2468    /// URI of the reserved address list API resource
2469    pub uri: String,
2470    /// URI of the next page, or null if there is no next page
2471    pub next_page_uri: Option<String>,
2472}
2473
2474#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2475pub struct ReservedDomainCreate {
2476    /// hostname of the reserved domain
2477    pub domain: String,
2478    /// deprecated: With the launch of the ngrok Global Network domains traffic is now
2479    /// handled globally. This field applied only to endpoints. Note that agents may
2480    /// still connect to specific regions. Optional, null by default. (au, eu, ap, us,
2481    /// jp, in, sa)
2482    pub region: String,
2483    /// human-readable description of what this reserved domain will be used for
2484    pub description: String,
2485    /// arbitrary user-defined machine-readable data of this reserved domain. Optional,
2486    /// max 4096 bytes.
2487    pub metadata: String,
2488    /// ID of a user-uploaded TLS certificate to use for connections to targeting this
2489    /// domain. Optional, mutually exclusive with `certificate_management_policy`.
2490    pub certificate_id: Option<String>,
2491    /// configuration for automatic management of TLS certificates for this domain, or
2492    /// null if automatic management is disabled. Optional, mutually exclusive with
2493    /// `certificate_id`.
2494    pub certificate_management_policy: Option<ReservedDomainCertPolicy>,
2495    /// DNS resolver targets configured for the reserved domain, or empty for "global"
2496    /// resolution.
2497    pub resolves_to: Option<Vec<ReservedDomainResolvesToEntry>>,
2498}
2499
2500#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2501pub struct ReservedDomainUpdate {
2502    pub id: String,
2503    /// human-readable description of what this reserved domain will be used for
2504    pub description: Option<String>,
2505    /// arbitrary user-defined machine-readable data of this reserved domain. Optional,
2506    /// max 4096 bytes.
2507    pub metadata: Option<String>,
2508    /// ID of a user-uploaded TLS certificate to use for connections to targeting this
2509    /// domain. Optional, mutually exclusive with `certificate_management_policy`.
2510    pub certificate_id: Option<String>,
2511    /// configuration for automatic management of TLS certificates for this domain, or
2512    /// null if automatic management is disabled. Optional, mutually exclusive with
2513    /// `certificate_id`.
2514    pub certificate_management_policy: Option<ReservedDomainCertPolicy>,
2515    /// DNS resolver targets configured for the reserved domain, or empty for "global"
2516    /// resolution.
2517    pub resolves_to: Option<Vec<ReservedDomainResolvesToEntry>>,
2518}
2519
2520#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2521pub struct ReservedDomain {
2522    /// unique reserved domain resource identifier
2523    pub id: String,
2524    /// URI of the reserved domain API resource
2525    pub uri: String,
2526    /// timestamp when the reserved domain was created, RFC 3339 format
2527    pub created_at: String,
2528    /// human-readable description of what this reserved domain will be used for
2529    pub description: String,
2530    /// arbitrary user-defined machine-readable data of this reserved domain. Optional,
2531    /// max 4096 bytes.
2532    pub metadata: String,
2533    /// hostname of the reserved domain
2534    pub domain: String,
2535    /// deprecated: With the launch of the ngrok Global Network domains traffic is now
2536    /// handled globally. This field applied only to endpoints. Note that agents may
2537    /// still connect to specific regions. Optional, null by default. (au, eu, ap, us,
2538    /// jp, in, sa)
2539    pub region: String,
2540    /// DNS CNAME target for a custom hostname, or null if the reserved domain is a
2541    /// subdomain of an ngrok owned domain (e.g. *.ngrok.app)
2542    pub cname_target: Option<String>,
2543    /// object referencing the TLS certificate used for connections to this domain. This
2544    /// can be either a user-uploaded certificate, the most recently issued automatic
2545    /// one, or null otherwise.
2546    pub certificate: Option<Ref>,
2547    /// configuration for automatic management of TLS certificates for this domain, or
2548    /// null if automatic management is disabled
2549    pub certificate_management_policy: Option<ReservedDomainCertPolicy>,
2550    /// status of the automatic certificate management for this domain, or null if
2551    /// automatic management is disabled
2552    pub certificate_management_status: Option<ReservedDomainCertStatus>,
2553    /// DNS CNAME target for the host _acme-challenge.example.com, where example.com is
2554    /// your reserved domain name. This is required to issue certificates for wildcard,
2555    /// non-ngrok reserved domains. Must be null for non-wildcard domains and ngrok
2556    /// subdomains.
2557    pub acme_challenge_cname_target: Option<String>,
2558    /// DNS resolver targets configured for the reserved domain, or empty for "global"
2559    /// resolution.
2560    pub resolves_to: Option<Vec<ReservedDomainResolvesToEntry>>,
2561}
2562
2563#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2564pub struct ReservedDomainList {
2565    /// the list of all reserved domains on this account
2566    pub reserved_domains: Vec<ReservedDomain>,
2567    /// URI of the reserved domain list API resource
2568    pub uri: String,
2569    /// URI of the next page, or null if there is no next page
2570    pub next_page_uri: Option<String>,
2571}
2572
2573#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2574pub struct ReservedDomainCertPolicy {
2575    /// certificate authority to request certificates from. The only supported value is
2576    /// letsencrypt.
2577    pub authority: String,
2578    /// type of private key to use when requesting certificates. Defaults to ecdsa, can
2579    /// be either rsa or ecdsa.
2580    pub private_key_type: String,
2581}
2582
2583#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2584pub struct ReservedDomainCertStatus {
2585    /// timestamp when the next renewal will be requested, RFC 3339 format
2586    pub renews_at: Option<String>,
2587    /// status of the certificate provisioning job, or null if the certificiate isn't
2588    /// being provisioned or renewed
2589    pub provisioning_job: Option<ReservedDomainCertJob>,
2590}
2591
2592#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2593pub struct ReservedDomainCertJob {
2594    /// if present, an error code indicating why provisioning is failing. It may be
2595    /// either a temporary condition (INTERNAL_ERROR), or a permanent one the user must
2596    /// correct (DNS_ERROR).
2597    pub error_code: Option<String>,
2598    /// a message describing the current status or error
2599    pub msg: String,
2600    /// timestamp when the provisioning job started, RFC 3339 format
2601    pub started_at: String,
2602    /// timestamp when the provisioning job will be retried
2603    pub retries_at: Option<String>,
2604}
2605
2606#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2607pub struct ReservedDomainResolvesToEntry {
2608    /// accepts an ngrok point-of-presence shortcode, or "global"
2609    pub value: String,
2610}
2611
2612#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2613pub struct SecretCreate {
2614    /// Name of secret
2615    pub name: String,
2616    /// Value of secret
2617    pub value: String,
2618    /// Arbitrary user-defined metadata for this Secret
2619    pub metadata: String,
2620    /// description of Secret
2621    pub description: String,
2622    /// unique identifier of the referenced vault
2623    pub vault_id: String,
2624    /// name of the referenced vault
2625    pub vault_name: String,
2626}
2627
2628#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2629pub struct SecretUpdate {
2630    /// identifier for Secret
2631    pub id: String,
2632    /// Name of secret
2633    pub name: Option<String>,
2634    /// Value of secret
2635    pub value: Option<String>,
2636    /// Arbitrary user-defined metadata for this Secret
2637    pub metadata: Option<String>,
2638    /// description of Secret
2639    pub description: Option<String>,
2640}
2641
2642#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2643pub struct Secret {
2644    /// identifier for Secret
2645    pub id: String,
2646    /// URI of this Secret API resource
2647    pub uri: String,
2648    /// Timestamp when the Secret was created (RFC 3339 format)
2649    pub created_at: String,
2650    /// Timestamp when the Secret was last updated (RFC 3339 format)
2651    pub updated_at: String,
2652    /// Name of secret
2653    pub name: String,
2654    /// description of Secret
2655    pub description: String,
2656    /// Arbitrary user-defined metadata for this Secret
2657    pub metadata: String,
2658    /// Reference to who created this Secret
2659    pub created_by: Ref,
2660    /// Reference to who created this Secret
2661    pub last_updated_by: Ref,
2662    /// Reference to the vault the secret is stored in
2663    pub vault: Ref,
2664    /// Name of the vault the secret is stored in
2665    pub vault_name: String,
2666}
2667
2668#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2669pub struct SecretList {
2670    /// The list of Secrets for this account
2671    pub secrets: Vec<Secret>,
2672    pub uri: String,
2673    /// URI of the next page of results, or null if there is no next page
2674    pub next_page_uri: Option<String>,
2675}
2676
2677#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2678pub struct ServiceUser {
2679    /// unique API key resource identifier
2680    pub id: String,
2681    /// URI to the API resource of this service user
2682    pub uri: String,
2683    /// human-readable name used to identify the service
2684    pub name: String,
2685    /// whether or not the service is active
2686    pub active: bool,
2687    /// timestamp when the api key was created, RFC 3339 format
2688    pub created_at: String,
2689}
2690
2691#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2692pub struct ServiceUserCreate {
2693    /// human-readable name used to identify the service
2694    pub name: String,
2695    /// whether or not the service is active
2696    pub active: Option<bool>,
2697}
2698
2699#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2700pub struct ServiceUserUpdate {
2701    pub id: String,
2702    /// human-readable name used to identify the service
2703    pub name: Option<String>,
2704    /// whether or not the service is active
2705    pub active: Option<bool>,
2706}
2707
2708#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2709pub struct ServiceUserList {
2710    /// the list of all service users on this account
2711    pub service_users: Vec<ServiceUser>,
2712    /// URI of the service users list API resource
2713    pub uri: String,
2714    /// URI of the next page, or null if there is no next page
2715    pub next_page_uri: Option<String>,
2716}
2717
2718#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2719pub struct SSHCertificateAuthorityCreate {
2720    /// human-readable description of this SSH Certificate Authority. optional, max 255
2721    /// bytes.
2722    pub description: String,
2723    /// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
2724    /// optional, max 4096 bytes.
2725    pub metadata: String,
2726    /// the type of private key to generate. one of `rsa`, `ecdsa`, `ed25519`
2727    pub private_key_type: String,
2728    /// the type of elliptic curve to use when creating an ECDSA key
2729    pub elliptic_curve: String,
2730    /// the key size to use when creating an RSA key. one of `2048` or `4096`
2731    pub key_size: i64,
2732}
2733
2734#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2735pub struct SSHCertificateAuthorityUpdate {
2736    pub id: String,
2737    /// human-readable description of this SSH Certificate Authority. optional, max 255
2738    /// bytes.
2739    pub description: Option<String>,
2740    /// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
2741    /// optional, max 4096 bytes.
2742    pub metadata: Option<String>,
2743}
2744
2745#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2746pub struct SSHCertificateAuthority {
2747    /// unique identifier for this SSH Certificate Authority
2748    pub id: String,
2749    /// URI of the SSH Certificate Authority API resource
2750    pub uri: String,
2751    /// timestamp when the SSH Certificate Authority API resource was created, RFC 3339
2752    /// format
2753    pub created_at: String,
2754    /// human-readable description of this SSH Certificate Authority. optional, max 255
2755    /// bytes.
2756    pub description: String,
2757    /// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
2758    /// optional, max 4096 bytes.
2759    pub metadata: String,
2760    /// raw public key for this SSH Certificate Authority
2761    pub public_key: String,
2762    /// the type of private key for this SSH Certificate Authority
2763    pub key_type: String,
2764}
2765
2766#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2767pub struct SSHCertificateAuthorityList {
2768    /// the list of all certificate authorities on this account
2769    pub ssh_certificate_authorities: Vec<SSHCertificateAuthority>,
2770    /// URI of the certificates authorities list API resource
2771    pub uri: String,
2772    /// URI of the next page, or null if there is no next page
2773    pub next_page_uri: Option<String>,
2774}
2775
2776#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2777pub struct SSHCredentialCreate {
2778    /// human-readable description of who or what will use the ssh credential to
2779    /// authenticate. Optional, max 255 bytes.
2780    pub description: String,
2781    /// arbitrary user-defined machine-readable data of this ssh credential. Optional,
2782    /// max 4096 bytes.
2783    pub metadata: String,
2784    /// optional list of ACL rules. If unspecified, the credential will have no
2785    /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
2786    /// `bind` rule allows the caller to restrict what domains, addresses, and labels
2787    /// the token is allowed to bind. For example, to allow the token to open a tunnel
2788    /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
2789    /// Bind rules for domains may specify a leading wildcard to match multiple domains
2790    /// with a common suffix. For example, you may specify a rule of
2791    /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
2792    /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
2793    /// value to match multiple labels. For example, you may specify a rule of
2794    /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
2795    /// is equivalent to no acl at all and will explicitly permit all actions.
2796    pub acl: Vec<String>,
2797    /// the PEM-encoded public key of the SSH keypair that will be used to authenticate
2798    pub public_key: String,
2799    /// If supplied at credential creation, ownership will be assigned to the specified
2800    /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
2801    /// the authenticated User or Bot.
2802    pub owner_id: Option<String>,
2803}
2804
2805#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2806pub struct SSHCredentialUpdate {
2807    pub id: String,
2808    /// human-readable description of who or what will use the ssh credential to
2809    /// authenticate. Optional, max 255 bytes.
2810    pub description: Option<String>,
2811    /// arbitrary user-defined machine-readable data of this ssh credential. Optional,
2812    /// max 4096 bytes.
2813    pub metadata: Option<String>,
2814    /// optional list of ACL rules. If unspecified, the credential will have no
2815    /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
2816    /// `bind` rule allows the caller to restrict what domains, addresses, and labels
2817    /// the token is allowed to bind. For example, to allow the token to open a tunnel
2818    /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
2819    /// Bind rules for domains may specify a leading wildcard to match multiple domains
2820    /// with a common suffix. For example, you may specify a rule of
2821    /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
2822    /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
2823    /// value to match multiple labels. For example, you may specify a rule of
2824    /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
2825    /// is equivalent to no acl at all and will explicitly permit all actions.
2826    pub acl: Option<Vec<String>>,
2827}
2828
2829#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2830pub struct SSHCredential {
2831    /// unique ssh credential resource identifier
2832    pub id: String,
2833    /// URI of the ssh credential API resource
2834    pub uri: String,
2835    /// timestamp when the ssh credential was created, RFC 3339 format
2836    pub created_at: String,
2837    /// human-readable description of who or what will use the ssh credential to
2838    /// authenticate. Optional, max 255 bytes.
2839    pub description: String,
2840    /// arbitrary user-defined machine-readable data of this ssh credential. Optional,
2841    /// max 4096 bytes.
2842    pub metadata: String,
2843    /// the PEM-encoded public key of the SSH keypair that will be used to authenticate
2844    pub public_key: String,
2845    /// optional list of ACL rules. If unspecified, the credential will have no
2846    /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
2847    /// `bind` rule allows the caller to restrict what domains, addresses, and labels
2848    /// the token is allowed to bind. For example, to allow the token to open a tunnel
2849    /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
2850    /// Bind rules for domains may specify a leading wildcard to match multiple domains
2851    /// with a common suffix. For example, you may specify a rule of
2852    /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
2853    /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
2854    /// value to match multiple labels. For example, you may specify a rule of
2855    /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
2856    /// is equivalent to no acl at all and will explicitly permit all actions.
2857    pub acl: Vec<String>,
2858    /// If supplied at credential creation, ownership will be assigned to the specified
2859    /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
2860    /// the authenticated User or Bot.
2861    pub owner_id: Option<String>,
2862}
2863
2864#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2865pub struct SSHCredentialList {
2866    /// the list of all ssh credentials on this account
2867    pub ssh_credentials: Vec<SSHCredential>,
2868    /// URI of the ssh credential list API resource
2869    pub uri: String,
2870    /// URI of the next page, or null if there is no next page
2871    pub next_page_uri: Option<String>,
2872}
2873
2874#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2875pub struct SSHHostCertificateCreate {
2876    /// the ssh certificate authority that is used to sign this ssh host certificate
2877    pub ssh_certificate_authority_id: String,
2878    /// a public key in OpenSSH Authorized Keys format that this certificate signs
2879    pub public_key: String,
2880    /// the list of principals included in the ssh host certificate. This is the list of
2881    /// hostnames and/or IP addresses that are authorized to serve SSH traffic with this
2882    /// certificate. Dangerously, if no principals are specified, this certificate is
2883    /// considered valid for all hosts.
2884    pub principals: Vec<String>,
2885    /// The time when the host certificate becomes valid, in RFC 3339 format. Defaults
2886    /// to the current time if unspecified.
2887    pub valid_after: String,
2888    /// The time when this host certificate becomes invalid, in RFC 3339 format. If
2889    /// unspecified, a default value of one year in the future will be used. The OpenSSH
2890    /// certificates RFC calls this `valid_before`.
2891    pub valid_until: String,
2892    /// human-readable description of this SSH Host Certificate. optional, max 255
2893    /// bytes.
2894    pub description: String,
2895    /// arbitrary user-defined machine-readable data of this SSH Host Certificate.
2896    /// optional, max 4096 bytes.
2897    pub metadata: String,
2898}
2899
2900#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2901pub struct SSHHostCertificateUpdate {
2902    pub id: String,
2903    /// human-readable description of this SSH Host Certificate. optional, max 255
2904    /// bytes.
2905    pub description: Option<String>,
2906    /// arbitrary user-defined machine-readable data of this SSH Host Certificate.
2907    /// optional, max 4096 bytes.
2908    pub metadata: Option<String>,
2909}
2910
2911#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2912pub struct SSHHostCertificate {
2913    /// unique identifier for this SSH Host Certificate
2914    pub id: String,
2915    /// URI of the SSH Host Certificate API resource
2916    pub uri: String,
2917    /// timestamp when the SSH Host Certificate API resource was created, RFC 3339
2918    /// format
2919    pub created_at: String,
2920    /// human-readable description of this SSH Host Certificate. optional, max 255
2921    /// bytes.
2922    pub description: String,
2923    /// arbitrary user-defined machine-readable data of this SSH Host Certificate.
2924    /// optional, max 4096 bytes.
2925    pub metadata: String,
2926    /// a public key in OpenSSH Authorized Keys format that this certificate signs
2927    pub public_key: String,
2928    /// the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519`
2929    pub key_type: String,
2930    /// the ssh certificate authority that is used to sign this ssh host certificate
2931    pub ssh_certificate_authority_id: String,
2932    /// the list of principals included in the ssh host certificate. This is the list of
2933    /// hostnames and/or IP addresses that are authorized to serve SSH traffic with this
2934    /// certificate. Dangerously, if no principals are specified, this certificate is
2935    /// considered valid for all hosts.
2936    pub principals: Vec<String>,
2937    /// the time when the ssh host certificate becomes valid, in RFC 3339 format.
2938    pub valid_after: String,
2939    /// the time after which the ssh host certificate becomes invalid, in RFC 3339
2940    /// format. the OpenSSH certificates RFC calls this `valid_before`.
2941    pub valid_until: String,
2942    /// the signed SSH certificate in OpenSSH Authorized Keys format. this value should
2943    /// be placed in a `-cert.pub` certificate file on disk that should be referenced in
2944    /// your `sshd_config` configuration file with a `HostCertificate` directive
2945    pub certificate: String,
2946}
2947
2948#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2949pub struct SSHHostCertificateList {
2950    /// the list of all ssh host certificates on this account
2951    pub ssh_host_certificates: Vec<SSHHostCertificate>,
2952    /// URI of the ssh host certificates list API resource
2953    pub uri: String,
2954    /// URI of the next page, or null if there is no next page
2955    pub next_page_uri: Option<String>,
2956}
2957
2958#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2959pub struct SSHUserCertificateCreate {
2960    /// the ssh certificate authority that is used to sign this ssh user certificate
2961    pub ssh_certificate_authority_id: String,
2962    /// a public key in OpenSSH Authorized Keys format that this certificate signs
2963    pub public_key: String,
2964    /// the list of principals included in the ssh user certificate. This is the list of
2965    /// usernames that the certificate holder may sign in as on a machine authorizing
2966    /// the signing certificate authority. Dangerously, if no principals are specified,
2967    /// this certificate may be used to log in as any user.
2968    pub principals: Vec<String>,
2969    /// A map of critical options included in the certificate. Only two critical options
2970    /// are currently defined by OpenSSH: `force-command` and `source-address`. See [the
2971    /// OpenSSH certificate protocol
2972    /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
2973    /// for additional details.
2974    pub critical_options: HashMap<String, String>,
2975    /// A map of extensions included in the certificate. Extensions are additional
2976    /// metadata that can be interpreted by the SSH server for any purpose. These can be
2977    /// used to permit or deny the ability to open a terminal, do port forwarding, x11
2978    /// forwarding, and more. If unspecified, the certificate will include limited
2979    /// permissions with the following extension map: `{"permit-pty": "",
2980    /// "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions.
2981    /// See [the OpenSSH certificate protocol
2982    /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
2983    /// for additional details.
2984    pub extensions: HashMap<String, String>,
2985    /// The time when the user certificate becomes valid, in RFC 3339 format. Defaults
2986    /// to the current time if unspecified.
2987    pub valid_after: String,
2988    /// The time when this host certificate becomes invalid, in RFC 3339 format. If
2989    /// unspecified, a default value of 24 hours will be used. The OpenSSH certificates
2990    /// RFC calls this `valid_before`.
2991    pub valid_until: String,
2992    /// human-readable description of this SSH User Certificate. optional, max 255
2993    /// bytes.
2994    pub description: String,
2995    /// arbitrary user-defined machine-readable data of this SSH User Certificate.
2996    /// optional, max 4096 bytes.
2997    pub metadata: String,
2998}
2999
3000#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3001pub struct SSHUserCertificateUpdate {
3002    pub id: String,
3003    /// human-readable description of this SSH User Certificate. optional, max 255
3004    /// bytes.
3005    pub description: Option<String>,
3006    /// arbitrary user-defined machine-readable data of this SSH User Certificate.
3007    /// optional, max 4096 bytes.
3008    pub metadata: Option<String>,
3009}
3010
3011#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3012pub struct SSHUserCertificate {
3013    /// unique identifier for this SSH User Certificate
3014    pub id: String,
3015    /// URI of the SSH User Certificate API resource
3016    pub uri: String,
3017    /// timestamp when the SSH User Certificate API resource was created, RFC 3339
3018    /// format
3019    pub created_at: String,
3020    /// human-readable description of this SSH User Certificate. optional, max 255
3021    /// bytes.
3022    pub description: String,
3023    /// arbitrary user-defined machine-readable data of this SSH User Certificate.
3024    /// optional, max 4096 bytes.
3025    pub metadata: String,
3026    /// a public key in OpenSSH Authorized Keys format that this certificate signs
3027    pub public_key: String,
3028    /// the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519`
3029    pub key_type: String,
3030    /// the ssh certificate authority that is used to sign this ssh user certificate
3031    pub ssh_certificate_authority_id: String,
3032    /// the list of principals included in the ssh user certificate. This is the list of
3033    /// usernames that the certificate holder may sign in as on a machine authorizing
3034    /// the signing certificate authority. Dangerously, if no principals are specified,
3035    /// this certificate may be used to log in as any user.
3036    pub principals: Vec<String>,
3037    /// A map of critical options included in the certificate. Only two critical options
3038    /// are currently defined by OpenSSH: `force-command` and `source-address`. See [the
3039    /// OpenSSH certificate protocol
3040    /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
3041    /// for additional details.
3042    pub critical_options: HashMap<String, String>,
3043    /// A map of extensions included in the certificate. Extensions are additional
3044    /// metadata that can be interpreted by the SSH server for any purpose. These can be
3045    /// used to permit or deny the ability to open a terminal, do port forwarding, x11
3046    /// forwarding, and more. If unspecified, the certificate will include limited
3047    /// permissions with the following extension map: `{"permit-pty": "",
3048    /// "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions.
3049    /// See [the OpenSSH certificate protocol
3050    /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
3051    /// for additional details.
3052    pub extensions: HashMap<String, String>,
3053    /// the time when the ssh host certificate becomes valid, in RFC 3339 format.
3054    pub valid_after: String,
3055    /// the time after which the ssh host certificate becomes invalid, in RFC 3339
3056    /// format. the OpenSSH certificates RFC calls this `valid_before`.
3057    pub valid_until: String,
3058    /// the signed SSH certificate in OpenSSH Authorized Keys Format. this value should
3059    /// be placed in a `-cert.pub` certificate file on disk that should be referenced in
3060    /// your `sshd_config` configuration file with a `HostCertificate` directive
3061    pub certificate: String,
3062}
3063
3064#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3065pub struct SSHUserCertificateList {
3066    /// the list of all ssh user certificates on this account
3067    pub ssh_user_certificates: Vec<SSHUserCertificate>,
3068    /// URI of the ssh user certificates list API resource
3069    pub uri: String,
3070    /// URI of the next page, or null if there is no next page
3071    pub next_page_uri: Option<String>,
3072}
3073
3074#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3075pub struct TLSCertificateCreate {
3076    /// human-readable description of this TLS certificate. optional, max 255 bytes.
3077    pub description: String,
3078    /// arbitrary user-defined machine-readable data of this TLS certificate. optional,
3079    /// max 4096 bytes.
3080    pub metadata: String,
3081    /// chain of PEM-encoded certificates, leaf first. See [Certificate
3082    /// Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
3083    pub certificate_pem: String,
3084    /// private key for the TLS certificate, PEM-encoded. See [Private
3085    /// Keys](https://ngrok.com/docs/cloud-edge/endpoints#private-keys).
3086    pub private_key_pem: String,
3087}
3088
3089#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3090pub struct TLSCertificateUpdate {
3091    pub id: String,
3092    /// human-readable description of this TLS certificate. optional, max 255 bytes.
3093    pub description: Option<String>,
3094    /// arbitrary user-defined machine-readable data of this TLS certificate. optional,
3095    /// max 4096 bytes.
3096    pub metadata: Option<String>,
3097}
3098
3099#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3100pub struct TLSCertificate {
3101    /// unique identifier for this TLS certificate
3102    pub id: String,
3103    /// URI of the TLS certificate API resource
3104    pub uri: String,
3105    /// timestamp when the TLS certificate was created, RFC 3339 format
3106    pub created_at: String,
3107    /// human-readable description of this TLS certificate. optional, max 255 bytes.
3108    pub description: String,
3109    /// arbitrary user-defined machine-readable data of this TLS certificate. optional,
3110    /// max 4096 bytes.
3111    pub metadata: String,
3112    /// chain of PEM-encoded certificates, leaf first. See [Certificate
3113    /// Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
3114    pub certificate_pem: String,
3115    /// subject common name from the leaf of this TLS certificate
3116    pub subject_common_name: String,
3117    /// subject alternative names (SANs) from the leaf of this TLS certificate
3118    pub subject_alternative_names: TLSCertificateSANs,
3119    /// timestamp (in RFC 3339 format) when this TLS certificate was issued
3120    /// automatically, or null if this certificate was user-uploaded
3121    pub issued_at: Option<String>,
3122    /// timestamp when this TLS certificate becomes valid, RFC 3339 format
3123    pub not_before: String,
3124    /// timestamp when this TLS certificate becomes invalid, RFC 3339 format
3125    pub not_after: String,
3126    /// set of actions the private key of this TLS certificate can be used for
3127    pub key_usages: Vec<String>,
3128    /// extended set of actions the private key of this TLS certificate can be used for
3129    pub extended_key_usages: Vec<String>,
3130    /// type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519.
3131    pub private_key_type: String,
3132    /// issuer common name from the leaf of this TLS certificate
3133    pub issuer_common_name: String,
3134    /// serial number of the leaf of this TLS certificate
3135    pub serial_number: String,
3136    /// subject organization from the leaf of this TLS certificate
3137    pub subject_organization: String,
3138    /// subject organizational unit from the leaf of this TLS certificate
3139    pub subject_organizational_unit: String,
3140    /// subject locality from the leaf of this TLS certificate
3141    pub subject_locality: String,
3142    /// subject province from the leaf of this TLS certificate
3143    pub subject_province: String,
3144    /// subject country from the leaf of this TLS certificate
3145    pub subject_country: String,
3146}
3147
3148#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3149pub struct TLSCertificateList {
3150    /// the list of all TLS certificates on this account
3151    pub tls_certificates: Vec<TLSCertificate>,
3152    /// URI of the TLS certificates list API resource
3153    pub uri: String,
3154    /// URI of the next page, or null if there is no next page
3155    pub next_page_uri: Option<String>,
3156}
3157
3158#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3159pub struct TLSCertificateSANs {
3160    /// set of additional domains (including wildcards) this TLS certificate is valid
3161    /// for
3162    pub dns_names: Vec<String>,
3163    /// set of IP addresses this TLS certificate is also valid for
3164    pub ips: Vec<String>,
3165}
3166
3167#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3168pub struct Tunnel {
3169    /// unique tunnel resource identifier
3170    pub id: String,
3171    /// URL of the ephemeral tunnel's public endpoint
3172    pub public_url: String,
3173    /// timestamp when the tunnel was initiated in RFC 3339 format
3174    pub started_at: String,
3175    /// user-supplied metadata for the tunnel defined in the ngrok configuration file.
3176    /// See the tunnel [metadata configuration
3177    /// option](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#common-tunnel-configuration-properties)
3178    /// In API version 0, this value was instead pulled from the top-level [metadata
3179    /// configuration
3180    /// option](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#metadata).
3181    pub metadata: String,
3182    /// tunnel protocol for ephemeral tunnels. one of `http`, `https`, `tcp` or `tls`
3183    pub proto: String,
3184    /// identifier of tune region where the tunnel is running
3185    pub region: String,
3186    /// reference object pointing to the tunnel session on which this tunnel was started
3187    pub tunnel_session: Ref,
3188    /// the ephemeral endpoint this tunnel is associated with, if this is an
3189    /// agent-initiated tunnel
3190    pub endpoint: Option<Ref>,
3191    /// the labels the tunnel group backends will match against, if this is a backend
3192    /// tunnel
3193    pub labels: Option<HashMap<String, String>>,
3194    /// tunnel group backends served by this backend tunnel
3195    pub backends: Option<Vec<Ref>>,
3196    /// upstream address the ngrok agent forwards traffic over this tunnel to. this may
3197    /// be expressed as a URL or a network address.
3198    pub forwards_to: String,
3199}
3200
3201#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3202pub struct TunnelList {
3203    /// the list of all online tunnels on this account
3204    pub tunnels: Vec<Tunnel>,
3205    /// URI of the tunnels list API resource
3206    pub uri: String,
3207    /// URI of the next page, or null if there is no next page
3208    pub next_page_uri: Option<String>,
3209}
3210
3211#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3212pub struct VaultCreate {
3213    /// Name of vault
3214    pub name: String,
3215    /// Arbitrary user-defined metadata for this Vault
3216    pub metadata: String,
3217    /// description of Vault
3218    pub description: String,
3219}
3220
3221#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3222pub struct VaultUpdate {
3223    /// identifier for Vault
3224    pub id: String,
3225    /// Name of vault
3226    pub name: Option<String>,
3227    /// Arbitrary user-defined metadata for this Vault
3228    pub metadata: Option<String>,
3229    /// description of Vault
3230    pub description: Option<String>,
3231}
3232
3233#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3234pub struct Vault {
3235    /// identifier for Vault
3236    pub id: String,
3237    /// URI of this Vault API resource
3238    pub uri: String,
3239    /// Timestamp when the Vault was created (RFC 3339 format)
3240    pub created_at: String,
3241    /// Timestamp when the Vault was last updated (RFC 3339 format)
3242    pub updated_at: String,
3243    /// Name of vault
3244    pub name: String,
3245    /// description of Vault
3246    pub description: String,
3247    /// Arbitrary user-defined metadata for this Vault
3248    pub metadata: String,
3249    /// Reference to who created this Vault
3250    pub created_by: String,
3251    /// Reference to who created this Vault
3252    pub last_updated_by: String,
3253}
3254
3255#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3256pub struct VaultList {
3257    /// The list of Vaults for this account
3258    pub vaults: Vec<Vault>,
3259    pub uri: String,
3260    /// URI of the next page of results, or null if there is no next page
3261    pub next_page_uri: Option<String>,
3262}