Skip to main content

basaltic/models/
network.rs

1//! Generated typed wire models. Unknown string enum values are retained.
2#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
3pub struct AttachFloatingIpRequest {
4    /// Interface UUID or nested CRN. Bare names have no subnet scope and are rejected.
5    #[serde(rename = "interface")]
6    pub interface: String,
7
8    #[serde(rename = "address_id")]
9    pub address_id: String,
10}
11impl AttachFloatingIpRequest {
12    /// Set the required fields; optional fields start omitted.
13    #[allow(clippy::too_many_arguments)]
14    pub fn new(interface: String, address_id: String) -> Self {
15        Self {
16            interface,
17            address_id,
18        }
19    }
20}
21
22pub type AttachFloatingIpBody = AttachFloatingIpRequest;
23
24#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
25pub struct FloatingIpInterfaceResponse {
26    #[serde(rename = "interface")]
27    pub interface: FloatingIpInterface,
28}
29
30#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
31pub struct FloatingIpInterface {
32    #[serde(rename = "id")]
33    pub id: String,
34
35    #[serde(rename = "crn")]
36    pub crn: String,
37    /// Subnet containing this interface.
38    #[serde(rename = "subnet")]
39    pub subnet: ResourceRef,
40    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
41    #[serde(rename = "name")]
42    pub name: String,
43
44    #[serde(
45        rename = "description",
46        default,
47        skip_serializing_if = "Option::is_none"
48    )]
49    pub description: Option<String>,
50
51    #[serde(rename = "mac")]
52    pub mac: String,
53    /// Instance holding this interface, including a stopped instance. Null when unbound. Floating IP attachments are tracked separately.
54    #[serde(rename = "attached_to")]
55    pub attached_to: FloatingIpInterfaceAttachedTo,
56
57    #[serde(rename = "tags")]
58    pub tags: std::collections::BTreeMap<String, String>,
59
60    #[serde(rename = "created_at")]
61    pub created_at: String,
62
63    #[serde(rename = "updated_at")]
64    pub updated_at: String,
65    /// What the platform knows about this member. `unknown` — nobody is checking. A member you attached yourself with no health check on the address reads this: you chose the moment of attach, and the platform has no signal about what runs inside the instance. It is advertised. `healthy` — the platform has evidence this member is up (and, if a health check is configured on the address, that the check is passing). `unhealthy` — the platform is waiting for that evidence and has not seen it, or a configured check is failing. The member keeps its place on the address and receives no traffic until it recovers. Without a health check this is liveness only — `healthy` means the guest came up, not that your service is listening. Configure `health_check` on the floating IP to add readiness on top of that.
66    #[serde(rename = "health")]
67    pub health: FloatingIpInterfaceHealth,
68    /// Why the member reads the `health` it does — so you can tell "your service is not answering" from "the guest has not booted yet". `unprobed` — nobody is checking (no health check, hand-attached). `booting` — the platform has not yet seen the guest come up. `probe_failed` — the configured health check is failing. `passing` — the guest is up and, if a check is configured, it passes.
69    #[serde(rename = "reason")]
70    pub reason: FloatingIpInterfaceReason,
71    /// Target child address on the member interface.
72    #[serde(
73        rename = "address_id",
74        default,
75        skip_serializing_if = "Option::is_none"
76    )]
77    pub address_id: Option<String>,
78}
79
80#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
81pub struct ResourceRef {
82    #[serde(rename = "id")]
83    pub id: String,
84
85    #[serde(rename = "crn")]
86    pub crn: String,
87    /// Display label at response time — the resource's name where it has one, otherwise its human label (an invoice number, an account display name). Absent when the target is gone. Not a lookup key.
88    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
89    pub name: Option<String>,
90}
91
92#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
93#[serde(untagged)]
94pub enum FloatingIpInterfaceAttachedTo {
95    Variant1(Box<ResourceRef>),
96    Variant2(Box<crate::Nullable<serde_json::Value>>),
97}
98
99#[derive(Clone, Debug, PartialEq, Eq)]
100pub enum FloatingIpInterfaceHealth {
101    Unknown1,
102    Healthy,
103    Unhealthy,
104    Unknown(String),
105}
106impl FloatingIpInterfaceHealth {
107    pub fn as_str(&self) -> &str {
108        match self {
109            Self::Unknown1 => "unknown",
110            Self::Healthy => "healthy",
111            Self::Unhealthy => "unhealthy",
112            Self::Unknown(value) => value,
113        }
114    }
115}
116impl serde::Serialize for FloatingIpInterfaceHealth {
117    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
118        serializer.serialize_str(self.as_str())
119    }
120}
121impl<'de> serde::Deserialize<'de> for FloatingIpInterfaceHealth {
122    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
123        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
124        Ok(match value.as_str() {
125            "unknown" => Self::Unknown1,
126            "healthy" => Self::Healthy,
127            "unhealthy" => Self::Unhealthy,
128            _ => Self::Unknown(value),
129        })
130    }
131}
132
133#[derive(Clone, Debug, PartialEq, Eq)]
134pub enum FloatingIpInterfaceReason {
135    Unprobed,
136    Booting,
137    ProbeFailed,
138    Passing,
139    Unknown(String),
140}
141impl FloatingIpInterfaceReason {
142    pub fn as_str(&self) -> &str {
143        match self {
144            Self::Unprobed => "unprobed",
145            Self::Booting => "booting",
146            Self::ProbeFailed => "probe_failed",
147            Self::Passing => "passing",
148            Self::Unknown(value) => value,
149        }
150    }
151}
152impl serde::Serialize for FloatingIpInterfaceReason {
153    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
154        serializer.serialize_str(self.as_str())
155    }
156}
157impl<'de> serde::Deserialize<'de> for FloatingIpInterfaceReason {
158    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
159        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
160        Ok(match value.as_str() {
161            "unprobed" => Self::Unprobed,
162            "booting" => Self::Booting,
163            "probe_failed" => Self::ProbeFailed,
164            "passing" => Self::Passing,
165            _ => Self::Unknown(value),
166        })
167    }
168}
169
170pub type AttachFloatingIpResponse = FloatingIpInterfaceResponse;
171
172#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
173pub struct InterfaceSecurityGroupRequestInput {
174    /// Security group UUID, CRN, or account-scoped name.
175    #[serde(rename = "security_group")]
176    pub security_group: String,
177}
178impl InterfaceSecurityGroupRequestInput {
179    /// Set the required fields; optional fields start omitted.
180    #[allow(clippy::too_many_arguments)]
181    pub fn new(security_group: String) -> Self {
182        Self { security_group }
183    }
184}
185
186pub type AttachInterfaceSecurityGroupBody = InterfaceSecurityGroupRequestInput;
187
188#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
189pub struct SecurityGroupResponse {
190    #[serde(
191        rename = "security_group",
192        default,
193        skip_serializing_if = "Option::is_none"
194    )]
195    pub security_group: Option<SecurityGroup>,
196}
197
198#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
199pub struct SecurityGroup {
200    #[serde(rename = "id")]
201    pub id: String,
202
203    #[serde(rename = "crn")]
204    pub crn: String,
205    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
206    #[serde(rename = "name")]
207    pub name: String,
208
209    #[serde(
210        rename = "description",
211        default,
212        skip_serializing_if = "Option::is_none"
213    )]
214    pub description: Option<String>,
215
216    #[serde(rename = "tags")]
217    pub tags: std::collections::BTreeMap<String, String>,
218
219    #[serde(rename = "created_at")]
220    pub created_at: String,
221
222    #[serde(rename = "updated_at")]
223    pub updated_at: String,
224}
225
226pub type AttachInterfaceSecurityGroupResponse = SecurityGroupResponse;
227
228#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
229pub struct EgressOnlyGatewayCreateRequestInput {
230    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
231    #[serde(rename = "name")]
232    pub name: String,
233
234    #[serde(
235        rename = "description",
236        default,
237        skip_serializing_if = "Option::is_none"
238    )]
239    pub description: Option<String>,
240    /// VPC UUID, CRN or exact name in the caller account.
241    #[serde(rename = "vpc")]
242    pub vpc: String,
243
244    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
245    pub tags: Option<std::collections::BTreeMap<String, String>>,
246}
247impl EgressOnlyGatewayCreateRequestInput {
248    /// Set the required fields; optional fields start omitted.
249    #[allow(clippy::too_many_arguments)]
250    pub fn new(name: String, vpc: String) -> Self {
251        Self {
252            name,
253            description: None,
254            vpc,
255            tags: None,
256        }
257    }
258}
259
260pub type CreateEgressOnlyGatewayBody = EgressOnlyGatewayCreateRequestInput;
261
262#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
263pub struct EgressOnlyGatewayResponse {
264    #[serde(
265        rename = "egress_only_gateway",
266        default,
267        skip_serializing_if = "Option::is_none"
268    )]
269    pub egress_only_gateway: Option<EgressOnlyGateway>,
270}
271
272#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
273pub struct EgressOnlyGateway {
274    #[serde(rename = "id")]
275    pub id: String,
276
277    #[serde(rename = "crn")]
278    pub crn: String,
279    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
280    #[serde(rename = "name")]
281    pub name: String,
282
283    #[serde(
284        rename = "description",
285        default,
286        skip_serializing_if = "Option::is_none"
287    )]
288    pub description: Option<String>,
289
290    #[serde(rename = "vpc")]
291    pub vpc: ResourceRef,
292
293    #[serde(rename = "tags")]
294    pub tags: std::collections::BTreeMap<String, String>,
295
296    #[serde(rename = "created_at")]
297    pub created_at: String,
298
299    #[serde(rename = "updated_at")]
300    pub updated_at: String,
301}
302
303pub type CreateEgressOnlyGatewayResponse = EgressOnlyGatewayResponse;
304
305#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
306pub struct FloatingIpCreateRequestInput {
307    #[serde(
308        rename = "description",
309        default,
310        skip_serializing_if = "Option::is_none"
311    )]
312    pub description: Option<String>,
313    /// Which family to allocate in. Fixed for the life of the address — it decides the pool the address comes from, the quota it counts against (`floating_ips_v4` or `floating_ips_v6`) and the SKU it bills as. Omitted means `ipv4`.
314    #[serde(rename = "family", default, skip_serializing_if = "Option::is_none")]
315    pub family: Option<IpFamilyInput>,
316
317    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
318    pub tags: Option<std::collections::BTreeMap<String, String>>,
319    /// An optional readiness check for the address's members. Omitted means none — the address behaves exactly as an ordinary floating IP.
320    #[serde(
321        rename = "health_check",
322        default,
323        skip_serializing_if = "Option::is_none"
324    )]
325    pub health_check: Option<FloatingIpHealthCheckInput>,
326
327    #[serde(
328        rename = "visibility",
329        default,
330        skip_serializing_if = "Option::is_none"
331    )]
332    pub visibility: Option<FloatingIpCreateRequestInputVisibility>,
333    /// Required for private floating IPs; subnet UUID or CRN in this account. Targets may be in other subnets of the same VPC.
334    #[serde(rename = "subnet", default, skip_serializing_if = "Option::is_none")]
335    pub subnet: Option<String>,
336}
337
338#[derive(Clone, Debug, PartialEq, Eq)]
339pub enum IpFamilyInput {
340    Ipv4,
341    Ipv6,
342    Unknown(String),
343}
344impl IpFamilyInput {
345    pub fn as_str(&self) -> &str {
346        match self {
347            Self::Ipv4 => "ipv4",
348            Self::Ipv6 => "ipv6",
349            Self::Unknown(value) => value,
350        }
351    }
352}
353impl serde::Serialize for IpFamilyInput {
354    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
355        serializer.serialize_str(self.as_str())
356    }
357}
358impl<'de> serde::Deserialize<'de> for IpFamilyInput {
359    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
360        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
361        Ok(match value.as_str() {
362            "ipv4" => Self::Ipv4,
363            "ipv6" => Self::Ipv6,
364            _ => Self::Unknown(value),
365        })
366    }
367}
368
369#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
370pub struct FloatingIpHealthCheckInput {
371    /// `tcp` opens a connection; `http`/`https` issue a GET and match the status against `matcher`. There is no `udp`: a readiness probe needs an answer — check a udp service on a tcp health port instead.
372    #[serde(rename = "protocol")]
373    pub protocol: FloatingIpHealthCheckInputProtocol,
374    /// HTTP path probed; ignored for tcp.
375    #[serde(rename = "path", default, skip_serializing_if = "Option::is_none")]
376    pub path: Option<String>,
377    /// Port probed on the member.
378    #[serde(rename = "port")]
379    pub port: i64,
380
381    #[serde(rename = "interval_sec")]
382    pub interval_sec: i64,
383    /// Per-probe timeout; must be less than interval_sec.
384    #[serde(rename = "timeout_sec")]
385    pub timeout_sec: i64,
386    /// Consecutive passes before a member flips healthy.
387    #[serde(rename = "healthy_threshold")]
388    pub healthy_threshold: i64,
389    /// Consecutive failures before a member flips unhealthy.
390    #[serde(rename = "unhealthy_threshold")]
391    pub unhealthy_threshold: i64,
392    /// HTTP status or range that counts as passing; ignored for tcp.
393    #[serde(rename = "matcher", default, skip_serializing_if = "Option::is_none")]
394    pub matcher: Option<String>,
395}
396impl FloatingIpHealthCheckInput {
397    /// Set the required fields; optional fields start omitted.
398    #[allow(clippy::too_many_arguments)]
399    pub fn new(
400        protocol: FloatingIpHealthCheckInputProtocol,
401        port: i64,
402        interval_sec: i64,
403        timeout_sec: i64,
404        healthy_threshold: i64,
405        unhealthy_threshold: i64,
406    ) -> Self {
407        Self {
408            protocol,
409            path: None,
410            port,
411            interval_sec,
412            timeout_sec,
413            healthy_threshold,
414            unhealthy_threshold,
415            matcher: None,
416        }
417    }
418}
419
420#[derive(Clone, Debug, PartialEq, Eq)]
421pub enum FloatingIpHealthCheckInputProtocol {
422    Tcp,
423    Http,
424    Https,
425    Unknown(String),
426}
427impl FloatingIpHealthCheckInputProtocol {
428    pub fn as_str(&self) -> &str {
429        match self {
430            Self::Tcp => "tcp",
431            Self::Http => "http",
432            Self::Https => "https",
433            Self::Unknown(value) => value,
434        }
435    }
436}
437impl serde::Serialize for FloatingIpHealthCheckInputProtocol {
438    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
439        serializer.serialize_str(self.as_str())
440    }
441}
442impl<'de> serde::Deserialize<'de> for FloatingIpHealthCheckInputProtocol {
443    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
444        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
445        Ok(match value.as_str() {
446            "tcp" => Self::Tcp,
447            "http" => Self::Http,
448            "https" => Self::Https,
449            _ => Self::Unknown(value),
450        })
451    }
452}
453
454#[derive(Clone, Debug, PartialEq, Eq)]
455pub enum FloatingIpCreateRequestInputVisibility {
456    Public,
457    Private,
458    Unknown(String),
459}
460impl FloatingIpCreateRequestInputVisibility {
461    pub fn as_str(&self) -> &str {
462        match self {
463            Self::Public => "public",
464            Self::Private => "private",
465            Self::Unknown(value) => value,
466        }
467    }
468}
469impl serde::Serialize for FloatingIpCreateRequestInputVisibility {
470    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
471        serializer.serialize_str(self.as_str())
472    }
473}
474impl<'de> serde::Deserialize<'de> for FloatingIpCreateRequestInputVisibility {
475    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
476        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
477        Ok(match value.as_str() {
478            "public" => Self::Public,
479            "private" => Self::Private,
480            _ => Self::Unknown(value),
481        })
482    }
483}
484
485pub type CreateFloatingIpBody = FloatingIpCreateRequestInput;
486
487#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
488pub struct FloatingIpResponse {
489    #[serde(rename = "floating_ip")]
490    pub floating_ip: FloatingIp,
491}
492
493#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
494pub struct FloatingIp {
495    #[serde(rename = "id")]
496    pub id: String,
497
498    #[serde(rename = "crn")]
499    pub crn: String,
500
501    #[serde(
502        rename = "description",
503        default,
504        skip_serializing_if = "Option::is_none"
505    )]
506    pub description: Option<String>,
507
508    #[serde(rename = "family")]
509    pub family: IpFamily,
510    /// Instance pool or load balancer that owns the address. Null for direct interface attachments and unattached addresses. An empty pool retains ownership.
511    #[serde(rename = "attached_to")]
512    pub attached_to: FloatingIpAttachedTo,
513
514    #[serde(rename = "tags")]
515    pub tags: std::collections::BTreeMap<String, String>,
516    /// The readiness check applied to this address's members. Absent when none is configured. See `FloatingIpHealthCheck`.
517    #[serde(
518        rename = "health_check",
519        default,
520        skip_serializing_if = "Option::is_none"
521    )]
522    pub health_check: Option<FloatingIpHealthCheck>,
523
524    #[serde(rename = "created_at")]
525    pub created_at: String,
526
527    #[serde(rename = "updated_at")]
528    pub updated_at: String,
529    /// Allocated public or private address.
530    #[serde(rename = "address")]
531    pub address: String,
532
533    #[serde(rename = "visibility")]
534    pub visibility: FloatingIpVisibility,
535    /// Allocation subnet for a private floating IP; null for public addresses.
536    #[serde(rename = "subnet")]
537    pub subnet: FloatingIpSubnet,
538    /// Allocation VPC for a private floating IP; null for public addresses.
539    #[serde(rename = "vpc")]
540    pub vpc: FloatingIpVpc,
541}
542
543#[derive(Clone, Debug, PartialEq, Eq)]
544pub enum IpFamily {
545    Ipv4,
546    Ipv6,
547    Unknown(String),
548}
549impl IpFamily {
550    pub fn as_str(&self) -> &str {
551        match self {
552            Self::Ipv4 => "ipv4",
553            Self::Ipv6 => "ipv6",
554            Self::Unknown(value) => value,
555        }
556    }
557}
558impl serde::Serialize for IpFamily {
559    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
560        serializer.serialize_str(self.as_str())
561    }
562}
563impl<'de> serde::Deserialize<'de> for IpFamily {
564    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
565        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
566        Ok(match value.as_str() {
567            "ipv4" => Self::Ipv4,
568            "ipv6" => Self::Ipv6,
569            _ => Self::Unknown(value),
570        })
571    }
572}
573
574#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
575#[serde(untagged)]
576pub enum FloatingIpAttachedTo {
577    Variant1(Box<ResourceRef>),
578    Variant2(Box<crate::Nullable<serde_json::Value>>),
579}
580
581#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
582pub struct FloatingIpHealthCheck {
583    /// `tcp` opens a connection; `http`/`https` issue a GET and match the status against `matcher`. There is no `udp`: a readiness probe needs an answer — check a udp service on a tcp health port instead.
584    #[serde(rename = "protocol")]
585    pub protocol: FloatingIpHealthCheckProtocol,
586    /// HTTP path probed; ignored for tcp.
587    #[serde(rename = "path", default, skip_serializing_if = "Option::is_none")]
588    pub path: Option<String>,
589    /// Port probed on the member.
590    #[serde(rename = "port")]
591    pub port: i64,
592
593    #[serde(rename = "interval_sec")]
594    pub interval_sec: i64,
595    /// Per-probe timeout; must be less than interval_sec.
596    #[serde(rename = "timeout_sec")]
597    pub timeout_sec: i64,
598    /// Consecutive passes before a member flips healthy.
599    #[serde(rename = "healthy_threshold")]
600    pub healthy_threshold: i64,
601    /// Consecutive failures before a member flips unhealthy.
602    #[serde(rename = "unhealthy_threshold")]
603    pub unhealthy_threshold: i64,
604    /// HTTP status or range that counts as passing; ignored for tcp.
605    #[serde(rename = "matcher", default, skip_serializing_if = "Option::is_none")]
606    pub matcher: Option<String>,
607}
608
609#[derive(Clone, Debug, PartialEq, Eq)]
610pub enum FloatingIpHealthCheckProtocol {
611    Tcp,
612    Http,
613    Https,
614    Unknown(String),
615}
616impl FloatingIpHealthCheckProtocol {
617    pub fn as_str(&self) -> &str {
618        match self {
619            Self::Tcp => "tcp",
620            Self::Http => "http",
621            Self::Https => "https",
622            Self::Unknown(value) => value,
623        }
624    }
625}
626impl serde::Serialize for FloatingIpHealthCheckProtocol {
627    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
628        serializer.serialize_str(self.as_str())
629    }
630}
631impl<'de> serde::Deserialize<'de> for FloatingIpHealthCheckProtocol {
632    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
633        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
634        Ok(match value.as_str() {
635            "tcp" => Self::Tcp,
636            "http" => Self::Http,
637            "https" => Self::Https,
638            _ => Self::Unknown(value),
639        })
640    }
641}
642
643#[derive(Clone, Debug, PartialEq, Eq)]
644pub enum FloatingIpVisibility {
645    Public,
646    Private,
647    Unknown(String),
648}
649impl FloatingIpVisibility {
650    pub fn as_str(&self) -> &str {
651        match self {
652            Self::Public => "public",
653            Self::Private => "private",
654            Self::Unknown(value) => value,
655        }
656    }
657}
658impl serde::Serialize for FloatingIpVisibility {
659    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
660        serializer.serialize_str(self.as_str())
661    }
662}
663impl<'de> serde::Deserialize<'de> for FloatingIpVisibility {
664    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
665        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
666        Ok(match value.as_str() {
667            "public" => Self::Public,
668            "private" => Self::Private,
669            _ => Self::Unknown(value),
670        })
671    }
672}
673
674#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
675#[serde(untagged)]
676pub enum FloatingIpSubnet {
677    Variant1(Box<ResourceRef>),
678    Variant2(Box<crate::Nullable<serde_json::Value>>),
679}
680
681#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
682#[serde(untagged)]
683pub enum FloatingIpVpc {
684    Variant1(Box<ResourceRef>),
685    Variant2(Box<crate::Nullable<serde_json::Value>>),
686}
687
688pub type CreateFloatingIpResponse = FloatingIpResponse;
689
690#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
691pub struct InterfaceCreateRequestInput {
692    /// Subnet UUID or nested CRN (vpc/&lt;vpc&gt;/subnet/&lt;subnet&gt;). A bare name requires an explicit VPC filter; create requests without a VPC do not accept bare names.
693    #[serde(rename = "subnet")]
694    pub subnet: String,
695    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
696    #[serde(rename = "name")]
697    pub name: String,
698
699    #[serde(
700        rename = "description",
701        default,
702        skip_serializing_if = "Option::is_none"
703    )]
704    pub description: Option<String>,
705    /// Defaults to a fresh locally-administered EUI-48
706    #[serde(
707        rename = "mac",
708        default,
709        skip_serializing_if = "Option::is_none",
710        deserialize_with = "crate::response::present_nullable"
711    )]
712    pub mac: Option<crate::Nullable<String>>,
713
714    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
715    pub tags: Option<std::collections::BTreeMap<String, String>>,
716    /// Every enabled subnet family is allocated automatically. Entries may request a fixed IPv4 address; omitting a family never disables it. At most one entry per family.
717    #[serde(rename = "addresses", default, skip_serializing_if = "Option::is_none")]
718    pub addresses: Option<Vec<AddressRequestInput>>,
719}
720impl InterfaceCreateRequestInput {
721    /// Set the required fields; optional fields start omitted.
722    #[allow(clippy::too_many_arguments)]
723    pub fn new(subnet: String, name: String) -> Self {
724        Self {
725            subnet,
726            name,
727            description: None,
728            mac: None,
729            tags: None,
730            addresses: None,
731        }
732    }
733}
734
735#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
736pub struct AddressRequestInput {
737    #[serde(rename = "family")]
738    pub family: AddressRequestInputFamily,
739    /// Optional fixed address when creating an interface or instance NIC. For IPv6, use the first address of an aligned /96 inside the subnet /64 (last 32 bits zero); the first and last /96 ranges are reserved. Omit for automatic allocation. Managed database nodes and the add-address operation require automatic allocation.
740    #[serde(rename = "address", default, skip_serializing_if = "Option::is_none")]
741    pub address: Option<String>,
742}
743impl AddressRequestInput {
744    /// Set the required fields; optional fields start omitted.
745    #[allow(clippy::too_many_arguments)]
746    pub fn new(family: AddressRequestInputFamily) -> Self {
747        Self {
748            family,
749            address: None,
750        }
751    }
752}
753
754#[derive(Clone, Debug, PartialEq, Eq)]
755pub enum AddressRequestInputFamily {
756    Ipv4,
757    Ipv6,
758    Unknown(String),
759}
760impl AddressRequestInputFamily {
761    pub fn as_str(&self) -> &str {
762        match self {
763            Self::Ipv4 => "ipv4",
764            Self::Ipv6 => "ipv6",
765            Self::Unknown(value) => value,
766        }
767    }
768}
769impl serde::Serialize for AddressRequestInputFamily {
770    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
771        serializer.serialize_str(self.as_str())
772    }
773}
774impl<'de> serde::Deserialize<'de> for AddressRequestInputFamily {
775    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
776        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
777        Ok(match value.as_str() {
778            "ipv4" => Self::Ipv4,
779            "ipv6" => Self::Ipv6,
780            _ => Self::Unknown(value),
781        })
782    }
783}
784
785pub type CreateInterfaceBody = InterfaceCreateRequestInput;
786
787#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
788pub struct InterfaceResponse {
789    #[serde(rename = "interface")]
790    pub interface: Interface,
791}
792
793#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
794pub struct Interface {
795    #[serde(rename = "id")]
796    pub id: String,
797
798    #[serde(rename = "crn")]
799    pub crn: String,
800    /// Subnet containing this interface.
801    #[serde(rename = "subnet")]
802    pub subnet: ResourceRef,
803    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
804    #[serde(rename = "name")]
805    pub name: String,
806
807    #[serde(
808        rename = "description",
809        default,
810        skip_serializing_if = "Option::is_none"
811    )]
812    pub description: Option<String>,
813
814    #[serde(rename = "mac")]
815    pub mac: String,
816    /// Instance holding this interface, including a stopped instance. Null when unbound. Floating IP attachments are tracked separately.
817    #[serde(rename = "attached_to")]
818    pub attached_to: InterfaceAttachedTo,
819
820    #[serde(rename = "tags")]
821    pub tags: std::collections::BTreeMap<String, String>,
822
823    #[serde(rename = "created_at")]
824    pub created_at: String,
825
826    #[serde(rename = "updated_at")]
827    pub updated_at: String,
828}
829
830#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
831#[serde(untagged)]
832pub enum InterfaceAttachedTo {
833    Variant1(Box<ResourceRef>),
834    Variant2(Box<crate::Nullable<serde_json::Value>>),
835}
836
837pub type CreateInterfaceResponse = InterfaceResponse;
838
839pub type CreateInterfaceAddressBody = AddressRequestInput;
840
841#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
842pub struct CreateInterfaceAddressResult {
843    #[serde(rename = "address", default, skip_serializing_if = "Option::is_none")]
844    pub address: Option<InterfaceAddress>,
845}
846
847#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
848pub struct InterfaceAddress {
849    #[serde(rename = "id")]
850    pub id: String,
851
852    #[serde(rename = "family")]
853    pub family: InterfaceAddressFamily,
854
855    #[serde(rename = "address")]
856    pub address: String,
857    /// Owned allocation, not the guest netmask: IPv4 /32 or IPv6 /96. DHCPv6 configures the first /128.
858    #[serde(rename = "prefix")]
859    pub prefix: String,
860
861    #[serde(rename = "primary")]
862    pub primary: bool,
863
864    #[serde(rename = "floating_ips")]
865    pub floating_ips: Vec<FloatingIPRef>,
866}
867
868#[derive(Clone, Debug, PartialEq, Eq)]
869pub enum InterfaceAddressFamily {
870    Ipv4,
871    Ipv6,
872    Unknown(String),
873}
874impl InterfaceAddressFamily {
875    pub fn as_str(&self) -> &str {
876        match self {
877            Self::Ipv4 => "ipv4",
878            Self::Ipv6 => "ipv6",
879            Self::Unknown(value) => value,
880        }
881    }
882}
883impl serde::Serialize for InterfaceAddressFamily {
884    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
885        serializer.serialize_str(self.as_str())
886    }
887}
888impl<'de> serde::Deserialize<'de> for InterfaceAddressFamily {
889    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
890        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
891        Ok(match value.as_str() {
892            "ipv4" => Self::Ipv4,
893            "ipv6" => Self::Ipv6,
894            _ => Self::Unknown(value),
895        })
896    }
897}
898
899#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
900pub struct FloatingIPRef {
901    #[serde(rename = "id")]
902    pub id: String,
903
904    #[serde(rename = "crn")]
905    pub crn: String,
906
907    #[serde(rename = "visibility")]
908    pub visibility: FloatingIPRefVisibility,
909
910    #[serde(rename = "address")]
911    pub address: String,
912}
913
914#[derive(Clone, Debug, PartialEq, Eq)]
915pub enum FloatingIPRefVisibility {
916    Public,
917    Private,
918    Unknown(String),
919}
920impl FloatingIPRefVisibility {
921    pub fn as_str(&self) -> &str {
922        match self {
923            Self::Public => "public",
924            Self::Private => "private",
925            Self::Unknown(value) => value,
926        }
927    }
928}
929impl serde::Serialize for FloatingIPRefVisibility {
930    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
931        serializer.serialize_str(self.as_str())
932    }
933}
934impl<'de> serde::Deserialize<'de> for FloatingIPRefVisibility {
935    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
936        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
937        Ok(match value.as_str() {
938            "public" => Self::Public,
939            "private" => Self::Private,
940            _ => Self::Unknown(value),
941        })
942    }
943}
944
945pub type CreateInterfaceAddressResponse = CreateInterfaceAddressResult;
946
947#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
948pub struct CreateInterfacePrefixRequest {
949    /// Pool UUID or CRN in the interface VPC.
950    #[serde(rename = "pool")]
951    pub pool: String,
952}
953impl CreateInterfacePrefixRequest {
954    /// Set the required fields; optional fields start omitted.
955    #[allow(clippy::too_many_arguments)]
956    pub fn new(pool: String) -> Self {
957        Self { pool }
958    }
959}
960
961pub type CreateInterfacePrefixBody = CreateInterfacePrefixRequest;
962
963#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
964pub struct CreateInterfacePrefixResult {
965    #[serde(rename = "prefix")]
966    pub prefix: RoutedPrefix,
967}
968
969#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
970pub struct RoutedPrefix {
971    #[serde(rename = "id")]
972    pub id: String,
973
974    #[serde(rename = "pool")]
975    pub pool: ResourceRef,
976
977    #[serde(rename = "family")]
978    pub family: RoutedPrefixFamily,
979    /// A routed /28 from a VPC prefix pool.
980    #[serde(rename = "prefix")]
981    pub prefix: String,
982}
983
984#[derive(Clone, Debug, PartialEq, Eq)]
985pub enum RoutedPrefixFamily {
986    Ipv4,
987    Unknown(String),
988}
989impl RoutedPrefixFamily {
990    pub fn as_str(&self) -> &str {
991        match self {
992            Self::Ipv4 => "ipv4",
993            Self::Unknown(value) => value,
994        }
995    }
996}
997impl serde::Serialize for RoutedPrefixFamily {
998    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
999        serializer.serialize_str(self.as_str())
1000    }
1001}
1002impl<'de> serde::Deserialize<'de> for RoutedPrefixFamily {
1003    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1004        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1005        Ok(match value.as_str() {
1006            "ipv4" => Self::Ipv4,
1007            _ => Self::Unknown(value),
1008        })
1009    }
1010}
1011
1012pub type CreateInterfacePrefixResponse = CreateInterfacePrefixResult;
1013
1014#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1015pub struct InternetGatewayCreateRequestInput {
1016    /// VPC UUID, CRN or exact name in the caller account. The binding is permanent.
1017    #[serde(rename = "vpc")]
1018    pub vpc: String,
1019    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1020    #[serde(rename = "name")]
1021    pub name: String,
1022
1023    #[serde(
1024        rename = "description",
1025        default,
1026        skip_serializing_if = "Option::is_none"
1027    )]
1028    pub description: Option<String>,
1029
1030    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1031    pub tags: Option<std::collections::BTreeMap<String, String>>,
1032}
1033impl InternetGatewayCreateRequestInput {
1034    /// Set the required fields; optional fields start omitted.
1035    #[allow(clippy::too_many_arguments)]
1036    pub fn new(vpc: String, name: String) -> Self {
1037        Self {
1038            vpc,
1039            name,
1040            description: None,
1041            tags: None,
1042        }
1043    }
1044}
1045
1046pub type CreateInternetGatewayBody = InternetGatewayCreateRequestInput;
1047
1048#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1049pub struct InternetGatewayResponse {
1050    #[serde(rename = "internet_gateway")]
1051    pub internet_gateway: InternetGateway,
1052}
1053
1054#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1055pub struct InternetGateway {
1056    #[serde(rename = "id")]
1057    pub id: String,
1058
1059    #[serde(rename = "crn")]
1060    pub crn: String,
1061    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1062    #[serde(rename = "name")]
1063    pub name: String,
1064
1065    #[serde(
1066        rename = "description",
1067        default,
1068        skip_serializing_if = "Option::is_none"
1069    )]
1070    pub description: Option<String>,
1071    /// VPC the internet gateway is attached to.
1072    #[serde(
1073        rename = "attached_vpc",
1074        default,
1075        skip_serializing_if = "Option::is_none"
1076    )]
1077    pub attached_vpc: Option<InternetGatewayAttachedVpc>,
1078
1079    #[serde(rename = "tags")]
1080    pub tags: std::collections::BTreeMap<String, String>,
1081
1082    #[serde(rename = "created_at")]
1083    pub created_at: String,
1084
1085    #[serde(rename = "updated_at")]
1086    pub updated_at: String,
1087}
1088
1089#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1090#[serde(untagged)]
1091pub enum InternetGatewayAttachedVpc {
1092    Variant1(Box<ResourceRef>),
1093    Variant2(Box<crate::Nullable<serde_json::Value>>),
1094}
1095
1096pub type CreateInternetGatewayResponse = InternetGatewayResponse;
1097
1098#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1099pub struct NATGatewayCreateRequestInput {
1100    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1101    #[serde(rename = "name")]
1102    pub name: String,
1103
1104    #[serde(
1105        rename = "description",
1106        default,
1107        skip_serializing_if = "Option::is_none"
1108    )]
1109    pub description: Option<String>,
1110    /// Subnet UUID or nested CRN (vpc/&lt;vpc&gt;/subnet/&lt;subnet&gt;). A bare name requires an explicit VPC filter; create requests without a VPC do not accept bare names.
1111    #[serde(rename = "subnet")]
1112    pub subnet: String,
1113
1114    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1115    pub tags: Option<std::collections::BTreeMap<String, String>>,
1116}
1117impl NATGatewayCreateRequestInput {
1118    /// Set the required fields; optional fields start omitted.
1119    #[allow(clippy::too_many_arguments)]
1120    pub fn new(name: String, subnet: String) -> Self {
1121        Self {
1122            name,
1123            description: None,
1124            subnet,
1125            tags: None,
1126        }
1127    }
1128}
1129
1130pub type CreateNATGatewayBody = NATGatewayCreateRequestInput;
1131
1132#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1133pub struct NATGatewayResponse {
1134    #[serde(
1135        rename = "nat_gateway",
1136        default,
1137        skip_serializing_if = "Option::is_none"
1138    )]
1139    pub nat_gateway: Option<NATGateway>,
1140}
1141
1142#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1143pub struct NATGateway {
1144    #[serde(rename = "id")]
1145    pub id: String,
1146
1147    #[serde(rename = "crn")]
1148    pub crn: String,
1149    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1150    #[serde(rename = "name")]
1151    pub name: String,
1152
1153    #[serde(
1154        rename = "description",
1155        default,
1156        skip_serializing_if = "Option::is_none"
1157    )]
1158    pub description: Option<String>,
1159
1160    #[serde(rename = "subnet")]
1161    pub subnet: ResourceRef,
1162    /// Public IPv4 allocated from the regional pool at creation. Stable until gateway deletion.
1163    #[serde(rename = "public_ipv4")]
1164    pub public_ipv4: String,
1165    /// Public IPv6 allocated from the regional pool when the gateway's hosting subnet has IPv6. Assigned at gateway creation or when IPv6 is enabled on that subnet, independently of routes. Stable until gateway deletion. Shared source NAT supports both global and ULA subnet addresses.
1166    #[serde(
1167        rename = "public_ipv6",
1168        default,
1169        skip_serializing_if = "Option::is_none"
1170    )]
1171    pub public_ipv6: Option<String>,
1172
1173    #[serde(rename = "tags")]
1174    pub tags: std::collections::BTreeMap<String, String>,
1175
1176    #[serde(rename = "created_at")]
1177    pub created_at: String,
1178
1179    #[serde(rename = "updated_at")]
1180    pub updated_at: String,
1181}
1182
1183pub type CreateNATGatewayResponse = NATGatewayResponse;
1184
1185#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1186pub struct CreatePrefixPoolRequest {
1187    #[serde(rename = "cidr_ipv4")]
1188    pub cidr_ipv4: String,
1189}
1190impl CreatePrefixPoolRequest {
1191    /// Set the required fields; optional fields start omitted.
1192    #[allow(clippy::too_many_arguments)]
1193    pub fn new(cidr_ipv4: String) -> Self {
1194        Self { cidr_ipv4 }
1195    }
1196}
1197
1198pub type CreatePrefixPoolBody = CreatePrefixPoolRequest;
1199
1200#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1201pub struct CreatePrefixPoolResult {
1202    #[serde(rename = "prefix_pool")]
1203    pub prefix_pool: PrefixPool,
1204}
1205
1206#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1207pub struct PrefixPool {
1208    #[serde(rename = "crn")]
1209    pub crn: String,
1210
1211    #[serde(rename = "id")]
1212    pub id: String,
1213    /// VPC IPv4 range disjoint from all subnets and other prefix pools.
1214    #[serde(rename = "cidr_ipv4")]
1215    pub cidr_ipv4: String,
1216}
1217
1218pub type CreatePrefixPoolResponse = CreatePrefixPoolResult;
1219
1220#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1221pub struct RouteCreateRequestInput {
1222    #[serde(
1223        rename = "description",
1224        default,
1225        skip_serializing_if = "Option::is_none"
1226    )]
1227    pub description: Option<String>,
1228
1229    #[serde(rename = "destination_cidr")]
1230    pub destination_cidr: String,
1231    /// Unicast next hop inside this VPC's CIDR (same IP family as destination_cidr). Not for internet egress — use a gateway target id instead.
1232    #[serde(
1233        rename = "next_hop_ip",
1234        default,
1235        skip_serializing_if = "Option::is_none",
1236        deserialize_with = "crate::response::present_nullable"
1237    )]
1238    pub next_hop_ip: Option<crate::Nullable<String>>,
1239    /// Gateway UUID, CRN or exact account-scoped name. Must belong to the route table VPC and match the destination_cidr address family. Exactly one route target is required.
1240    #[serde(
1241        rename = "target_internet_gateway",
1242        default,
1243        skip_serializing_if = "Option::is_none"
1244    )]
1245    pub target_internet_gateway: Option<String>,
1246    /// Gateway UUID, CRN or exact account-scoped name. Must belong to the route table VPC and match the destination_cidr address family. Exactly one route target is required.
1247    #[serde(
1248        rename = "target_nat_gateway",
1249        default,
1250        skip_serializing_if = "Option::is_none"
1251    )]
1252    pub target_nat_gateway: Option<String>,
1253    /// Gateway UUID, CRN or exact account-scoped name. Must belong to the route table VPC and match the destination_cidr address family. Exactly one route target is required.
1254    #[serde(
1255        rename = "target_egress_only_gateway",
1256        default,
1257        skip_serializing_if = "Option::is_none"
1258    )]
1259    pub target_egress_only_gateway: Option<String>,
1260
1261    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1262    pub tags: Option<std::collections::BTreeMap<String, String>>,
1263}
1264impl RouteCreateRequestInput {
1265    /// Set the required fields; optional fields start omitted.
1266    #[allow(clippy::too_many_arguments)]
1267    pub fn new(destination_cidr: String) -> Self {
1268        Self {
1269            description: None,
1270            destination_cidr,
1271            next_hop_ip: None,
1272            target_internet_gateway: None,
1273            target_nat_gateway: None,
1274            target_egress_only_gateway: None,
1275            tags: None,
1276        }
1277    }
1278}
1279
1280pub type CreateRouteBody = RouteCreateRequestInput;
1281
1282#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1283pub struct RouteResponse {
1284    #[serde(rename = "route", default, skip_serializing_if = "Option::is_none")]
1285    pub route: Option<Route>,
1286}
1287
1288#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1289pub struct Route {
1290    #[serde(rename = "id")]
1291    pub id: String,
1292
1293    #[serde(rename = "crn")]
1294    pub crn: String,
1295
1296    #[serde(
1297        rename = "description",
1298        default,
1299        skip_serializing_if = "Option::is_none"
1300    )]
1301    pub description: Option<String>,
1302
1303    #[serde(rename = "destination_cidr")]
1304    pub destination_cidr: String,
1305
1306    #[serde(rename = "target_type")]
1307    pub target_type: RouteTargetType,
1308    /// Set when target_type=ip. Mutex with the target_* fields. Must be a unicast address inside this VPC's CIDR (same IP family as destination_cidr); internet egress uses target_internet_gateway / target_nat_gateway.
1309    #[serde(
1310        rename = "next_hop_ip",
1311        default,
1312        skip_serializing_if = "Option::is_none",
1313        deserialize_with = "crate::response::present_nullable"
1314    )]
1315    pub next_hop_ip: Option<crate::Nullable<String>>,
1316    /// Set when target_type=internet_gateway.
1317    #[serde(
1318        rename = "target_internet_gateway",
1319        default,
1320        skip_serializing_if = "Option::is_none"
1321    )]
1322    pub target_internet_gateway: Option<ResourceRef>,
1323    /// Set when target_type=nat_gateway. Supports IPv4 and IPv6; IPv6 requires an IPv6-enabled hosting subnet.
1324    #[serde(
1325        rename = "target_nat_gateway",
1326        default,
1327        skip_serializing_if = "Option::is_none"
1328    )]
1329    pub target_nat_gateway: Option<ResourceRef>,
1330    /// Set when target_type=egress_only_gateway (IPv6 only). Gives the subnet outbound IPv6 and replies only.
1331    #[serde(
1332        rename = "target_egress_only_gateway",
1333        default,
1334        skip_serializing_if = "Option::is_none"
1335    )]
1336    pub target_egress_only_gateway: Option<ResourceRef>,
1337
1338    #[serde(rename = "tags")]
1339    pub tags: std::collections::BTreeMap<String, String>,
1340
1341    #[serde(rename = "created_at")]
1342    pub created_at: String,
1343
1344    #[serde(rename = "updated_at")]
1345    pub updated_at: String,
1346}
1347
1348#[derive(Clone, Debug, PartialEq, Eq)]
1349pub enum RouteTargetType {
1350    Ip,
1351    InternetGateway,
1352    NatGateway,
1353    EgressOnlyGateway,
1354    Unknown(String),
1355}
1356impl RouteTargetType {
1357    pub fn as_str(&self) -> &str {
1358        match self {
1359            Self::Ip => "ip",
1360            Self::InternetGateway => "internet_gateway",
1361            Self::NatGateway => "nat_gateway",
1362            Self::EgressOnlyGateway => "egress_only_gateway",
1363            Self::Unknown(value) => value,
1364        }
1365    }
1366}
1367impl serde::Serialize for RouteTargetType {
1368    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1369        serializer.serialize_str(self.as_str())
1370    }
1371}
1372impl<'de> serde::Deserialize<'de> for RouteTargetType {
1373    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1374        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1375        Ok(match value.as_str() {
1376            "ip" => Self::Ip,
1377            "internet_gateway" => Self::InternetGateway,
1378            "nat_gateway" => Self::NatGateway,
1379            "egress_only_gateway" => Self::EgressOnlyGateway,
1380            _ => Self::Unknown(value),
1381        })
1382    }
1383}
1384
1385pub type CreateRouteResponse = RouteResponse;
1386
1387#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1388pub struct RouteTableCreateRequestInput {
1389    /// VPC UUID, CRN or exact name in the caller account.
1390    #[serde(rename = "vpc")]
1391    pub vpc: String,
1392    /// 1-63 chars, lowercase alphanumeric + hyphen. `main` is reserved. Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1393    #[serde(rename = "name")]
1394    pub name: String,
1395
1396    #[serde(
1397        rename = "description",
1398        default,
1399        skip_serializing_if = "Option::is_none"
1400    )]
1401    pub description: Option<String>,
1402
1403    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1404    pub tags: Option<std::collections::BTreeMap<String, String>>,
1405}
1406impl RouteTableCreateRequestInput {
1407    /// Set the required fields; optional fields start omitted.
1408    #[allow(clippy::too_many_arguments)]
1409    pub fn new(vpc: String, name: String) -> Self {
1410        Self {
1411            vpc,
1412            name,
1413            description: None,
1414            tags: None,
1415        }
1416    }
1417}
1418
1419pub type CreateRouteTableBody = RouteTableCreateRequestInput;
1420
1421#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1422pub struct RouteTableResponse {
1423    #[serde(
1424        rename = "route_table",
1425        default,
1426        skip_serializing_if = "Option::is_none"
1427    )]
1428    pub route_table: Option<RouteTable>,
1429}
1430
1431#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1432pub struct RouteTable {
1433    #[serde(rename = "id")]
1434    pub id: String,
1435
1436    #[serde(rename = "crn")]
1437    pub crn: String,
1438
1439    #[serde(rename = "vpc")]
1440    pub vpc: ResourceRef,
1441    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1442    #[serde(rename = "name")]
1443    pub name: String,
1444
1445    #[serde(
1446        rename = "description",
1447        default,
1448        skip_serializing_if = "Option::is_none"
1449    )]
1450    pub description: Option<String>,
1451    /// True for the per-VPC default table, named &lt;vpc-name&gt;-private-rt. It is created automatically and can't be deleted. Subnets that don't specify a route_table at create time land here.
1452    #[serde(rename = "is_main")]
1453    pub is_main: bool,
1454
1455    #[serde(rename = "tags")]
1456    pub tags: std::collections::BTreeMap<String, String>,
1457
1458    #[serde(rename = "created_at")]
1459    pub created_at: String,
1460
1461    #[serde(rename = "updated_at")]
1462    pub updated_at: String,
1463}
1464
1465pub type CreateRouteTableResponse = RouteTableResponse;
1466
1467#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1468pub struct SecurityGroupCreateRequestInput {
1469    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1470    #[serde(rename = "name")]
1471    pub name: String,
1472
1473    #[serde(
1474        rename = "description",
1475        default,
1476        skip_serializing_if = "Option::is_none"
1477    )]
1478    pub description: Option<String>,
1479
1480    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1481    pub tags: Option<std::collections::BTreeMap<String, String>>,
1482}
1483impl SecurityGroupCreateRequestInput {
1484    /// Set the required fields; optional fields start omitted.
1485    #[allow(clippy::too_many_arguments)]
1486    pub fn new(name: String) -> Self {
1487        Self {
1488            name,
1489            description: None,
1490            tags: None,
1491        }
1492    }
1493}
1494
1495pub type CreateSecurityGroupBody = SecurityGroupCreateRequestInput;
1496
1497pub type CreateSecurityGroupResponse = SecurityGroupResponse;
1498
1499#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1500pub struct SecurityGroupRuleCreateRequestInput {
1501    #[serde(
1502        rename = "description",
1503        default,
1504        skip_serializing_if = "Option::is_none"
1505    )]
1506    pub description: Option<String>,
1507
1508    #[serde(rename = "direction")]
1509    pub direction: SecurityGroupRuleDirectionInput,
1510
1511    #[serde(rename = "ethertype", default, skip_serializing_if = "Option::is_none")]
1512    pub ethertype: Option<SecurityGroupRuleEthertypeInput>,
1513
1514    #[serde(rename = "protocol")]
1515    pub protocol: SecurityGroupRuleProtocolInput,
1516
1517    #[serde(
1518        rename = "port_min",
1519        default,
1520        skip_serializing_if = "Option::is_none",
1521        deserialize_with = "crate::response::present_nullable"
1522    )]
1523    pub port_min: Option<crate::Nullable<i64>>,
1524
1525    #[serde(
1526        rename = "port_max",
1527        default,
1528        skip_serializing_if = "Option::is_none",
1529        deserialize_with = "crate::response::present_nullable"
1530    )]
1531    pub port_max: Option<crate::Nullable<i64>>,
1532
1533    #[serde(
1534        rename = "remote_cidr",
1535        default,
1536        skip_serializing_if = "Option::is_none",
1537        deserialize_with = "crate::response::present_nullable"
1538    )]
1539    pub remote_cidr: Option<crate::Nullable<String>>,
1540    /// Security-group UUID, CRN or exact account-scoped name. Mutually exclusive with remote_cidr.
1541    #[serde(
1542        rename = "source_security_group",
1543        default,
1544        skip_serializing_if = "Option::is_none"
1545    )]
1546    pub source_security_group: Option<String>,
1547}
1548impl SecurityGroupRuleCreateRequestInput {
1549    /// Set the required fields; optional fields start omitted.
1550    #[allow(clippy::too_many_arguments)]
1551    pub fn new(
1552        direction: SecurityGroupRuleDirectionInput,
1553        protocol: SecurityGroupRuleProtocolInput,
1554    ) -> Self {
1555        Self {
1556            description: None,
1557            direction,
1558            ethertype: None,
1559            protocol,
1560            port_min: None,
1561            port_max: None,
1562            remote_cidr: None,
1563            source_security_group: None,
1564        }
1565    }
1566}
1567
1568#[derive(Clone, Debug, PartialEq, Eq)]
1569pub enum SecurityGroupRuleDirectionInput {
1570    Ingress,
1571    Egress,
1572    Unknown(String),
1573}
1574impl SecurityGroupRuleDirectionInput {
1575    pub fn as_str(&self) -> &str {
1576        match self {
1577            Self::Ingress => "ingress",
1578            Self::Egress => "egress",
1579            Self::Unknown(value) => value,
1580        }
1581    }
1582}
1583impl serde::Serialize for SecurityGroupRuleDirectionInput {
1584    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1585        serializer.serialize_str(self.as_str())
1586    }
1587}
1588impl<'de> serde::Deserialize<'de> for SecurityGroupRuleDirectionInput {
1589    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1590        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1591        Ok(match value.as_str() {
1592            "ingress" => Self::Ingress,
1593            "egress" => Self::Egress,
1594            _ => Self::Unknown(value),
1595        })
1596    }
1597}
1598
1599#[derive(Clone, Debug, PartialEq, Eq)]
1600pub enum SecurityGroupRuleEthertypeInput {
1601    Ipv4,
1602    Ipv6,
1603    Unknown(String),
1604}
1605impl SecurityGroupRuleEthertypeInput {
1606    pub fn as_str(&self) -> &str {
1607        match self {
1608            Self::Ipv4 => "ipv4",
1609            Self::Ipv6 => "ipv6",
1610            Self::Unknown(value) => value,
1611        }
1612    }
1613}
1614impl serde::Serialize for SecurityGroupRuleEthertypeInput {
1615    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1616        serializer.serialize_str(self.as_str())
1617    }
1618}
1619impl<'de> serde::Deserialize<'de> for SecurityGroupRuleEthertypeInput {
1620    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1621        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1622        Ok(match value.as_str() {
1623            "ipv4" => Self::Ipv4,
1624            "ipv6" => Self::Ipv6,
1625            _ => Self::Unknown(value),
1626        })
1627    }
1628}
1629
1630#[derive(Clone, Debug, PartialEq, Eq)]
1631pub enum SecurityGroupRuleProtocolInput {
1632    Tcp,
1633    Udp,
1634    Icmp,
1635    All,
1636    Unknown(String),
1637}
1638impl SecurityGroupRuleProtocolInput {
1639    pub fn as_str(&self) -> &str {
1640        match self {
1641            Self::Tcp => "tcp",
1642            Self::Udp => "udp",
1643            Self::Icmp => "icmp",
1644            Self::All => "all",
1645            Self::Unknown(value) => value,
1646        }
1647    }
1648}
1649impl serde::Serialize for SecurityGroupRuleProtocolInput {
1650    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1651        serializer.serialize_str(self.as_str())
1652    }
1653}
1654impl<'de> serde::Deserialize<'de> for SecurityGroupRuleProtocolInput {
1655    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1656        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1657        Ok(match value.as_str() {
1658            "tcp" => Self::Tcp,
1659            "udp" => Self::Udp,
1660            "icmp" => Self::Icmp,
1661            "all" => Self::All,
1662            _ => Self::Unknown(value),
1663        })
1664    }
1665}
1666
1667pub type CreateSecurityGroupRuleBody = SecurityGroupRuleCreateRequestInput;
1668
1669#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1670pub struct SecurityGroupRuleResponse {
1671    #[serde(rename = "rule", default, skip_serializing_if = "Option::is_none")]
1672    pub rule: Option<SecurityGroupRule>,
1673}
1674
1675#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1676pub struct SecurityGroupRule {
1677    #[serde(rename = "id")]
1678    pub id: String,
1679
1680    #[serde(
1681        rename = "description",
1682        default,
1683        skip_serializing_if = "Option::is_none"
1684    )]
1685    pub description: Option<String>,
1686
1687    #[serde(rename = "direction")]
1688    pub direction: SecurityGroupRuleDirection,
1689
1690    #[serde(rename = "ethertype")]
1691    pub ethertype: SecurityGroupRuleEthertype,
1692
1693    #[serde(rename = "protocol")]
1694    pub protocol: SecurityGroupRuleProtocol,
1695    /// Required when protocol is tcp/udp; ignored otherwise.
1696    #[serde(
1697        rename = "port_min",
1698        default,
1699        skip_serializing_if = "Option::is_none",
1700        deserialize_with = "crate::response::present_nullable"
1701    )]
1702    pub port_min: Option<crate::Nullable<i64>>,
1703
1704    #[serde(
1705        rename = "port_max",
1706        default,
1707        skip_serializing_if = "Option::is_none",
1708        deserialize_with = "crate::response::present_nullable"
1709    )]
1710    pub port_max: Option<crate::Nullable<i64>>,
1711    /// Source (ingress) or destination_cidr (egress) CIDR. Must match the rule's ethertype. Mutually exclusive with source_security_group.
1712    #[serde(
1713        rename = "remote_cidr",
1714        default,
1715        skip_serializing_if = "Option::is_none",
1716        deserialize_with = "crate::response::present_nullable"
1717    )]
1718    pub remote_cidr: Option<crate::Nullable<String>>,
1719    /// Security group supplying the source or destination members. Mutually exclusive with remote_cidr.
1720    #[serde(
1721        rename = "source_security_group",
1722        default,
1723        skip_serializing_if = "Option::is_none"
1724    )]
1725    pub source_security_group: Option<ResourceRef>,
1726
1727    #[serde(rename = "created_at")]
1728    pub created_at: String,
1729}
1730
1731#[derive(Clone, Debug, PartialEq, Eq)]
1732pub enum SecurityGroupRuleDirection {
1733    Ingress,
1734    Egress,
1735    Unknown(String),
1736}
1737impl SecurityGroupRuleDirection {
1738    pub fn as_str(&self) -> &str {
1739        match self {
1740            Self::Ingress => "ingress",
1741            Self::Egress => "egress",
1742            Self::Unknown(value) => value,
1743        }
1744    }
1745}
1746impl serde::Serialize for SecurityGroupRuleDirection {
1747    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1748        serializer.serialize_str(self.as_str())
1749    }
1750}
1751impl<'de> serde::Deserialize<'de> for SecurityGroupRuleDirection {
1752    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1753        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1754        Ok(match value.as_str() {
1755            "ingress" => Self::Ingress,
1756            "egress" => Self::Egress,
1757            _ => Self::Unknown(value),
1758        })
1759    }
1760}
1761
1762#[derive(Clone, Debug, PartialEq, Eq)]
1763pub enum SecurityGroupRuleEthertype {
1764    Ipv4,
1765    Ipv6,
1766    Unknown(String),
1767}
1768impl SecurityGroupRuleEthertype {
1769    pub fn as_str(&self) -> &str {
1770        match self {
1771            Self::Ipv4 => "ipv4",
1772            Self::Ipv6 => "ipv6",
1773            Self::Unknown(value) => value,
1774        }
1775    }
1776}
1777impl serde::Serialize for SecurityGroupRuleEthertype {
1778    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1779        serializer.serialize_str(self.as_str())
1780    }
1781}
1782impl<'de> serde::Deserialize<'de> for SecurityGroupRuleEthertype {
1783    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1784        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1785        Ok(match value.as_str() {
1786            "ipv4" => Self::Ipv4,
1787            "ipv6" => Self::Ipv6,
1788            _ => Self::Unknown(value),
1789        })
1790    }
1791}
1792
1793#[derive(Clone, Debug, PartialEq, Eq)]
1794pub enum SecurityGroupRuleProtocol {
1795    Tcp,
1796    Udp,
1797    Icmp,
1798    All,
1799    Unknown(String),
1800}
1801impl SecurityGroupRuleProtocol {
1802    pub fn as_str(&self) -> &str {
1803        match self {
1804            Self::Tcp => "tcp",
1805            Self::Udp => "udp",
1806            Self::Icmp => "icmp",
1807            Self::All => "all",
1808            Self::Unknown(value) => value,
1809        }
1810    }
1811}
1812impl serde::Serialize for SecurityGroupRuleProtocol {
1813    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1814        serializer.serialize_str(self.as_str())
1815    }
1816}
1817impl<'de> serde::Deserialize<'de> for SecurityGroupRuleProtocol {
1818    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1819        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1820        Ok(match value.as_str() {
1821            "tcp" => Self::Tcp,
1822            "udp" => Self::Udp,
1823            "icmp" => Self::Icmp,
1824            "all" => Self::All,
1825            _ => Self::Unknown(value),
1826        })
1827    }
1828}
1829
1830pub type CreateSecurityGroupRuleResponse = SecurityGroupRuleResponse;
1831
1832#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1833pub struct SubnetCreateRequestInput {
1834    /// VPC UUID, CRN or exact name in the caller account.
1835    #[serde(rename = "vpc")]
1836    pub vpc: String,
1837    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1838    #[serde(rename = "name")]
1839    pub name: String,
1840
1841    #[serde(
1842        rename = "description",
1843        default,
1844        skip_serializing_if = "Option::is_none"
1845    )]
1846    pub description: Option<String>,
1847
1848    #[serde(rename = "cidr_ipv4")]
1849    pub cidr_ipv4: String,
1850    /// Defaults to the first usable host in the CIDR
1851    #[serde(
1852        rename = "gateway_ipv4",
1853        default,
1854        skip_serializing_if = "Option::is_none",
1855        deserialize_with = "crate::response::present_nullable"
1856    )]
1857    pub gateway_ipv4: Option<crate::Nullable<String>>,
1858    /// Route-table UUID, nested CRN or exact name within the subnet VPC. On PATCH the owned path subnet supplies the VPC. Omission on create selects the default table; an empty reference is invalid.
1859    #[serde(
1860        rename = "route_table",
1861        default,
1862        skip_serializing_if = "Option::is_none"
1863    )]
1864    pub route_table: Option<String>,
1865    /// Allocate a free /64 from the VPC IPv6 range. Can be enabled after creation. Every existing and new interface receives an IPv6 /96 and its first /128 automatically. NAT gateways hosted here also receive a public IPv6 address from the regional pool. Updating hosted gateways requires UpdateNATGateway permission and public IPv6 quota.
1866    #[serde(
1867        rename = "allocate_cidr_ipv6",
1868        default,
1869        skip_serializing_if = "Option::is_none"
1870    )]
1871    pub allocate_cidr_ipv6: Option<bool>,
1872    /// An aligned /64 inside the VPC IPv6 range. Can be added later; cannot replace an existing range. Mutually exclusive with allocate_cidr_ipv6.
1873    #[serde(
1874        rename = "cidr_ipv6",
1875        default,
1876        skip_serializing_if = "Option::is_none",
1877        deserialize_with = "crate::response::present_nullable"
1878    )]
1879    pub cidr_ipv6: Option<crate::Nullable<String>>,
1880
1881    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1882    pub tags: Option<std::collections::BTreeMap<String, String>>,
1883}
1884impl SubnetCreateRequestInput {
1885    /// Set the required fields; optional fields start omitted.
1886    #[allow(clippy::too_many_arguments)]
1887    pub fn new(vpc: String, name: String, cidr_ipv4: String) -> Self {
1888        Self {
1889            vpc,
1890            name,
1891            description: None,
1892            cidr_ipv4,
1893            gateway_ipv4: None,
1894            route_table: None,
1895            allocate_cidr_ipv6: None,
1896            cidr_ipv6: None,
1897            tags: None,
1898        }
1899    }
1900}
1901
1902pub type CreateSubnetBody = SubnetCreateRequestInput;
1903
1904#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1905pub struct SubnetResponse {
1906    #[serde(rename = "subnet")]
1907    pub subnet: Subnet,
1908}
1909
1910#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1911pub struct Subnet {
1912    #[serde(rename = "id")]
1913    pub id: String,
1914
1915    #[serde(rename = "crn")]
1916    pub crn: String,
1917
1918    #[serde(rename = "vpc")]
1919    pub vpc: ResourceRef,
1920    /// Route table associated with this subnet; null when the table is unavailable.
1921    #[serde(rename = "route_table")]
1922    pub route_table: SubnetRouteTable,
1923    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1924    #[serde(rename = "name")]
1925    pub name: String,
1926
1927    #[serde(
1928        rename = "description",
1929        default,
1930        skip_serializing_if = "Option::is_none"
1931    )]
1932    pub description: Option<String>,
1933
1934    #[serde(rename = "cidr_ipv4")]
1935    pub cidr_ipv4: String,
1936
1937    #[serde(rename = "gateway_ipv4")]
1938    pub gateway_ipv4: String,
1939    /// The dual-stack IPv6 /64, if the subnet is v6-enabled. Its presence (vs the v4 cidr_ipv4) is how a client tells the subnet's families apart.
1940    #[serde(
1941        rename = "cidr_ipv6",
1942        default,
1943        skip_serializing_if = "Option::is_none",
1944        deserialize_with = "crate::response::present_nullable"
1945    )]
1946    pub cidr_ipv6: Option<crate::Nullable<String>>,
1947
1948    #[serde(
1949        rename = "gateway_ipv6",
1950        default,
1951        skip_serializing_if = "Option::is_none",
1952        deserialize_with = "crate::response::present_nullable"
1953    )]
1954    pub gateway_ipv6: Option<crate::Nullable<String>>,
1955
1956    #[serde(rename = "tags")]
1957    pub tags: std::collections::BTreeMap<String, String>,
1958
1959    #[serde(rename = "created_at")]
1960    pub created_at: String,
1961
1962    #[serde(rename = "updated_at")]
1963    pub updated_at: String,
1964}
1965
1966#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1967#[serde(untagged)]
1968pub enum SubnetRouteTable {
1969    Variant1(Box<ResourceRef>),
1970    Variant2(Box<crate::Nullable<serde_json::Value>>),
1971}
1972
1973pub type CreateSubnetResponse = SubnetResponse;
1974
1975#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1976pub struct VpcCreateRequestInput {
1977    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1978    #[serde(rename = "name")]
1979    pub name: String,
1980
1981    #[serde(
1982        rename = "description",
1983        default,
1984        skip_serializing_if = "Option::is_none"
1985    )]
1986    pub description: Option<String>,
1987    /// Must be private (RFC 1918): within 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16.
1988    #[serde(rename = "cidr_ipv4")]
1989    pub cidr_ipv4: String,
1990    /// Allocate a regional GUA /60. Mutually exclusive with cidr_ipv6. Existing IPv6 ranges cannot be replaced.
1991    #[serde(
1992        rename = "allocate_cidr_ipv6",
1993        default,
1994        skip_serializing_if = "Option::is_none"
1995    )]
1996    pub allocate_cidr_ipv6: Option<bool>,
1997
1998    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1999    pub tags: Option<std::collections::BTreeMap<String, String>>,
2000    /// Optional aligned locally assigned ULA (fd00::/8), /48 through /60. May be added after VPC creation.
2001    #[serde(rename = "cidr_ipv6", default, skip_serializing_if = "Option::is_none")]
2002    pub cidr_ipv6: Option<String>,
2003}
2004impl VpcCreateRequestInput {
2005    /// Set the required fields; optional fields start omitted.
2006    #[allow(clippy::too_many_arguments)]
2007    pub fn new(name: String, cidr_ipv4: String) -> Self {
2008        Self {
2009            name,
2010            description: None,
2011            cidr_ipv4,
2012            allocate_cidr_ipv6: None,
2013            tags: None,
2014            cidr_ipv6: None,
2015        }
2016    }
2017}
2018
2019pub type CreateVpcBody = VpcCreateRequestInput;
2020
2021#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2022pub struct VpcResponse {
2023    #[serde(rename = "vpc")]
2024    pub vpc: Vpc,
2025}
2026
2027#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2028pub struct Vpc {
2029    #[serde(rename = "id")]
2030    pub id: String,
2031    /// Cloud Resource Name (name-based, region+account-scoped).
2032    #[serde(rename = "crn")]
2033    pub crn: String,
2034    /// 1-63 chars, lowercase alphanumeric + hyphen Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
2035    #[serde(rename = "name")]
2036    pub name: String,
2037
2038    #[serde(
2039        rename = "description",
2040        default,
2041        skip_serializing_if = "Option::is_none"
2042    )]
2043    pub description: Option<String>,
2044    /// IPv4 CIDR block carved up by subnets. Must be private (RFC 1918): within 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16. Immutable after create.
2045    #[serde(rename = "cidr_ipv4")]
2046    pub cidr_ipv4: String,
2047    /// Associated regional GUA or private ULA prefix.
2048    #[serde(
2049        rename = "cidr_ipv6",
2050        default,
2051        skip_serializing_if = "Option::is_none",
2052        deserialize_with = "crate::response::present_nullable"
2053    )]
2054    pub cidr_ipv6: Option<crate::Nullable<String>>,
2055
2056    #[serde(rename = "tags")]
2057    pub tags: std::collections::BTreeMap<String, String>,
2058
2059    #[serde(rename = "created_at")]
2060    pub created_at: String,
2061
2062    #[serde(rename = "updated_at")]
2063    pub updated_at: String,
2064}
2065
2066pub type CreateVpcResponse = VpcResponse;
2067
2068#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2069#[serde(untagged)]
2070pub enum SubnetIPv6RequestInput {
2071    Variant1(Box<SubnetIPv6RequestInputVariant1>),
2072    Variant2(Box<SubnetIPv6RequestInputVariant2>),
2073}
2074
2075#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2076pub struct SubnetIPv6RequestInputVariant1 {
2077    /// Allocate a free /64 from the VPC IPv6 range. Can be enabled after creation. Every existing and new interface receives an IPv6 /96 and its first /128 automatically. NAT gateways hosted here also receive a public IPv6 address from the regional pool. Updating hosted gateways requires UpdateNATGateway permission and public IPv6 quota.
2078    #[serde(rename = "allocate_cidr_ipv6")]
2079    pub allocate_cidr_ipv6: bool,
2080    /// An aligned /64 inside the VPC IPv6 range. Can be added later; cannot replace an existing range. Mutually exclusive with allocate_cidr_ipv6.
2081    #[serde(rename = "cidr_ipv6", default, skip_serializing_if = "Option::is_none")]
2082    pub cidr_ipv6: Option<String>,
2083    /// When enabling IPv6, copy equivalent rules in security groups used by this subnet's interfaces. Copies 0.0.0.0/0 to ::/0 and security-group references, preserving protocol, ports and direction. Restricted IPv4 CIDRs are not widened. Existing IPv6 equivalents are not duplicated. Changes affect every interface sharing these groups. Requires CreateSecurityGroupRule permission and available rule quota. Only accepted with allocate_cidr_ipv6 or cidr_ipv6.
2084    #[serde(
2085        rename = "copy_ipv4_security_rules",
2086        default,
2087        skip_serializing_if = "Option::is_none"
2088    )]
2089    pub copy_ipv4_security_rules: Option<bool>,
2090    /// When enabling IPv6, optionally add ::/0 to the subnet's route table. match_ipv4 follows an IPv4 internet-gateway or NAT-gateway default route, using the same target. A NAT gateway must already have IPv6 enabled on its hosting subnet, or be hosted in the subnet being enabled. No IPv4 default route leaves IPv6 routing unchanged. Existing IPv6 default routes are always preserved. Egress-only gateways cannot provide ULA internet access; use a NAT gateway, or a public IPv6 floating IP with an internet-gateway route. Changes affect every subnet sharing the route table and require CreateRoute permission; creating an egress-only gateway also requires CreateEgressOnlyGateway permission. Only accepted with allocate_cidr_ipv6 or cidr_ipv6.
2091    #[serde(
2092        rename = "ipv6_routing",
2093        default,
2094        skip_serializing_if = "Option::is_none"
2095    )]
2096    pub ipv6_routing: Option<SubnetIPv6RequestInputVariant1Ipv6Routing>,
2097}
2098impl SubnetIPv6RequestInputVariant1 {
2099    /// Set the required fields; optional fields start omitted.
2100    #[allow(clippy::too_many_arguments)]
2101    pub fn new(allocate_cidr_ipv6: bool) -> Self {
2102        Self {
2103            allocate_cidr_ipv6,
2104            cidr_ipv6: None,
2105            copy_ipv4_security_rules: None,
2106            ipv6_routing: None,
2107        }
2108    }
2109}
2110
2111#[derive(Clone, Debug, PartialEq, Eq)]
2112pub enum SubnetIPv6RequestInputVariant1Ipv6Routing {
2113    MatchIpv4,
2114    Unchanged,
2115    InternetGateway,
2116    NatGateway,
2117    EgressOnlyGateway,
2118    Unknown(String),
2119}
2120impl SubnetIPv6RequestInputVariant1Ipv6Routing {
2121    pub fn as_str(&self) -> &str {
2122        match self {
2123            Self::MatchIpv4 => "match_ipv4",
2124            Self::Unchanged => "unchanged",
2125            Self::InternetGateway => "internet_gateway",
2126            Self::NatGateway => "nat_gateway",
2127            Self::EgressOnlyGateway => "egress_only_gateway",
2128            Self::Unknown(value) => value,
2129        }
2130    }
2131}
2132impl serde::Serialize for SubnetIPv6RequestInputVariant1Ipv6Routing {
2133    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2134        serializer.serialize_str(self.as_str())
2135    }
2136}
2137impl<'de> serde::Deserialize<'de> for SubnetIPv6RequestInputVariant1Ipv6Routing {
2138    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2139        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2140        Ok(match value.as_str() {
2141            "match_ipv4" => Self::MatchIpv4,
2142            "unchanged" => Self::Unchanged,
2143            "internet_gateway" => Self::InternetGateway,
2144            "nat_gateway" => Self::NatGateway,
2145            "egress_only_gateway" => Self::EgressOnlyGateway,
2146            _ => Self::Unknown(value),
2147        })
2148    }
2149}
2150
2151#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2152pub struct SubnetIPv6RequestInputVariant2 {
2153    /// Allocate a free /64 from the VPC IPv6 range. Can be enabled after creation. Every existing and new interface receives an IPv6 /96 and its first /128 automatically. NAT gateways hosted here also receive a public IPv6 address from the regional pool. Updating hosted gateways requires UpdateNATGateway permission and public IPv6 quota.
2154    #[serde(
2155        rename = "allocate_cidr_ipv6",
2156        default,
2157        skip_serializing_if = "Option::is_none"
2158    )]
2159    pub allocate_cidr_ipv6: Option<bool>,
2160    /// An aligned /64 inside the VPC IPv6 range. Can be added later; cannot replace an existing range. Mutually exclusive with allocate_cidr_ipv6.
2161    #[serde(rename = "cidr_ipv6")]
2162    pub cidr_ipv6: String,
2163    /// When enabling IPv6, copy equivalent rules in security groups used by this subnet's interfaces. Copies 0.0.0.0/0 to ::/0 and security-group references, preserving protocol, ports and direction. Restricted IPv4 CIDRs are not widened. Existing IPv6 equivalents are not duplicated. Changes affect every interface sharing these groups. Requires CreateSecurityGroupRule permission and available rule quota. Only accepted with allocate_cidr_ipv6 or cidr_ipv6.
2164    #[serde(
2165        rename = "copy_ipv4_security_rules",
2166        default,
2167        skip_serializing_if = "Option::is_none"
2168    )]
2169    pub copy_ipv4_security_rules: Option<bool>,
2170    /// When enabling IPv6, optionally add ::/0 to the subnet's route table. match_ipv4 follows an IPv4 internet-gateway or NAT-gateway default route, using the same target. A NAT gateway must already have IPv6 enabled on its hosting subnet, or be hosted in the subnet being enabled. No IPv4 default route leaves IPv6 routing unchanged. Existing IPv6 default routes are always preserved. Egress-only gateways cannot provide ULA internet access; use a NAT gateway, or a public IPv6 floating IP with an internet-gateway route. Changes affect every subnet sharing the route table and require CreateRoute permission; creating an egress-only gateway also requires CreateEgressOnlyGateway permission. Only accepted with allocate_cidr_ipv6 or cidr_ipv6.
2171    #[serde(
2172        rename = "ipv6_routing",
2173        default,
2174        skip_serializing_if = "Option::is_none"
2175    )]
2176    pub ipv6_routing: Option<SubnetIPv6RequestInputVariant2Ipv6Routing>,
2177}
2178impl SubnetIPv6RequestInputVariant2 {
2179    /// Set the required fields; optional fields start omitted.
2180    #[allow(clippy::too_many_arguments)]
2181    pub fn new(cidr_ipv6: String) -> Self {
2182        Self {
2183            allocate_cidr_ipv6: None,
2184            cidr_ipv6,
2185            copy_ipv4_security_rules: None,
2186            ipv6_routing: None,
2187        }
2188    }
2189}
2190
2191#[derive(Clone, Debug, PartialEq, Eq)]
2192pub enum SubnetIPv6RequestInputVariant2Ipv6Routing {
2193    MatchIpv4,
2194    Unchanged,
2195    InternetGateway,
2196    NatGateway,
2197    EgressOnlyGateway,
2198    Unknown(String),
2199}
2200impl SubnetIPv6RequestInputVariant2Ipv6Routing {
2201    pub fn as_str(&self) -> &str {
2202        match self {
2203            Self::MatchIpv4 => "match_ipv4",
2204            Self::Unchanged => "unchanged",
2205            Self::InternetGateway => "internet_gateway",
2206            Self::NatGateway => "nat_gateway",
2207            Self::EgressOnlyGateway => "egress_only_gateway",
2208            Self::Unknown(value) => value,
2209        }
2210    }
2211}
2212impl serde::Serialize for SubnetIPv6RequestInputVariant2Ipv6Routing {
2213    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2214        serializer.serialize_str(self.as_str())
2215    }
2216}
2217impl<'de> serde::Deserialize<'de> for SubnetIPv6RequestInputVariant2Ipv6Routing {
2218    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2219        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2220        Ok(match value.as_str() {
2221            "match_ipv4" => Self::MatchIpv4,
2222            "unchanged" => Self::Unchanged,
2223            "internet_gateway" => Self::InternetGateway,
2224            "nat_gateway" => Self::NatGateway,
2225            "egress_only_gateway" => Self::EgressOnlyGateway,
2226            _ => Self::Unknown(value),
2227        })
2228    }
2229}
2230
2231pub type EnableSubnetIPv6Body = SubnetIPv6RequestInput;
2232
2233pub type EnableSubnetIPv6Response = SubnetResponse;
2234
2235#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2236#[serde(untagged)]
2237pub enum VpcIPv6RequestInput {
2238    Variant1(Box<VpcIPv6RequestInputVariant1>),
2239    Variant2(Box<VpcIPv6RequestInputVariant2>),
2240}
2241
2242#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2243pub struct VpcIPv6RequestInputVariant1 {
2244    /// Allocate a regional GUA /60. Mutually exclusive with cidr_ipv6. Existing IPv6 ranges cannot be replaced.
2245    #[serde(rename = "allocate_cidr_ipv6")]
2246    pub allocate_cidr_ipv6: bool,
2247    /// Optional aligned locally assigned ULA (fd00::/8), /48 through /60. May be added after VPC creation.
2248    #[serde(rename = "cidr_ipv6", default, skip_serializing_if = "Option::is_none")]
2249    pub cidr_ipv6: Option<String>,
2250}
2251impl VpcIPv6RequestInputVariant1 {
2252    /// Set the required fields; optional fields start omitted.
2253    #[allow(clippy::too_many_arguments)]
2254    pub fn new(allocate_cidr_ipv6: bool) -> Self {
2255        Self {
2256            allocate_cidr_ipv6,
2257            cidr_ipv6: None,
2258        }
2259    }
2260}
2261
2262#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2263pub struct VpcIPv6RequestInputVariant2 {
2264    /// Allocate a regional GUA /60. Mutually exclusive with cidr_ipv6. Existing IPv6 ranges cannot be replaced.
2265    #[serde(
2266        rename = "allocate_cidr_ipv6",
2267        default,
2268        skip_serializing_if = "Option::is_none"
2269    )]
2270    pub allocate_cidr_ipv6: Option<bool>,
2271    /// Optional aligned locally assigned ULA (fd00::/8), /48 through /60. May be added after VPC creation.
2272    #[serde(rename = "cidr_ipv6")]
2273    pub cidr_ipv6: String,
2274}
2275impl VpcIPv6RequestInputVariant2 {
2276    /// Set the required fields; optional fields start omitted.
2277    #[allow(clippy::too_many_arguments)]
2278    pub fn new(cidr_ipv6: String) -> Self {
2279        Self {
2280            allocate_cidr_ipv6: None,
2281            cidr_ipv6,
2282        }
2283    }
2284}
2285
2286pub type EnableVPCIPv6Body = VpcIPv6RequestInput;
2287
2288pub type EnableVPCIPv6Response = VpcResponse;
2289
2290pub type GetEgressOnlyGatewayResponse = EgressOnlyGatewayResponse;
2291
2292pub type GetEgressOnlyGatewayResource = EgressOnlyGateway;
2293
2294#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2295pub struct GetEgressOnlyGatewayScope {
2296    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2297    pub limit: Option<i64>,
2298}
2299
2300pub type GetFloatingIpResponse = FloatingIpResponse;
2301
2302pub type GetFloatingIpResource = FloatingIp;
2303
2304#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2305pub struct GetFloatingIpScope {
2306    #[serde(
2307        rename = "attached_to",
2308        default,
2309        skip_serializing_if = "Option::is_none"
2310    )]
2311    pub attached_to: Option<String>,
2312
2313    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2314    pub limit: Option<i64>,
2315}
2316
2317pub type GetInterfaceResponse = InterfaceResponse;
2318
2319pub type GetInterfaceResource = Interface;
2320
2321#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2322pub struct GetInterfaceScope {
2323    #[serde(rename = "subnet", default, skip_serializing_if = "Option::is_none")]
2324    pub subnet: Option<String>,
2325
2326    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2327    pub vpc: Option<String>,
2328
2329    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2330    pub limit: Option<i64>,
2331}
2332
2333#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2334pub struct GetInterfaceAddressResult {
2335    #[serde(rename = "address", default, skip_serializing_if = "Option::is_none")]
2336    pub address: Option<InterfaceAddress>,
2337}
2338
2339pub type GetInterfaceAddressResponse = GetInterfaceAddressResult;
2340
2341pub type GetInternetGatewayResponse = InternetGatewayResponse;
2342
2343pub type GetInternetGatewayResource = InternetGateway;
2344
2345#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2346pub struct GetInternetGatewayScope {
2347    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2348    pub limit: Option<i64>,
2349}
2350
2351pub type GetNATGatewayResponse = NATGatewayResponse;
2352
2353pub type GetNATGatewayResource = NATGateway;
2354
2355#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2356pub struct GetNATGatewayScope {
2357    #[serde(rename = "subnet", default, skip_serializing_if = "Option::is_none")]
2358    pub subnet: Option<String>,
2359
2360    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2361    pub vpc: Option<String>,
2362
2363    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2364    pub limit: Option<i64>,
2365}
2366
2367pub type GetRouteResponse = RouteResponse;
2368
2369pub type GetRouteResource = Route;
2370
2371#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2372pub struct GetRouteScope {
2373    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2374    pub limit: Option<i64>,
2375}
2376
2377pub type GetRouteTableResponse = RouteTableResponse;
2378
2379pub type GetRouteTableResource = RouteTable;
2380
2381#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2382pub struct GetRouteTableScope {
2383    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2384    pub vpc: Option<String>,
2385
2386    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2387    pub limit: Option<i64>,
2388}
2389
2390pub type GetSecurityGroupResponse = SecurityGroupResponse;
2391
2392pub type GetSecurityGroupResource = SecurityGroup;
2393
2394#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2395pub struct GetSecurityGroupScope {
2396    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2397    pub limit: Option<i64>,
2398}
2399
2400pub type GetSecurityGroupRuleResponse = SecurityGroupRuleResponse;
2401
2402pub type GetSecurityGroupRuleResource = SecurityGroupRule;
2403
2404#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2405pub struct GetSecurityGroupRuleScope {
2406    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2407    pub limit: Option<i64>,
2408}
2409
2410pub type GetSubnetResponse = SubnetResponse;
2411
2412pub type GetSubnetResource = Subnet;
2413
2414#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2415pub struct GetSubnetScope {
2416    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2417    pub vpc: Option<String>,
2418
2419    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2420    pub limit: Option<i64>,
2421}
2422
2423pub type GetVpcResponse = VpcResponse;
2424
2425pub type GetVpcResource = Vpc;
2426
2427#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2428pub struct GetVpcScope {
2429    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2430    pub limit: Option<i64>,
2431}
2432
2433#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2434pub struct ListEgressOnlyGatewayRoutesParameters {
2435    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2436    pub name: Option<String>,
2437
2438    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2439    pub crn: Option<String>,
2440
2441    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2442    pub limit: Option<i64>,
2443
2444    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2445    pub marker: Option<String>,
2446}
2447
2448pub type ListEgressOnlyGatewayRoutesQuery = ListEgressOnlyGatewayRoutesParameters;
2449
2450#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2451pub struct GatewayRouteListResponse {
2452    #[serde(rename = "routes")]
2453    pub routes: Vec<GatewayRoute>,
2454
2455    #[serde(rename = "meta")]
2456    pub meta: PaginationMeta,
2457}
2458
2459#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2460pub struct GatewayRoute {
2461    #[serde(rename = "id")]
2462    pub id: String,
2463
2464    #[serde(rename = "crn")]
2465    pub crn: String,
2466
2467    #[serde(
2468        rename = "description",
2469        default,
2470        skip_serializing_if = "Option::is_none"
2471    )]
2472    pub description: Option<String>,
2473
2474    #[serde(rename = "destination_cidr")]
2475    pub destination_cidr: String,
2476
2477    #[serde(rename = "target_type")]
2478    pub target_type: RouteTargetType,
2479    /// Set when target_type=ip. Mutex with the target_* fields. Must be a unicast address inside this VPC's CIDR (same IP family as destination_cidr); internet egress uses target_internet_gateway / target_nat_gateway.
2480    #[serde(
2481        rename = "next_hop_ip",
2482        default,
2483        skip_serializing_if = "Option::is_none",
2484        deserialize_with = "crate::response::present_nullable"
2485    )]
2486    pub next_hop_ip: Option<crate::Nullable<String>>,
2487    /// Set when target_type=internet_gateway.
2488    #[serde(
2489        rename = "target_internet_gateway",
2490        default,
2491        skip_serializing_if = "Option::is_none"
2492    )]
2493    pub target_internet_gateway: Option<ResourceRef>,
2494    /// Set when target_type=nat_gateway. Supports IPv4 and IPv6; IPv6 requires an IPv6-enabled hosting subnet.
2495    #[serde(
2496        rename = "target_nat_gateway",
2497        default,
2498        skip_serializing_if = "Option::is_none"
2499    )]
2500    pub target_nat_gateway: Option<ResourceRef>,
2501    /// Set when target_type=egress_only_gateway (IPv6 only). Gives the subnet outbound IPv6 and replies only.
2502    #[serde(
2503        rename = "target_egress_only_gateway",
2504        default,
2505        skip_serializing_if = "Option::is_none"
2506    )]
2507    pub target_egress_only_gateway: Option<ResourceRef>,
2508
2509    #[serde(rename = "tags")]
2510    pub tags: std::collections::BTreeMap<String, String>,
2511
2512    #[serde(rename = "created_at")]
2513    pub created_at: String,
2514
2515    #[serde(rename = "updated_at")]
2516    pub updated_at: String,
2517
2518    #[serde(rename = "route_table")]
2519    pub route_table: ResourceRef,
2520}
2521
2522#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2523pub struct PaginationMeta {
2524    /// Total number of items
2525    #[serde(rename = "total", default, skip_serializing_if = "Option::is_none")]
2526    pub total: Option<i64>,
2527    /// Number of items per page
2528    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2529    pub limit: Option<i64>,
2530    /// Opaque cursor for the next page. Pass it back as the `marker` query parameter; treat it as a token, not a value to parse.
2531    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2532    pub marker: Option<String>,
2533    /// Whether there are more items
2534    #[serde(rename = "has_more", default, skip_serializing_if = "Option::is_none")]
2535    pub has_more: Option<bool>,
2536}
2537
2538pub type ListEgressOnlyGatewayRoutesResponse = GatewayRouteListResponse;
2539
2540pub type ListEgressOnlyGatewayRoutesItem = GatewayRoute;
2541
2542#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2543pub struct ListEgressOnlyGatewaysParameters {
2544    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2545    pub name: Option<String>,
2546
2547    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2548    pub crn: Option<String>,
2549
2550    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2551    pub limit: Option<i64>,
2552
2553    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2554    pub marker: Option<String>,
2555}
2556
2557pub type ListEgressOnlyGatewaysQuery = ListEgressOnlyGatewaysParameters;
2558
2559#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2560pub struct EgressOnlyGatewayListResponse {
2561    #[serde(rename = "egress_only_gateways")]
2562    pub egress_only_gateways: Vec<EgressOnlyGateway>,
2563
2564    #[serde(rename = "meta")]
2565    pub meta: PaginationMeta,
2566}
2567
2568pub type ListEgressOnlyGatewaysResponse = EgressOnlyGatewayListResponse;
2569
2570pub type ListEgressOnlyGatewaysItem = EgressOnlyGateway;
2571
2572#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2573pub struct ListFloatingIpInterfacesParameters {
2574    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2575    pub limit: Option<i64>,
2576
2577    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2578    pub marker: Option<String>,
2579
2580    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2581    pub crn: Option<String>,
2582
2583    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2584    pub name: Option<String>,
2585}
2586
2587pub type ListFloatingIpInterfacesQuery = ListFloatingIpInterfacesParameters;
2588
2589#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2590pub struct FloatingIpInterfaceListResponse {
2591    #[serde(rename = "interfaces")]
2592    pub interfaces: Vec<FloatingIpInterface>,
2593
2594    #[serde(rename = "meta")]
2595    pub meta: PaginationMeta,
2596}
2597
2598pub type ListFloatingIpInterfacesResponse = FloatingIpInterfaceListResponse;
2599
2600pub type ListFloatingIpInterfacesItem = FloatingIpInterface;
2601
2602#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2603pub struct ListFloatingIpsParameters {
2604    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2605    pub name: Option<String>,
2606
2607    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2608    pub crn: Option<String>,
2609
2610    #[serde(
2611        rename = "attached_to",
2612        default,
2613        skip_serializing_if = "Option::is_none"
2614    )]
2615    pub attached_to: Option<String>,
2616
2617    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2618    pub limit: Option<i64>,
2619
2620    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2621    pub marker: Option<String>,
2622}
2623
2624pub type ListFloatingIpsQuery = ListFloatingIpsParameters;
2625
2626#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2627pub struct FloatingIpListResponse {
2628    #[serde(rename = "floating_ips")]
2629    pub floating_ips: Vec<FloatingIp>,
2630
2631    #[serde(rename = "meta")]
2632    pub meta: PaginationMeta,
2633}
2634
2635pub type ListFloatingIpsResponse = FloatingIpListResponse;
2636
2637pub type ListFloatingIpsItem = FloatingIp;
2638
2639#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2640pub struct ListInterfaceAddressesResult {
2641    #[serde(rename = "addresses", default, skip_serializing_if = "Option::is_none")]
2642    pub addresses: Option<Vec<InterfaceAddress>>,
2643}
2644
2645pub type ListInterfaceAddressesResponse = ListInterfaceAddressesResult;
2646
2647pub type ListInterfaceAddressesItem = InterfaceAddress;
2648
2649#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2650pub struct ListInterfacePrefixesResult {
2651    #[serde(rename = "prefixes")]
2652    pub prefixes: Vec<RoutedPrefix>,
2653
2654    #[serde(rename = "meta")]
2655    pub meta: PaginationMeta,
2656}
2657
2658pub type ListInterfacePrefixesResponse = ListInterfacePrefixesResult;
2659
2660pub type ListInterfacePrefixesItem = RoutedPrefix;
2661
2662#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2663pub struct ListInterfaceSecurityGroupsParameters {
2664    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2665    pub name: Option<String>,
2666
2667    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2668    pub crn: Option<String>,
2669
2670    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2671    pub marker: Option<String>,
2672
2673    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2674    pub limit: Option<i64>,
2675}
2676
2677pub type ListInterfaceSecurityGroupsQuery = ListInterfaceSecurityGroupsParameters;
2678
2679#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2680pub struct SecurityGroupListResponse {
2681    #[serde(rename = "security_groups")]
2682    pub security_groups: Vec<SecurityGroup>,
2683
2684    #[serde(rename = "meta")]
2685    pub meta: PaginationMeta,
2686}
2687
2688pub type ListInterfaceSecurityGroupsResponse = SecurityGroupListResponse;
2689
2690pub type ListInterfaceSecurityGroupsItem = SecurityGroup;
2691
2692#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2693pub struct ListInterfacesParameters {
2694    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2695    pub name: Option<String>,
2696
2697    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2698    pub crn: Option<String>,
2699
2700    #[serde(rename = "subnet", default, skip_serializing_if = "Option::is_none")]
2701    pub subnet: Option<String>,
2702
2703    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2704    pub vpc: Option<String>,
2705
2706    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2707    pub limit: Option<i64>,
2708
2709    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2710    pub marker: Option<String>,
2711}
2712
2713pub type ListInterfacesQuery = ListInterfacesParameters;
2714
2715#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2716pub struct InterfaceListResponse {
2717    #[serde(rename = "interfaces")]
2718    pub interfaces: Vec<Interface>,
2719
2720    #[serde(rename = "meta")]
2721    pub meta: PaginationMeta,
2722}
2723
2724pub type ListInterfacesResponse = InterfaceListResponse;
2725
2726pub type ListInterfacesItem = Interface;
2727
2728#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2729pub struct ListInternetGatewayRoutesParameters {
2730    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2731    pub name: Option<String>,
2732
2733    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2734    pub crn: Option<String>,
2735
2736    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2737    pub limit: Option<i64>,
2738
2739    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2740    pub marker: Option<String>,
2741}
2742
2743pub type ListInternetGatewayRoutesQuery = ListInternetGatewayRoutesParameters;
2744
2745pub type ListInternetGatewayRoutesResponse = GatewayRouteListResponse;
2746
2747pub type ListInternetGatewayRoutesItem = GatewayRoute;
2748
2749#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2750pub struct ListInternetGatewaysParameters {
2751    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2752    pub name: Option<String>,
2753
2754    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2755    pub crn: Option<String>,
2756
2757    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2758    pub limit: Option<i64>,
2759
2760    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2761    pub marker: Option<String>,
2762}
2763
2764pub type ListInternetGatewaysQuery = ListInternetGatewaysParameters;
2765
2766#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2767pub struct InternetGatewayListResponse {
2768    #[serde(rename = "internet_gateways")]
2769    pub internet_gateways: Vec<InternetGateway>,
2770
2771    #[serde(rename = "meta")]
2772    pub meta: PaginationMeta,
2773}
2774
2775pub type ListInternetGatewaysResponse = InternetGatewayListResponse;
2776
2777pub type ListInternetGatewaysItem = InternetGateway;
2778
2779#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2780pub struct ListNATGatewayRoutesParameters {
2781    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2782    pub name: Option<String>,
2783
2784    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2785    pub crn: Option<String>,
2786
2787    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2788    pub limit: Option<i64>,
2789
2790    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2791    pub marker: Option<String>,
2792}
2793
2794pub type ListNATGatewayRoutesQuery = ListNATGatewayRoutesParameters;
2795
2796pub type ListNATGatewayRoutesResponse = GatewayRouteListResponse;
2797
2798pub type ListNATGatewayRoutesItem = GatewayRoute;
2799
2800#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2801pub struct ListNATGatewaysParameters {
2802    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2803    pub name: Option<String>,
2804
2805    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2806    pub crn: Option<String>,
2807
2808    #[serde(rename = "subnet", default, skip_serializing_if = "Option::is_none")]
2809    pub subnet: Option<String>,
2810
2811    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2812    pub vpc: Option<String>,
2813
2814    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2815    pub limit: Option<i64>,
2816
2817    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2818    pub marker: Option<String>,
2819}
2820
2821pub type ListNATGatewaysQuery = ListNATGatewaysParameters;
2822
2823#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2824pub struct NATGatewayListResponse {
2825    #[serde(rename = "nat_gateways")]
2826    pub nat_gateways: Vec<NATGateway>,
2827
2828    #[serde(rename = "meta")]
2829    pub meta: PaginationMeta,
2830}
2831
2832pub type ListNATGatewaysResponse = NATGatewayListResponse;
2833
2834pub type ListNATGatewaysItem = NATGateway;
2835
2836#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2837pub struct ListPrefixPoolsResult {
2838    #[serde(rename = "prefix_pools")]
2839    pub prefix_pools: Vec<PrefixPool>,
2840
2841    #[serde(rename = "meta")]
2842    pub meta: PaginationMeta,
2843}
2844
2845pub type ListPrefixPoolsResponse = ListPrefixPoolsResult;
2846
2847pub type ListPrefixPoolsItem = PrefixPool;
2848
2849#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2850pub struct ListRouteTablesParameters {
2851    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2852    pub name: Option<String>,
2853
2854    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2855    pub crn: Option<String>,
2856
2857    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2858    pub vpc: Option<String>,
2859
2860    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2861    pub limit: Option<i64>,
2862
2863    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2864    pub marker: Option<String>,
2865}
2866
2867pub type ListRouteTablesQuery = ListRouteTablesParameters;
2868
2869#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2870pub struct RouteTableListResponse {
2871    #[serde(rename = "route_tables")]
2872    pub route_tables: Vec<RouteTable>,
2873
2874    #[serde(rename = "meta")]
2875    pub meta: PaginationMeta,
2876}
2877
2878pub type ListRouteTablesResponse = RouteTableListResponse;
2879
2880pub type ListRouteTablesItem = RouteTable;
2881
2882#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2883pub struct ListRoutesParameters {
2884    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2885    pub name: Option<String>,
2886
2887    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2888    pub crn: Option<String>,
2889
2890    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2891    pub limit: Option<i64>,
2892
2893    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2894    pub marker: Option<String>,
2895}
2896
2897pub type ListRoutesQuery = ListRoutesParameters;
2898
2899#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2900pub struct RouteListResponse {
2901    #[serde(rename = "routes")]
2902    pub routes: Vec<Route>,
2903
2904    #[serde(rename = "meta")]
2905    pub meta: PaginationMeta,
2906}
2907
2908pub type ListRoutesResponse = RouteListResponse;
2909
2910pub type ListRoutesItem = Route;
2911
2912#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2913pub struct ListSecurityGroupRulesParameters {
2914    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2915    pub name: Option<String>,
2916
2917    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2918    pub crn: Option<String>,
2919
2920    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2921    pub limit: Option<i64>,
2922
2923    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2924    pub marker: Option<String>,
2925}
2926
2927pub type ListSecurityGroupRulesQuery = ListSecurityGroupRulesParameters;
2928
2929#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2930pub struct SecurityGroupRuleListResponse {
2931    #[serde(rename = "rules")]
2932    pub rules: Vec<SecurityGroupRule>,
2933
2934    #[serde(rename = "meta")]
2935    pub meta: PaginationMeta,
2936}
2937
2938pub type ListSecurityGroupRulesResponse = SecurityGroupRuleListResponse;
2939
2940pub type ListSecurityGroupRulesItem = SecurityGroupRule;
2941
2942#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2943pub struct ListSecurityGroupsParameters {
2944    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2945    pub name: Option<String>,
2946
2947    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2948    pub crn: Option<String>,
2949
2950    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2951    pub limit: Option<i64>,
2952
2953    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2954    pub marker: Option<String>,
2955}
2956
2957pub type ListSecurityGroupsQuery = ListSecurityGroupsParameters;
2958
2959pub type ListSecurityGroupsResponse = SecurityGroupListResponse;
2960
2961pub type ListSecurityGroupsItem = SecurityGroup;
2962
2963#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2964pub struct ListSubnetsParameters {
2965    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2966    pub name: Option<String>,
2967
2968    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2969    pub crn: Option<String>,
2970
2971    #[serde(rename = "vpc", default, skip_serializing_if = "Option::is_none")]
2972    pub vpc: Option<String>,
2973
2974    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2975    pub limit: Option<i64>,
2976
2977    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2978    pub marker: Option<String>,
2979}
2980
2981pub type ListSubnetsQuery = ListSubnetsParameters;
2982
2983#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2984pub struct SubnetListResponse {
2985    #[serde(rename = "subnets")]
2986    pub subnets: Vec<Subnet>,
2987
2988    #[serde(rename = "meta")]
2989    pub meta: PaginationMeta,
2990}
2991
2992pub type ListSubnetsResponse = SubnetListResponse;
2993
2994pub type ListSubnetsItem = Subnet;
2995
2996#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2997pub struct ListVpcsParameters {
2998    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2999    pub name: Option<String>,
3000
3001    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
3002    pub crn: Option<String>,
3003
3004    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
3005    pub limit: Option<i64>,
3006
3007    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
3008    pub marker: Option<String>,
3009}
3010
3011pub type ListVpcsQuery = ListVpcsParameters;
3012
3013#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
3014pub struct VpcListResponse {
3015    #[serde(rename = "vpcs")]
3016    pub vpcs: Vec<Vpc>,
3017
3018    #[serde(rename = "meta")]
3019    pub meta: PaginationMeta,
3020}
3021
3022pub type ListVpcsResponse = VpcListResponse;
3023
3024pub type ListVpcsItem = Vpc;
3025
3026#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3027pub struct EgressOnlyGatewayUpdateRequestInput {
3028    #[serde(
3029        rename = "description",
3030        default,
3031        skip_serializing_if = "Option::is_none",
3032        deserialize_with = "crate::response::present_nullable"
3033    )]
3034    pub description: Option<crate::Nullable<String>>,
3035
3036    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3037    pub tags: Option<std::collections::BTreeMap<String, String>>,
3038}
3039
3040pub type UpdateEgressOnlyGatewayBody = EgressOnlyGatewayUpdateRequestInput;
3041
3042pub type UpdateEgressOnlyGatewayResponse = EgressOnlyGatewayResponse;
3043
3044#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3045pub struct FloatingIpUpdateRequestInput {
3046    #[serde(
3047        rename = "description",
3048        default,
3049        skip_serializing_if = "Option::is_none",
3050        deserialize_with = "crate::response::present_nullable"
3051    )]
3052    pub description: Option<crate::Nullable<String>>,
3053
3054    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3055    pub tags: Option<std::collections::BTreeMap<String, String>>,
3056    /// Set (an object) or clear (null) the address's readiness check. Omit the field to leave it unchanged.
3057    #[serde(
3058        rename = "health_check",
3059        default,
3060        skip_serializing_if = "Option::is_none"
3061    )]
3062    pub health_check: Option<FloatingIpUpdateRequestInputHealthCheck>,
3063}
3064
3065#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
3066#[serde(untagged)]
3067pub enum FloatingIpUpdateRequestInputHealthCheck {
3068    Variant1(Box<FloatingIpHealthCheckInput>),
3069    Variant2(Box<crate::Nullable<serde_json::Value>>),
3070}
3071
3072pub type UpdateFloatingIpBody = FloatingIpUpdateRequestInput;
3073
3074pub type UpdateFloatingIpResponse = FloatingIpResponse;
3075
3076#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3077pub struct InterfaceUpdateRequestInput {
3078    #[serde(
3079        rename = "description",
3080        default,
3081        skip_serializing_if = "Option::is_none",
3082        deserialize_with = "crate::response::present_nullable"
3083    )]
3084    pub description: Option<crate::Nullable<String>>,
3085
3086    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3087    pub tags: Option<std::collections::BTreeMap<String, String>>,
3088}
3089
3090pub type UpdateInterfaceBody = InterfaceUpdateRequestInput;
3091
3092pub type UpdateInterfaceResponse = InterfaceResponse;
3093
3094#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3095pub struct InternetGatewayUpdateRequestInput {
3096    #[serde(
3097        rename = "description",
3098        default,
3099        skip_serializing_if = "Option::is_none",
3100        deserialize_with = "crate::response::present_nullable"
3101    )]
3102    pub description: Option<crate::Nullable<String>>,
3103
3104    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3105    pub tags: Option<std::collections::BTreeMap<String, String>>,
3106}
3107
3108pub type UpdateInternetGatewayBody = InternetGatewayUpdateRequestInput;
3109
3110pub type UpdateInternetGatewayResponse = InternetGatewayResponse;
3111
3112#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3113pub struct NATGatewayUpdateRequestInput {
3114    #[serde(
3115        rename = "description",
3116        default,
3117        skip_serializing_if = "Option::is_none",
3118        deserialize_with = "crate::response::present_nullable"
3119    )]
3120    pub description: Option<crate::Nullable<String>>,
3121
3122    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3123    pub tags: Option<std::collections::BTreeMap<String, String>>,
3124}
3125
3126pub type UpdateNATGatewayBody = NATGatewayUpdateRequestInput;
3127
3128pub type UpdateNATGatewayResponse = NATGatewayResponse;
3129
3130#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3131pub struct RouteUpdateRequestInput {
3132    #[serde(
3133        rename = "description",
3134        default,
3135        skip_serializing_if = "Option::is_none",
3136        deserialize_with = "crate::response::present_nullable"
3137    )]
3138    pub description: Option<crate::Nullable<String>>,
3139
3140    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3141    pub tags: Option<std::collections::BTreeMap<String, String>>,
3142}
3143
3144pub type UpdateRouteBody = RouteUpdateRequestInput;
3145
3146pub type UpdateRouteResponse = RouteResponse;
3147
3148#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3149pub struct RouteTableUpdateRequestInput {
3150    #[serde(
3151        rename = "description",
3152        default,
3153        skip_serializing_if = "Option::is_none",
3154        deserialize_with = "crate::response::present_nullable"
3155    )]
3156    pub description: Option<crate::Nullable<String>>,
3157
3158    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3159    pub tags: Option<std::collections::BTreeMap<String, String>>,
3160}
3161
3162pub type UpdateRouteTableBody = RouteTableUpdateRequestInput;
3163
3164pub type UpdateRouteTableResponse = RouteTableResponse;
3165
3166#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3167pub struct SecurityGroupUpdateRequestInput {
3168    #[serde(
3169        rename = "description",
3170        default,
3171        skip_serializing_if = "Option::is_none",
3172        deserialize_with = "crate::response::present_nullable"
3173    )]
3174    pub description: Option<crate::Nullable<String>>,
3175
3176    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3177    pub tags: Option<std::collections::BTreeMap<String, String>>,
3178}
3179
3180pub type UpdateSecurityGroupBody = SecurityGroupUpdateRequestInput;
3181
3182pub type UpdateSecurityGroupResponse = SecurityGroupResponse;
3183
3184#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3185pub struct SubnetUpdateRequestInput {
3186    #[serde(
3187        rename = "description",
3188        default,
3189        skip_serializing_if = "Option::is_none",
3190        deserialize_with = "crate::response::present_nullable"
3191    )]
3192    pub description: Option<crate::Nullable<String>>,
3193    /// Route-table UUID, nested CRN or exact name within the subnet VPC. On PATCH the owned path subnet supplies the VPC. Omission on create selects the default table; an empty reference is invalid.
3194    #[serde(
3195        rename = "route_table",
3196        default,
3197        skip_serializing_if = "Option::is_none"
3198    )]
3199    pub route_table: Option<String>,
3200
3201    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3202    pub tags: Option<std::collections::BTreeMap<String, String>>,
3203}
3204
3205pub type UpdateSubnetBody = SubnetUpdateRequestInput;
3206
3207pub type UpdateSubnetResponse = SubnetResponse;
3208
3209#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
3210pub struct VpcUpdateRequestInput {
3211    #[serde(
3212        rename = "description",
3213        default,
3214        skip_serializing_if = "Option::is_none",
3215        deserialize_with = "crate::response::present_nullable"
3216    )]
3217    pub description: Option<crate::Nullable<String>>,
3218
3219    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
3220    pub tags: Option<std::collections::BTreeMap<String, String>>,
3221}
3222
3223pub type UpdateVpcBody = VpcUpdateRequestInput;
3224
3225pub type UpdateVpcResponse = VpcResponse;