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
//! Generated by: <https://openapi-generator.tech>
//!
//! Version of specification: `2.0.0`
use serde::{Deserialize, Serialize};
/// Agent details.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Agent {
/// Account ID that is tied to this agent. Only included on your own agent.
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
/// Symbol of the agent.
#[serde(rename = "symbol")]
pub symbol: String,
/// The headquarters of the agent.
#[serde(rename = "headquarters")]
pub headquarters: String,
/// The number of credits the agent has available. Credits can be negative if funds have been overdrawn.
#[serde(rename = "credits")]
pub credits: i64,
/// The faction the agent started with.
#[serde(rename = "startingFaction")]
pub starting_faction: String,
/// How many ships are owned by the agent.
#[serde(rename = "shipCount", skip_serializing_if = "Option::is_none")]
pub ship_count: Option<i32>,
}
impl Agent {
/// Create value with optional fields set to `None`.
#[allow(clippy::too_many_arguments)]
pub fn new(
symbol: String,
headquarters: String,
credits: i64,
starting_faction: String,
) -> Agent {
Agent {
account_id: None,
symbol,
headquarters,
credits,
starting_faction,
ship_count: None,
}
}
}