Skip to main content

oci_rust_sdk/core/responses/
create_subnet_response.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 CreateSubnetResponse {
11    /// For optimistic concurrency control. See {@code if-match}.
12    pub etag: String,
13
14    /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
15    pub opc_request_id: String,
16
17    /// The returned model.Subnet instance.
18    pub subnet: Subnet,
19}
20
21/// Required fields for CreateSubnetResponse
22pub struct CreateSubnetResponseRequired {
23    /// For optimistic concurrency control. See {@code if-match}.
24    pub etag: String,
25
26    /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
27    pub opc_request_id: String,
28
29    /// The returned model.Subnet instance.
30    pub subnet: Subnet,
31}
32
33impl CreateSubnetResponse {
34    /// Create a new CreateSubnetResponse with required fields
35    pub fn new(required: CreateSubnetResponseRequired) -> Self {
36        Self {
37            etag: required.etag,
38
39            opc_request_id: required.opc_request_id,
40
41            subnet: required.subnet,
42        }
43    }
44
45    /// Set etag
46    pub fn set_etag(mut self, value: String) -> Self {
47        self.etag = value;
48        self
49    }
50
51    /// Set opc_request_id
52    pub fn set_opc_request_id(mut self, value: String) -> Self {
53        self.opc_request_id = value;
54        self
55    }
56
57    /// Set subnet
58    pub fn set_subnet(mut self, value: Subnet) -> Self {
59        self.subnet = value;
60        self
61    }
62}