Skip to main content

oci_rust_sdk/core/requests/
get_subnet_request.rs

1use serde::{Deserialize, Serialize};
2
3#[allow(unused_imports)]
4use super::super::models::*;
5#[allow(unused_imports)]
6use super::*;
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10pub struct GetSubnetRequest {
11    /// Specify the [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet.
12    pub subnet_id: String,
13}
14
15/// Required fields for GetSubnetRequest
16pub struct GetSubnetRequestRequired {
17    /// Specify the [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet.
18    pub subnet_id: String,
19}
20
21impl GetSubnetRequest {
22    /// Create a new GetSubnetRequest with required fields
23    pub fn new(required: GetSubnetRequestRequired) -> Self {
24        Self {
25            subnet_id: required.subnet_id,
26        }
27    }
28
29    /// Set subnet_id
30    pub fn set_subnet_id(mut self, value: String) -> Self {
31        self.subnet_id = value;
32        self
33    }
34}