oci_rust_sdk/core/responses/update_instance_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 UpdateInstanceResponse {
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 [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) with this ID to track the status of the request.
18 pub opc_work_request_id: String,
19
20 /// The returned model.Instance instance.
21 pub instance: Instance,
22}
23
24/// Required fields for UpdateInstanceResponse
25pub struct UpdateInstanceResponseRequired {
26 /// For optimistic concurrency control. See {@code if-match}.
27 pub etag: String,
28
29 /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
30 pub opc_request_id: String,
31
32 /// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. Use [GetWorkRequest](https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) with this ID to track the status of the request.
33 pub opc_work_request_id: String,
34
35 /// The returned model.Instance instance.
36 pub instance: Instance,
37}
38
39impl UpdateInstanceResponse {
40 /// Create a new UpdateInstanceResponse with required fields
41 pub fn new(required: UpdateInstanceResponseRequired) -> Self {
42 Self {
43 etag: required.etag,
44
45 opc_request_id: required.opc_request_id,
46
47 opc_work_request_id: required.opc_work_request_id,
48
49 instance: required.instance,
50 }
51 }
52
53 /// Set etag
54 pub fn set_etag(mut self, value: String) -> Self {
55 self.etag = value;
56 self
57 }
58
59 /// Set opc_request_id
60 pub fn set_opc_request_id(mut self, value: String) -> Self {
61 self.opc_request_id = value;
62 self
63 }
64
65 /// Set opc_work_request_id
66 pub fn set_opc_work_request_id(mut self, value: String) -> Self {
67 self.opc_work_request_id = value;
68 self
69 }
70
71 /// Set instance
72 pub fn set_instance(mut self, value: Instance) -> Self {
73 self.instance = value;
74 self
75 }
76}