1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[allow(unused_imports)]
use super::*;
/// A metric emitted by managed instance resource.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ManagedInstanceAnalyticSummary {
/// The name of this metric.
pub name: MetricName,
/// Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. <p> Example: {@code \"managedInstanceId\": \"ocid1.managementagent.123\"}
pub dimensions: HashMap<String, String>,
/// The value of this metric. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
pub count: i64,
}
/// Required fields for ManagedInstanceAnalyticSummary
pub struct ManagedInstanceAnalyticSummaryRequired {
/// The name of this metric.
pub name: MetricName,
/// Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. <p> Example: {@code \"managedInstanceId\": \"ocid1.managementagent.123\"}
pub dimensions: HashMap<String, String>,
/// The value of this metric. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
pub count: i64,
}
impl ManagedInstanceAnalyticSummary {
/// Create a new ManagedInstanceAnalyticSummary with required fields
pub fn new(required: ManagedInstanceAnalyticSummaryRequired) -> Self {
Self {
name: required.name,
dimensions: required.dimensions,
count: required.count,
}
}
/// Set name
pub fn set_name(mut self, value: MetricName) -> Self {
self.name = value;
self
}
/// Set dimensions
pub fn set_dimensions(mut self, value: HashMap<String, String>) -> Self {
self.dimensions = value;
self
}
/// Set count
pub fn set_count(mut self, value: i64) -> Self {
self.count = value;
self
}
}