cloudcover_core/
sdk_method_mapping.rs1use serde::{Deserialize, Serialize};
2
3use crate::{ApiMethod, MethodReference, Sdk};
4
5#[derive(Clone, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
6pub struct SdkMethodMapping {
7 sdk: Sdk,
8 method: MethodReference,
9 api_methods: Vec<ApiMethod>,
10}
11
12impl SdkMethodMapping {
13 #[must_use]
14 pub fn new(sdk: Sdk, method: MethodReference, api_methods: Vec<ApiMethod>) -> Self {
15 Self {
16 sdk,
17 method,
18 api_methods,
19 }
20 }
21
22 #[must_use]
23 pub fn sdk(&self) -> &Sdk {
24 &self.sdk
25 }
26
27 #[must_use]
28 pub fn method(&self) -> &MethodReference {
29 &self.method
30 }
31
32 #[must_use]
33 pub fn api_methods(&self) -> &[ApiMethod] {
34 &self.api_methods
35 }
36}