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