spacetraders_client/generated/codegen.rs
1// AUTO-GENERATED by `cargo run --example regenerate` — do not edit.
2// Source: src/generated/codegen.rs
3#[allow(unused_imports)]
4pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
5#[allow(unused_imports)]
6use progenitor_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt};
7/// Types used as operation parameters and responses.
8#[allow(clippy::all)]
9pub mod types {
10 /// Error types.
11 pub mod error {
12 /// Error from a `TryFrom` or `FromStr` implementation.
13 pub struct ConversionError(::std::borrow::Cow<'static, str>);
14 impl ::std::error::Error for ConversionError {}
15 impl ::std::fmt::Display for ConversionError {
16 fn fmt(
17 &self,
18 f: &mut ::std::fmt::Formatter<'_>,
19 ) -> Result<(), ::std::fmt::Error> {
20 ::std::fmt::Display::fmt(&self.0, f)
21 }
22 }
23 impl ::std::fmt::Debug for ConversionError {
24 fn fmt(
25 &self,
26 f: &mut ::std::fmt::Formatter<'_>,
27 ) -> Result<(), ::std::fmt::Error> {
28 ::std::fmt::Debug::fmt(&self.0, f)
29 }
30 }
31 impl From<&'static str> for ConversionError {
32 fn from(value: &'static str) -> Self {
33 Self(value.into())
34 }
35 }
36 impl From<String> for ConversionError {
37 fn from(value: String) -> Self {
38 Self(value.into())
39 }
40 }
41 }
42 ///Successfully accepted contract.
43 ///
44 /// <details><summary>JSON schema</summary>
45 ///
46 /// ```json
47 ///{
48 /// "description": "Successfully accepted contract.",
49 /// "type": "object",
50 /// "required": [
51 /// "data"
52 /// ],
53 /// "properties": {
54 /// "data": {
55 /// "type": "object",
56 /// "required": [
57 /// "agent",
58 /// "contract"
59 /// ],
60 /// "properties": {
61 /// "agent": {
62 /// "$ref": "#/components/schemas/Agent"
63 /// },
64 /// "contract": {
65 /// "$ref": "#/components/schemas/Contract"
66 /// }
67 /// }
68 /// }
69 /// }
70 ///}
71 /// ```
72 /// </details>
73 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
74 pub struct AcceptContractResponse {
75 pub data: AcceptContractResponseData,
76 }
77 ///`AcceptContractResponseData`
78 ///
79 /// <details><summary>JSON schema</summary>
80 ///
81 /// ```json
82 ///{
83 /// "type": "object",
84 /// "required": [
85 /// "agent",
86 /// "contract"
87 /// ],
88 /// "properties": {
89 /// "agent": {
90 /// "$ref": "#/components/schemas/Agent"
91 /// },
92 /// "contract": {
93 /// "$ref": "#/components/schemas/Contract"
94 /// }
95 /// }
96 ///}
97 /// ```
98 /// </details>
99 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
100 pub struct AcceptContractResponseData {
101 pub agent: Agent,
102 pub contract: Contract,
103 }
104 ///The activity level of a trade good. If the good is an import, this represents how strong consumption is. If the good is an export, this represents how strong the production is for the good. When activity is strong, consumption or production is near maximum capacity. When activity is weak, consumption or production is near minimum capacity.
105 ///
106 /// <details><summary>JSON schema</summary>
107 ///
108 /// ```json
109 ///{
110 /// "description": "The activity level of a trade good. If the good is an import, this represents how strong consumption is. If the good is an export, this represents how strong the production is for the good. When activity is strong, consumption or production is near maximum capacity. When activity is weak, consumption or production is near minimum capacity.",
111 /// "type": "string",
112 /// "enum": [
113 /// "WEAK",
114 /// "GROWING",
115 /// "STRONG",
116 /// "RESTRICTED"
117 /// ]
118 ///}
119 /// ```
120 /// </details>
121 #[derive(
122 ::serde::Deserialize,
123 ::serde::Serialize,
124 Clone,
125 Copy,
126 Debug,
127 Eq,
128 Hash,
129 Ord,
130 PartialEq,
131 PartialOrd
132 )]
133 pub enum ActivityLevel {
134 #[serde(rename = "WEAK")]
135 Weak,
136 #[serde(rename = "GROWING")]
137 Growing,
138 #[serde(rename = "STRONG")]
139 Strong,
140 #[serde(rename = "RESTRICTED")]
141 Restricted,
142 }
143 impl ::std::fmt::Display for ActivityLevel {
144 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
145 match *self {
146 Self::Weak => f.write_str("WEAK"),
147 Self::Growing => f.write_str("GROWING"),
148 Self::Strong => f.write_str("STRONG"),
149 Self::Restricted => f.write_str("RESTRICTED"),
150 }
151 }
152 }
153 impl ::std::str::FromStr for ActivityLevel {
154 type Err = self::error::ConversionError;
155 fn from_str(
156 value: &str,
157 ) -> ::std::result::Result<Self, self::error::ConversionError> {
158 match value {
159 "WEAK" => Ok(Self::Weak),
160 "GROWING" => Ok(Self::Growing),
161 "STRONG" => Ok(Self::Strong),
162 "RESTRICTED" => Ok(Self::Restricted),
163 _ => Err("invalid value".into()),
164 }
165 }
166 }
167 impl ::std::convert::TryFrom<&str> for ActivityLevel {
168 type Error = self::error::ConversionError;
169 fn try_from(
170 value: &str,
171 ) -> ::std::result::Result<Self, self::error::ConversionError> {
172 value.parse()
173 }
174 }
175 impl ::std::convert::TryFrom<&::std::string::String> for ActivityLevel {
176 type Error = self::error::ConversionError;
177 fn try_from(
178 value: &::std::string::String,
179 ) -> ::std::result::Result<Self, self::error::ConversionError> {
180 value.parse()
181 }
182 }
183 impl ::std::convert::TryFrom<::std::string::String> for ActivityLevel {
184 type Error = self::error::ConversionError;
185 fn try_from(
186 value: ::std::string::String,
187 ) -> ::std::result::Result<Self, self::error::ConversionError> {
188 value.parse()
189 }
190 }
191 ///Agent details.
192 ///
193 /// <details><summary>JSON schema</summary>
194 ///
195 /// ```json
196 ///{
197 /// "description": "Agent details.",
198 /// "type": "object",
199 /// "required": [
200 /// "accountId",
201 /// "credits",
202 /// "headquarters",
203 /// "shipCount",
204 /// "startingFaction",
205 /// "symbol"
206 /// ],
207 /// "properties": {
208 /// "accountId": {
209 /// "description": "Account ID that is tied to this agent. Only included on your own agent.",
210 /// "type": "string",
211 /// "minLength": 1
212 /// },
213 /// "credits": {
214 /// "description": "The number of credits the agent has available. Credits can be negative if funds have been overdrawn.",
215 /// "type": "integer",
216 /// "format": "int64"
217 /// },
218 /// "headquarters": {
219 /// "description": "The headquarters of the agent.",
220 /// "type": "string",
221 /// "minLength": 1
222 /// },
223 /// "shipCount": {
224 /// "description": "How many ships are owned by the agent.",
225 /// "type": "integer"
226 /// },
227 /// "startingFaction": {
228 /// "description": "The faction the agent started with.",
229 /// "type": "string",
230 /// "minLength": 1
231 /// },
232 /// "symbol": {
233 /// "description": "Symbol of the agent.",
234 /// "type": "string",
235 /// "maxLength": 14,
236 /// "minLength": 3
237 /// }
238 /// }
239 ///}
240 /// ```
241 /// </details>
242 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
243 pub struct Agent {
244 ///Account ID that is tied to this agent. Only included on your own agent.
245 #[serde(rename = "accountId")]
246 pub account_id: AgentAccountId,
247 ///The number of credits the agent has available. Credits can be negative if funds have been overdrawn.
248 pub credits: i64,
249 ///The headquarters of the agent.
250 pub headquarters: AgentHeadquarters,
251 ///How many ships are owned by the agent.
252 #[serde(rename = "shipCount")]
253 pub ship_count: i64,
254 ///The faction the agent started with.
255 #[serde(rename = "startingFaction")]
256 pub starting_faction: AgentStartingFaction,
257 ///Symbol of the agent.
258 pub symbol: AgentSymbol,
259 }
260 ///Account ID that is tied to this agent. Only included on your own agent.
261 ///
262 /// <details><summary>JSON schema</summary>
263 ///
264 /// ```json
265 ///{
266 /// "description": "Account ID that is tied to this agent. Only included on your own agent.",
267 /// "type": "string",
268 /// "minLength": 1
269 ///}
270 /// ```
271 /// </details>
272 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
273 #[serde(transparent)]
274 pub struct AgentAccountId(::std::string::String);
275 impl ::std::ops::Deref for AgentAccountId {
276 type Target = ::std::string::String;
277 fn deref(&self) -> &::std::string::String {
278 &self.0
279 }
280 }
281 impl ::std::convert::From<AgentAccountId> for ::std::string::String {
282 fn from(value: AgentAccountId) -> Self {
283 value.0
284 }
285 }
286 impl ::std::str::FromStr for AgentAccountId {
287 type Err = self::error::ConversionError;
288 fn from_str(
289 value: &str,
290 ) -> ::std::result::Result<Self, self::error::ConversionError> {
291 if value.chars().count() < 1usize {
292 return Err("shorter than 1 characters".into());
293 }
294 Ok(Self(value.to_string()))
295 }
296 }
297 impl ::std::convert::TryFrom<&str> for AgentAccountId {
298 type Error = self::error::ConversionError;
299 fn try_from(
300 value: &str,
301 ) -> ::std::result::Result<Self, self::error::ConversionError> {
302 value.parse()
303 }
304 }
305 impl ::std::convert::TryFrom<&::std::string::String> for AgentAccountId {
306 type Error = self::error::ConversionError;
307 fn try_from(
308 value: &::std::string::String,
309 ) -> ::std::result::Result<Self, self::error::ConversionError> {
310 value.parse()
311 }
312 }
313 impl ::std::convert::TryFrom<::std::string::String> for AgentAccountId {
314 type Error = self::error::ConversionError;
315 fn try_from(
316 value: ::std::string::String,
317 ) -> ::std::result::Result<Self, self::error::ConversionError> {
318 value.parse()
319 }
320 }
321 impl<'de> ::serde::Deserialize<'de> for AgentAccountId {
322 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
323 where
324 D: ::serde::Deserializer<'de>,
325 {
326 ::std::string::String::deserialize(deserializer)?
327 .parse()
328 .map_err(|e: self::error::ConversionError| {
329 <D::Error as ::serde::de::Error>::custom(e.to_string())
330 })
331 }
332 }
333 ///Agent event details.
334 ///
335 /// <details><summary>JSON schema</summary>
336 ///
337 /// ```json
338 ///{
339 /// "description": "Agent event details.",
340 /// "type": "object",
341 /// "required": [
342 /// "createdAt",
343 /// "id",
344 /// "message",
345 /// "type"
346 /// ],
347 /// "properties": {
348 /// "createdAt": {
349 /// "type": "string",
350 /// "format": "date-time"
351 /// },
352 /// "data": {},
353 /// "id": {
354 /// "type": "string"
355 /// },
356 /// "message": {
357 /// "type": "string"
358 /// },
359 /// "type": {
360 /// "type": "string"
361 /// }
362 /// }
363 ///}
364 /// ```
365 /// </details>
366 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
367 pub struct AgentEvent {
368 #[serde(rename = "createdAt")]
369 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
370 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
371 pub data: ::std::option::Option<::serde_json::Value>,
372 pub id: ::std::string::String,
373 pub message: ::std::string::String,
374 #[serde(rename = "type")]
375 pub type_: ::std::string::String,
376 }
377 ///The headquarters of the agent.
378 ///
379 /// <details><summary>JSON schema</summary>
380 ///
381 /// ```json
382 ///{
383 /// "description": "The headquarters of the agent.",
384 /// "type": "string",
385 /// "minLength": 1
386 ///}
387 /// ```
388 /// </details>
389 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
390 #[serde(transparent)]
391 pub struct AgentHeadquarters(::std::string::String);
392 impl ::std::ops::Deref for AgentHeadquarters {
393 type Target = ::std::string::String;
394 fn deref(&self) -> &::std::string::String {
395 &self.0
396 }
397 }
398 impl ::std::convert::From<AgentHeadquarters> for ::std::string::String {
399 fn from(value: AgentHeadquarters) -> Self {
400 value.0
401 }
402 }
403 impl ::std::str::FromStr for AgentHeadquarters {
404 type Err = self::error::ConversionError;
405 fn from_str(
406 value: &str,
407 ) -> ::std::result::Result<Self, self::error::ConversionError> {
408 if value.chars().count() < 1usize {
409 return Err("shorter than 1 characters".into());
410 }
411 Ok(Self(value.to_string()))
412 }
413 }
414 impl ::std::convert::TryFrom<&str> for AgentHeadquarters {
415 type Error = self::error::ConversionError;
416 fn try_from(
417 value: &str,
418 ) -> ::std::result::Result<Self, self::error::ConversionError> {
419 value.parse()
420 }
421 }
422 impl ::std::convert::TryFrom<&::std::string::String> for AgentHeadquarters {
423 type Error = self::error::ConversionError;
424 fn try_from(
425 value: &::std::string::String,
426 ) -> ::std::result::Result<Self, self::error::ConversionError> {
427 value.parse()
428 }
429 }
430 impl ::std::convert::TryFrom<::std::string::String> for AgentHeadquarters {
431 type Error = self::error::ConversionError;
432 fn try_from(
433 value: ::std::string::String,
434 ) -> ::std::result::Result<Self, self::error::ConversionError> {
435 value.parse()
436 }
437 }
438 impl<'de> ::serde::Deserialize<'de> for AgentHeadquarters {
439 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
440 where
441 D: ::serde::Deserializer<'de>,
442 {
443 ::std::string::String::deserialize(deserializer)?
444 .parse()
445 .map_err(|e: self::error::ConversionError| {
446 <D::Error as ::serde::de::Error>::custom(e.to_string())
447 })
448 }
449 }
450 ///The faction the agent started with.
451 ///
452 /// <details><summary>JSON schema</summary>
453 ///
454 /// ```json
455 ///{
456 /// "description": "The faction the agent started with.",
457 /// "type": "string",
458 /// "minLength": 1
459 ///}
460 /// ```
461 /// </details>
462 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
463 #[serde(transparent)]
464 pub struct AgentStartingFaction(::std::string::String);
465 impl ::std::ops::Deref for AgentStartingFaction {
466 type Target = ::std::string::String;
467 fn deref(&self) -> &::std::string::String {
468 &self.0
469 }
470 }
471 impl ::std::convert::From<AgentStartingFaction> for ::std::string::String {
472 fn from(value: AgentStartingFaction) -> Self {
473 value.0
474 }
475 }
476 impl ::std::str::FromStr for AgentStartingFaction {
477 type Err = self::error::ConversionError;
478 fn from_str(
479 value: &str,
480 ) -> ::std::result::Result<Self, self::error::ConversionError> {
481 if value.chars().count() < 1usize {
482 return Err("shorter than 1 characters".into());
483 }
484 Ok(Self(value.to_string()))
485 }
486 }
487 impl ::std::convert::TryFrom<&str> for AgentStartingFaction {
488 type Error = self::error::ConversionError;
489 fn try_from(
490 value: &str,
491 ) -> ::std::result::Result<Self, self::error::ConversionError> {
492 value.parse()
493 }
494 }
495 impl ::std::convert::TryFrom<&::std::string::String> for AgentStartingFaction {
496 type Error = self::error::ConversionError;
497 fn try_from(
498 value: &::std::string::String,
499 ) -> ::std::result::Result<Self, self::error::ConversionError> {
500 value.parse()
501 }
502 }
503 impl ::std::convert::TryFrom<::std::string::String> for AgentStartingFaction {
504 type Error = self::error::ConversionError;
505 fn try_from(
506 value: ::std::string::String,
507 ) -> ::std::result::Result<Self, self::error::ConversionError> {
508 value.parse()
509 }
510 }
511 impl<'de> ::serde::Deserialize<'de> for AgentStartingFaction {
512 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
513 where
514 D: ::serde::Deserializer<'de>,
515 {
516 ::std::string::String::deserialize(deserializer)?
517 .parse()
518 .map_err(|e: self::error::ConversionError| {
519 <D::Error as ::serde::de::Error>::custom(e.to_string())
520 })
521 }
522 }
523 ///Symbol of the agent.
524 ///
525 /// <details><summary>JSON schema</summary>
526 ///
527 /// ```json
528 ///{
529 /// "description": "Symbol of the agent.",
530 /// "type": "string",
531 /// "maxLength": 14,
532 /// "minLength": 3
533 ///}
534 /// ```
535 /// </details>
536 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
537 #[serde(transparent)]
538 pub struct AgentSymbol(::std::string::String);
539 impl ::std::ops::Deref for AgentSymbol {
540 type Target = ::std::string::String;
541 fn deref(&self) -> &::std::string::String {
542 &self.0
543 }
544 }
545 impl ::std::convert::From<AgentSymbol> for ::std::string::String {
546 fn from(value: AgentSymbol) -> Self {
547 value.0
548 }
549 }
550 impl ::std::str::FromStr for AgentSymbol {
551 type Err = self::error::ConversionError;
552 fn from_str(
553 value: &str,
554 ) -> ::std::result::Result<Self, self::error::ConversionError> {
555 if value.chars().count() > 14usize {
556 return Err("longer than 14 characters".into());
557 }
558 if value.chars().count() < 3usize {
559 return Err("shorter than 3 characters".into());
560 }
561 Ok(Self(value.to_string()))
562 }
563 }
564 impl ::std::convert::TryFrom<&str> for AgentSymbol {
565 type Error = self::error::ConversionError;
566 fn try_from(
567 value: &str,
568 ) -> ::std::result::Result<Self, self::error::ConversionError> {
569 value.parse()
570 }
571 }
572 impl ::std::convert::TryFrom<&::std::string::String> for AgentSymbol {
573 type Error = self::error::ConversionError;
574 fn try_from(
575 value: &::std::string::String,
576 ) -> ::std::result::Result<Self, self::error::ConversionError> {
577 value.parse()
578 }
579 }
580 impl ::std::convert::TryFrom<::std::string::String> for AgentSymbol {
581 type Error = self::error::ConversionError;
582 fn try_from(
583 value: ::std::string::String,
584 ) -> ::std::result::Result<Self, self::error::ConversionError> {
585 value.parse()
586 }
587 }
588 impl<'de> ::serde::Deserialize<'de> for AgentSymbol {
589 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
590 where
591 D: ::serde::Deserializer<'de>,
592 {
593 ::std::string::String::deserialize(deserializer)?
594 .parse()
595 .map_err(|e: self::error::ConversionError| {
596 <D::Error as ::serde::de::Error>::custom(e.to_string())
597 })
598 }
599 }
600 ///The chart of a system or waypoint, which makes the location visible to other agents.
601 ///
602 /// <details><summary>JSON schema</summary>
603 ///
604 /// ```json
605 ///{
606 /// "description": "The chart of a system or waypoint, which makes the location visible to other agents.",
607 /// "type": "object",
608 /// "required": [
609 /// "submittedBy",
610 /// "submittedOn",
611 /// "waypointSymbol"
612 /// ],
613 /// "properties": {
614 /// "submittedBy": {
615 /// "description": "The agent that submitted the chart for this waypoint.",
616 /// "type": "string"
617 /// },
618 /// "submittedOn": {
619 /// "description": "The time the chart for this waypoint was submitted.",
620 /// "type": "string",
621 /// "format": "date-time"
622 /// },
623 /// "waypointSymbol": {
624 /// "$ref": "#/components/schemas/WaypointSymbol"
625 /// }
626 /// }
627 ///}
628 /// ```
629 /// </details>
630 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
631 pub struct Chart {
632 ///The agent that submitted the chart for this waypoint.
633 #[serde(rename = "submittedBy")]
634 pub submitted_by: ::std::string::String,
635 ///The time the chart for this waypoint was submitted.
636 #[serde(rename = "submittedOn")]
637 pub submitted_on: ::chrono::DateTime<::chrono::offset::Utc>,
638 #[serde(rename = "waypointSymbol")]
639 pub waypoint_symbol: WaypointSymbol,
640 }
641 ///Result of a chart transaction.
642 ///
643 /// <details><summary>JSON schema</summary>
644 ///
645 /// ```json
646 ///{
647 /// "description": "Result of a chart transaction.",
648 /// "type": "object",
649 /// "required": [
650 /// "shipSymbol",
651 /// "timestamp",
652 /// "totalPrice",
653 /// "waypointSymbol"
654 /// ],
655 /// "properties": {
656 /// "shipSymbol": {
657 /// "description": "The symbol of the ship.",
658 /// "type": "string"
659 /// },
660 /// "timestamp": {
661 /// "description": "The timestamp of the transaction.",
662 /// "type": "string",
663 /// "format": "date-time"
664 /// },
665 /// "totalPrice": {
666 /// "description": "The total price of the transaction.",
667 /// "type": "integer",
668 /// "minimum": 0.0
669 /// },
670 /// "waypointSymbol": {
671 /// "$ref": "#/components/schemas/WaypointSymbol"
672 /// }
673 /// }
674 ///}
675 /// ```
676 /// </details>
677 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
678 pub struct ChartTransaction {
679 ///The symbol of the ship.
680 #[serde(rename = "shipSymbol")]
681 pub ship_symbol: ::std::string::String,
682 ///The timestamp of the transaction.
683 pub timestamp: ::chrono::DateTime<::chrono::offset::Utc>,
684 ///The total price of the transaction.
685 #[serde(rename = "totalPrice")]
686 pub total_price: u64,
687 #[serde(rename = "waypointSymbol")]
688 pub waypoint_symbol: WaypointSymbol,
689 }
690 ///The construction details of a waypoint.
691 ///
692 /// <details><summary>JSON schema</summary>
693 ///
694 /// ```json
695 ///{
696 /// "description": "The construction details of a waypoint.",
697 /// "type": "object",
698 /// "required": [
699 /// "isComplete",
700 /// "materials",
701 /// "symbol"
702 /// ],
703 /// "properties": {
704 /// "isComplete": {
705 /// "description": "Whether the waypoint has been constructed.",
706 /// "type": "boolean"
707 /// },
708 /// "materials": {
709 /// "description": "The materials required to construct the waypoint.",
710 /// "type": "array",
711 /// "items": {
712 /// "$ref": "#/components/schemas/ConstructionMaterial"
713 /// }
714 /// },
715 /// "symbol": {
716 /// "description": "The symbol of the waypoint.",
717 /// "type": "string"
718 /// }
719 /// }
720 ///}
721 /// ```
722 /// </details>
723 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
724 pub struct Construction {
725 ///Whether the waypoint has been constructed.
726 #[serde(rename = "isComplete")]
727 pub is_complete: bool,
728 ///The materials required to construct the waypoint.
729 pub materials: ::std::vec::Vec<ConstructionMaterial>,
730 ///The symbol of the waypoint.
731 pub symbol: ::std::string::String,
732 }
733 ///The details of the required construction materials for a given waypoint under construction.
734 ///
735 /// <details><summary>JSON schema</summary>
736 ///
737 /// ```json
738 ///{
739 /// "description": "The details of the required construction materials for a given waypoint under construction.",
740 /// "type": "object",
741 /// "required": [
742 /// "fulfilled",
743 /// "required",
744 /// "tradeSymbol"
745 /// ],
746 /// "properties": {
747 /// "fulfilled": {
748 /// "description": "The number of units fulfilled toward the required amount.",
749 /// "type": "integer"
750 /// },
751 /// "required": {
752 /// "description": "The number of units required.",
753 /// "type": "integer"
754 /// },
755 /// "tradeSymbol": {
756 /// "$ref": "#/components/schemas/TradeSymbol"
757 /// }
758 /// }
759 ///}
760 /// ```
761 /// </details>
762 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
763 pub struct ConstructionMaterial {
764 ///The number of units fulfilled toward the required amount.
765 pub fulfilled: i64,
766 ///The number of units required.
767 pub required: i64,
768 #[serde(rename = "tradeSymbol")]
769 pub trade_symbol: TradeSymbol,
770 }
771 ///Contract details.
772 ///
773 /// <details><summary>JSON schema</summary>
774 ///
775 /// ```json
776 ///{
777 /// "description": "Contract details.",
778 /// "type": "object",
779 /// "required": [
780 /// "accepted",
781 /// "expiration",
782 /// "factionSymbol",
783 /// "fulfilled",
784 /// "id",
785 /// "terms",
786 /// "type"
787 /// ],
788 /// "properties": {
789 /// "accepted": {
790 /// "description": "Whether the contract has been accepted by the agent",
791 /// "default": false,
792 /// "type": "boolean"
793 /// },
794 /// "deadlineToAccept": {
795 /// "description": "The time at which the contract is no longer available to be accepted",
796 /// "type": "string",
797 /// "format": "date-time"
798 /// },
799 /// "expiration": {
800 /// "description": "Deprecated in favor of deadlineToAccept",
801 /// "deprecated": true,
802 /// "type": "string",
803 /// "format": "date-time"
804 /// },
805 /// "factionSymbol": {
806 /// "description": "The symbol of the faction that this contract is for.",
807 /// "type": "string",
808 /// "minLength": 1
809 /// },
810 /// "fulfilled": {
811 /// "description": "Whether the contract has been fulfilled",
812 /// "default": false,
813 /// "type": "boolean"
814 /// },
815 /// "id": {
816 /// "description": "ID of the contract.",
817 /// "type": "string",
818 /// "minLength": 1
819 /// },
820 /// "terms": {
821 /// "$ref": "#/components/schemas/ContractTerms"
822 /// },
823 /// "type": {
824 /// "description": "Type of contract.",
825 /// "type": "string",
826 /// "enum": [
827 /// "PROCUREMENT",
828 /// "TRANSPORT",
829 /// "SHUTTLE"
830 /// ]
831 /// }
832 /// }
833 ///}
834 /// ```
835 /// </details>
836 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
837 pub struct Contract {
838 ///Whether the contract has been accepted by the agent
839 pub accepted: bool,
840 ///The time at which the contract is no longer available to be accepted
841 #[serde(
842 rename = "deadlineToAccept",
843 default,
844 skip_serializing_if = "::std::option::Option::is_none"
845 )]
846 pub deadline_to_accept: ::std::option::Option<
847 ::chrono::DateTime<::chrono::offset::Utc>,
848 >,
849 ///Deprecated in favor of deadlineToAccept
850 pub expiration: ::chrono::DateTime<::chrono::offset::Utc>,
851 ///The symbol of the faction that this contract is for.
852 #[serde(rename = "factionSymbol")]
853 pub faction_symbol: ContractFactionSymbol,
854 ///Whether the contract has been fulfilled
855 pub fulfilled: bool,
856 ///ID of the contract.
857 pub id: ContractId,
858 pub terms: ContractTerms,
859 ///Type of contract.
860 #[serde(rename = "type")]
861 pub type_: ContractType,
862 }
863 ///The details of a delivery contract. Includes the type of good, units needed, and the destination.
864 ///
865 /// <details><summary>JSON schema</summary>
866 ///
867 /// ```json
868 ///{
869 /// "description": "The details of a delivery contract. Includes the type of good, units needed, and the destination.",
870 /// "type": "object",
871 /// "required": [
872 /// "destinationSymbol",
873 /// "tradeSymbol",
874 /// "unitsFulfilled",
875 /// "unitsRequired"
876 /// ],
877 /// "properties": {
878 /// "destinationSymbol": {
879 /// "description": "The destination where goods need to be delivered.",
880 /// "type": "string",
881 /// "minLength": 1
882 /// },
883 /// "tradeSymbol": {
884 /// "description": "The symbol of the trade good to deliver.",
885 /// "type": "string",
886 /// "minLength": 1
887 /// },
888 /// "unitsFulfilled": {
889 /// "description": "The number of units fulfilled on this contract.",
890 /// "type": "integer"
891 /// },
892 /// "unitsRequired": {
893 /// "description": "The number of units that need to be delivered on this contract.",
894 /// "type": "integer"
895 /// }
896 /// }
897 ///}
898 /// ```
899 /// </details>
900 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
901 pub struct ContractDeliverGood {
902 ///The destination where goods need to be delivered.
903 #[serde(rename = "destinationSymbol")]
904 pub destination_symbol: ContractDeliverGoodDestinationSymbol,
905 ///The symbol of the trade good to deliver.
906 #[serde(rename = "tradeSymbol")]
907 pub trade_symbol: ContractDeliverGoodTradeSymbol,
908 ///The number of units fulfilled on this contract.
909 #[serde(rename = "unitsFulfilled")]
910 pub units_fulfilled: i64,
911 ///The number of units that need to be delivered on this contract.
912 #[serde(rename = "unitsRequired")]
913 pub units_required: i64,
914 }
915 ///The destination where goods need to be delivered.
916 ///
917 /// <details><summary>JSON schema</summary>
918 ///
919 /// ```json
920 ///{
921 /// "description": "The destination where goods need to be delivered.",
922 /// "type": "string",
923 /// "minLength": 1
924 ///}
925 /// ```
926 /// </details>
927 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
928 #[serde(transparent)]
929 pub struct ContractDeliverGoodDestinationSymbol(::std::string::String);
930 impl ::std::ops::Deref for ContractDeliverGoodDestinationSymbol {
931 type Target = ::std::string::String;
932 fn deref(&self) -> &::std::string::String {
933 &self.0
934 }
935 }
936 impl ::std::convert::From<ContractDeliverGoodDestinationSymbol>
937 for ::std::string::String {
938 fn from(value: ContractDeliverGoodDestinationSymbol) -> Self {
939 value.0
940 }
941 }
942 impl ::std::str::FromStr for ContractDeliverGoodDestinationSymbol {
943 type Err = self::error::ConversionError;
944 fn from_str(
945 value: &str,
946 ) -> ::std::result::Result<Self, self::error::ConversionError> {
947 if value.chars().count() < 1usize {
948 return Err("shorter than 1 characters".into());
949 }
950 Ok(Self(value.to_string()))
951 }
952 }
953 impl ::std::convert::TryFrom<&str> for ContractDeliverGoodDestinationSymbol {
954 type Error = self::error::ConversionError;
955 fn try_from(
956 value: &str,
957 ) -> ::std::result::Result<Self, self::error::ConversionError> {
958 value.parse()
959 }
960 }
961 impl ::std::convert::TryFrom<&::std::string::String>
962 for ContractDeliverGoodDestinationSymbol {
963 type Error = self::error::ConversionError;
964 fn try_from(
965 value: &::std::string::String,
966 ) -> ::std::result::Result<Self, self::error::ConversionError> {
967 value.parse()
968 }
969 }
970 impl ::std::convert::TryFrom<::std::string::String>
971 for ContractDeliverGoodDestinationSymbol {
972 type Error = self::error::ConversionError;
973 fn try_from(
974 value: ::std::string::String,
975 ) -> ::std::result::Result<Self, self::error::ConversionError> {
976 value.parse()
977 }
978 }
979 impl<'de> ::serde::Deserialize<'de> for ContractDeliverGoodDestinationSymbol {
980 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
981 where
982 D: ::serde::Deserializer<'de>,
983 {
984 ::std::string::String::deserialize(deserializer)?
985 .parse()
986 .map_err(|e: self::error::ConversionError| {
987 <D::Error as ::serde::de::Error>::custom(e.to_string())
988 })
989 }
990 }
991 ///The symbol of the trade good to deliver.
992 ///
993 /// <details><summary>JSON schema</summary>
994 ///
995 /// ```json
996 ///{
997 /// "description": "The symbol of the trade good to deliver.",
998 /// "type": "string",
999 /// "minLength": 1
1000 ///}
1001 /// ```
1002 /// </details>
1003 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1004 #[serde(transparent)]
1005 pub struct ContractDeliverGoodTradeSymbol(::std::string::String);
1006 impl ::std::ops::Deref for ContractDeliverGoodTradeSymbol {
1007 type Target = ::std::string::String;
1008 fn deref(&self) -> &::std::string::String {
1009 &self.0
1010 }
1011 }
1012 impl ::std::convert::From<ContractDeliverGoodTradeSymbol> for ::std::string::String {
1013 fn from(value: ContractDeliverGoodTradeSymbol) -> Self {
1014 value.0
1015 }
1016 }
1017 impl ::std::str::FromStr for ContractDeliverGoodTradeSymbol {
1018 type Err = self::error::ConversionError;
1019 fn from_str(
1020 value: &str,
1021 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1022 if value.chars().count() < 1usize {
1023 return Err("shorter than 1 characters".into());
1024 }
1025 Ok(Self(value.to_string()))
1026 }
1027 }
1028 impl ::std::convert::TryFrom<&str> for ContractDeliverGoodTradeSymbol {
1029 type Error = self::error::ConversionError;
1030 fn try_from(
1031 value: &str,
1032 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1033 value.parse()
1034 }
1035 }
1036 impl ::std::convert::TryFrom<&::std::string::String>
1037 for ContractDeliverGoodTradeSymbol {
1038 type Error = self::error::ConversionError;
1039 fn try_from(
1040 value: &::std::string::String,
1041 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1042 value.parse()
1043 }
1044 }
1045 impl ::std::convert::TryFrom<::std::string::String>
1046 for ContractDeliverGoodTradeSymbol {
1047 type Error = self::error::ConversionError;
1048 fn try_from(
1049 value: ::std::string::String,
1050 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1051 value.parse()
1052 }
1053 }
1054 impl<'de> ::serde::Deserialize<'de> for ContractDeliverGoodTradeSymbol {
1055 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1056 where
1057 D: ::serde::Deserializer<'de>,
1058 {
1059 ::std::string::String::deserialize(deserializer)?
1060 .parse()
1061 .map_err(|e: self::error::ConversionError| {
1062 <D::Error as ::serde::de::Error>::custom(e.to_string())
1063 })
1064 }
1065 }
1066 ///The symbol of the faction that this contract is for.
1067 ///
1068 /// <details><summary>JSON schema</summary>
1069 ///
1070 /// ```json
1071 ///{
1072 /// "description": "The symbol of the faction that this contract is for.",
1073 /// "type": "string",
1074 /// "minLength": 1
1075 ///}
1076 /// ```
1077 /// </details>
1078 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1079 #[serde(transparent)]
1080 pub struct ContractFactionSymbol(::std::string::String);
1081 impl ::std::ops::Deref for ContractFactionSymbol {
1082 type Target = ::std::string::String;
1083 fn deref(&self) -> &::std::string::String {
1084 &self.0
1085 }
1086 }
1087 impl ::std::convert::From<ContractFactionSymbol> for ::std::string::String {
1088 fn from(value: ContractFactionSymbol) -> Self {
1089 value.0
1090 }
1091 }
1092 impl ::std::str::FromStr for ContractFactionSymbol {
1093 type Err = self::error::ConversionError;
1094 fn from_str(
1095 value: &str,
1096 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1097 if value.chars().count() < 1usize {
1098 return Err("shorter than 1 characters".into());
1099 }
1100 Ok(Self(value.to_string()))
1101 }
1102 }
1103 impl ::std::convert::TryFrom<&str> for ContractFactionSymbol {
1104 type Error = self::error::ConversionError;
1105 fn try_from(
1106 value: &str,
1107 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1108 value.parse()
1109 }
1110 }
1111 impl ::std::convert::TryFrom<&::std::string::String> for ContractFactionSymbol {
1112 type Error = self::error::ConversionError;
1113 fn try_from(
1114 value: &::std::string::String,
1115 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1116 value.parse()
1117 }
1118 }
1119 impl ::std::convert::TryFrom<::std::string::String> for ContractFactionSymbol {
1120 type Error = self::error::ConversionError;
1121 fn try_from(
1122 value: ::std::string::String,
1123 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1124 value.parse()
1125 }
1126 }
1127 impl<'de> ::serde::Deserialize<'de> for ContractFactionSymbol {
1128 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1129 where
1130 D: ::serde::Deserializer<'de>,
1131 {
1132 ::std::string::String::deserialize(deserializer)?
1133 .parse()
1134 .map_err(|e: self::error::ConversionError| {
1135 <D::Error as ::serde::de::Error>::custom(e.to_string())
1136 })
1137 }
1138 }
1139 ///ID of the contract.
1140 ///
1141 /// <details><summary>JSON schema</summary>
1142 ///
1143 /// ```json
1144 ///{
1145 /// "description": "ID of the contract.",
1146 /// "type": "string",
1147 /// "minLength": 1
1148 ///}
1149 /// ```
1150 /// </details>
1151 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1152 #[serde(transparent)]
1153 pub struct ContractId(::std::string::String);
1154 impl ::std::ops::Deref for ContractId {
1155 type Target = ::std::string::String;
1156 fn deref(&self) -> &::std::string::String {
1157 &self.0
1158 }
1159 }
1160 impl ::std::convert::From<ContractId> for ::std::string::String {
1161 fn from(value: ContractId) -> Self {
1162 value.0
1163 }
1164 }
1165 impl ::std::str::FromStr for ContractId {
1166 type Err = self::error::ConversionError;
1167 fn from_str(
1168 value: &str,
1169 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1170 if value.chars().count() < 1usize {
1171 return Err("shorter than 1 characters".into());
1172 }
1173 Ok(Self(value.to_string()))
1174 }
1175 }
1176 impl ::std::convert::TryFrom<&str> for ContractId {
1177 type Error = self::error::ConversionError;
1178 fn try_from(
1179 value: &str,
1180 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1181 value.parse()
1182 }
1183 }
1184 impl ::std::convert::TryFrom<&::std::string::String> for ContractId {
1185 type Error = self::error::ConversionError;
1186 fn try_from(
1187 value: &::std::string::String,
1188 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1189 value.parse()
1190 }
1191 }
1192 impl ::std::convert::TryFrom<::std::string::String> for ContractId {
1193 type Error = self::error::ConversionError;
1194 fn try_from(
1195 value: ::std::string::String,
1196 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1197 value.parse()
1198 }
1199 }
1200 impl<'de> ::serde::Deserialize<'de> for ContractId {
1201 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1202 where
1203 D: ::serde::Deserializer<'de>,
1204 {
1205 ::std::string::String::deserialize(deserializer)?
1206 .parse()
1207 .map_err(|e: self::error::ConversionError| {
1208 <D::Error as ::serde::de::Error>::custom(e.to_string())
1209 })
1210 }
1211 }
1212 ///Payments for the contract.
1213 ///
1214 /// <details><summary>JSON schema</summary>
1215 ///
1216 /// ```json
1217 ///{
1218 /// "description": "Payments for the contract.",
1219 /// "type": "object",
1220 /// "required": [
1221 /// "onAccepted",
1222 /// "onFulfilled"
1223 /// ],
1224 /// "properties": {
1225 /// "onAccepted": {
1226 /// "description": "The amount of credits received up front for accepting the contract.",
1227 /// "type": "integer"
1228 /// },
1229 /// "onFulfilled": {
1230 /// "description": "The amount of credits received when the contract is fulfilled.",
1231 /// "type": "integer"
1232 /// }
1233 /// }
1234 ///}
1235 /// ```
1236 /// </details>
1237 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1238 pub struct ContractPayment {
1239 ///The amount of credits received up front for accepting the contract.
1240 #[serde(rename = "onAccepted")]
1241 pub on_accepted: i64,
1242 ///The amount of credits received when the contract is fulfilled.
1243 #[serde(rename = "onFulfilled")]
1244 pub on_fulfilled: i64,
1245 }
1246 ///The terms to fulfill the contract.
1247 ///
1248 /// <details><summary>JSON schema</summary>
1249 ///
1250 /// ```json
1251 ///{
1252 /// "description": "The terms to fulfill the contract.",
1253 /// "type": "object",
1254 /// "required": [
1255 /// "deadline",
1256 /// "payment"
1257 /// ],
1258 /// "properties": {
1259 /// "deadline": {
1260 /// "description": "The deadline for the contract.",
1261 /// "type": "string",
1262 /// "format": "date-time"
1263 /// },
1264 /// "deliver": {
1265 /// "description": "The cargo that needs to be delivered to fulfill the contract.",
1266 /// "type": "array",
1267 /// "items": {
1268 /// "$ref": "#/components/schemas/ContractDeliverGood"
1269 /// }
1270 /// },
1271 /// "payment": {
1272 /// "$ref": "#/components/schemas/ContractPayment"
1273 /// }
1274 /// }
1275 ///}
1276 /// ```
1277 /// </details>
1278 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1279 pub struct ContractTerms {
1280 ///The deadline for the contract.
1281 pub deadline: ::chrono::DateTime<::chrono::offset::Utc>,
1282 ///The cargo that needs to be delivered to fulfill the contract.
1283 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1284 pub deliver: ::std::vec::Vec<ContractDeliverGood>,
1285 pub payment: ContractPayment,
1286 }
1287 ///Type of contract.
1288 ///
1289 /// <details><summary>JSON schema</summary>
1290 ///
1291 /// ```json
1292 ///{
1293 /// "description": "Type of contract.",
1294 /// "type": "string",
1295 /// "enum": [
1296 /// "PROCUREMENT",
1297 /// "TRANSPORT",
1298 /// "SHUTTLE"
1299 /// ]
1300 ///}
1301 /// ```
1302 /// </details>
1303 #[derive(
1304 ::serde::Deserialize,
1305 ::serde::Serialize,
1306 Clone,
1307 Copy,
1308 Debug,
1309 Eq,
1310 Hash,
1311 Ord,
1312 PartialEq,
1313 PartialOrd
1314 )]
1315 pub enum ContractType {
1316 #[serde(rename = "PROCUREMENT")]
1317 Procurement,
1318 #[serde(rename = "TRANSPORT")]
1319 Transport,
1320 #[serde(rename = "SHUTTLE")]
1321 Shuttle,
1322 }
1323 impl ::std::fmt::Display for ContractType {
1324 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1325 match *self {
1326 Self::Procurement => f.write_str("PROCUREMENT"),
1327 Self::Transport => f.write_str("TRANSPORT"),
1328 Self::Shuttle => f.write_str("SHUTTLE"),
1329 }
1330 }
1331 }
1332 impl ::std::str::FromStr for ContractType {
1333 type Err = self::error::ConversionError;
1334 fn from_str(
1335 value: &str,
1336 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1337 match value {
1338 "PROCUREMENT" => Ok(Self::Procurement),
1339 "TRANSPORT" => Ok(Self::Transport),
1340 "SHUTTLE" => Ok(Self::Shuttle),
1341 _ => Err("invalid value".into()),
1342 }
1343 }
1344 }
1345 impl ::std::convert::TryFrom<&str> for ContractType {
1346 type Error = self::error::ConversionError;
1347 fn try_from(
1348 value: &str,
1349 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1350 value.parse()
1351 }
1352 }
1353 impl ::std::convert::TryFrom<&::std::string::String> for ContractType {
1354 type Error = self::error::ConversionError;
1355 fn try_from(
1356 value: &::std::string::String,
1357 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1358 value.parse()
1359 }
1360 }
1361 impl ::std::convert::TryFrom<::std::string::String> for ContractType {
1362 type Error = self::error::ConversionError;
1363 fn try_from(
1364 value: ::std::string::String,
1365 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1366 value.parse()
1367 }
1368 }
1369 ///A cooldown is a period of time in which a ship cannot perform certain actions.
1370 ///
1371 /// <details><summary>JSON schema</summary>
1372 ///
1373 /// ```json
1374 ///{
1375 /// "description": "A cooldown is a period of time in which a ship cannot perform certain actions.",
1376 /// "type": "object",
1377 /// "required": [
1378 /// "remainingSeconds",
1379 /// "shipSymbol",
1380 /// "totalSeconds"
1381 /// ],
1382 /// "properties": {
1383 /// "expiration": {
1384 /// "description": "The date and time when the cooldown expires in ISO 8601 format",
1385 /// "type": "string",
1386 /// "format": "date-time"
1387 /// },
1388 /// "remainingSeconds": {
1389 /// "description": "The remaining duration of the cooldown in seconds",
1390 /// "type": "integer",
1391 /// "minimum": 0.0
1392 /// },
1393 /// "shipSymbol": {
1394 /// "description": "The symbol of the ship that is on cooldown",
1395 /// "type": "string",
1396 /// "minLength": 1
1397 /// },
1398 /// "totalSeconds": {
1399 /// "description": "The total duration of the cooldown in seconds",
1400 /// "type": "integer",
1401 /// "minimum": 0.0
1402 /// }
1403 /// }
1404 ///}
1405 /// ```
1406 /// </details>
1407 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1408 pub struct Cooldown {
1409 ///The date and time when the cooldown expires in ISO 8601 format
1410 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1411 pub expiration: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1412 ///The remaining duration of the cooldown in seconds
1413 #[serde(rename = "remainingSeconds")]
1414 pub remaining_seconds: u64,
1415 ///The symbol of the ship that is on cooldown
1416 #[serde(rename = "shipSymbol")]
1417 pub ship_symbol: CooldownShipSymbol,
1418 ///The total duration of the cooldown in seconds
1419 #[serde(rename = "totalSeconds")]
1420 pub total_seconds: u64,
1421 }
1422 ///The symbol of the ship that is on cooldown
1423 ///
1424 /// <details><summary>JSON schema</summary>
1425 ///
1426 /// ```json
1427 ///{
1428 /// "description": "The symbol of the ship that is on cooldown",
1429 /// "type": "string",
1430 /// "minLength": 1
1431 ///}
1432 /// ```
1433 /// </details>
1434 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1435 #[serde(transparent)]
1436 pub struct CooldownShipSymbol(::std::string::String);
1437 impl ::std::ops::Deref for CooldownShipSymbol {
1438 type Target = ::std::string::String;
1439 fn deref(&self) -> &::std::string::String {
1440 &self.0
1441 }
1442 }
1443 impl ::std::convert::From<CooldownShipSymbol> for ::std::string::String {
1444 fn from(value: CooldownShipSymbol) -> Self {
1445 value.0
1446 }
1447 }
1448 impl ::std::str::FromStr for CooldownShipSymbol {
1449 type Err = self::error::ConversionError;
1450 fn from_str(
1451 value: &str,
1452 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1453 if value.chars().count() < 1usize {
1454 return Err("shorter than 1 characters".into());
1455 }
1456 Ok(Self(value.to_string()))
1457 }
1458 }
1459 impl ::std::convert::TryFrom<&str> for CooldownShipSymbol {
1460 type Error = self::error::ConversionError;
1461 fn try_from(
1462 value: &str,
1463 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1464 value.parse()
1465 }
1466 }
1467 impl ::std::convert::TryFrom<&::std::string::String> for CooldownShipSymbol {
1468 type Error = self::error::ConversionError;
1469 fn try_from(
1470 value: &::std::string::String,
1471 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1472 value.parse()
1473 }
1474 }
1475 impl ::std::convert::TryFrom<::std::string::String> for CooldownShipSymbol {
1476 type Error = self::error::ConversionError;
1477 fn try_from(
1478 value: ::std::string::String,
1479 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1480 value.parse()
1481 }
1482 }
1483 impl<'de> ::serde::Deserialize<'de> for CooldownShipSymbol {
1484 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1485 where
1486 D: ::serde::Deserializer<'de>,
1487 {
1488 ::std::string::String::deserialize(deserializer)?
1489 .parse()
1490 .map_err(|e: self::error::ConversionError| {
1491 <D::Error as ::serde::de::Error>::custom(e.to_string())
1492 })
1493 }
1494 }
1495 ///Successfully charted waypoint.
1496 ///
1497 /// <details><summary>JSON schema</summary>
1498 ///
1499 /// ```json
1500 ///{
1501 /// "description": "Successfully charted waypoint.",
1502 /// "type": "object",
1503 /// "required": [
1504 /// "data"
1505 /// ],
1506 /// "properties": {
1507 /// "data": {
1508 /// "type": "object",
1509 /// "required": [
1510 /// "agent",
1511 /// "chart",
1512 /// "transaction",
1513 /// "waypoint"
1514 /// ],
1515 /// "properties": {
1516 /// "agent": {
1517 /// "$ref": "#/components/schemas/Agent"
1518 /// },
1519 /// "chart": {
1520 /// "$ref": "#/components/schemas/Chart"
1521 /// },
1522 /// "transaction": {
1523 /// "$ref": "#/components/schemas/ChartTransaction"
1524 /// },
1525 /// "waypoint": {
1526 /// "$ref": "#/components/schemas/Waypoint"
1527 /// }
1528 /// }
1529 /// }
1530 /// }
1531 ///}
1532 /// ```
1533 /// </details>
1534 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1535 pub struct CreateChartResponse {
1536 pub data: CreateChartResponseData,
1537 }
1538 ///`CreateChartResponseData`
1539 ///
1540 /// <details><summary>JSON schema</summary>
1541 ///
1542 /// ```json
1543 ///{
1544 /// "type": "object",
1545 /// "required": [
1546 /// "agent",
1547 /// "chart",
1548 /// "transaction",
1549 /// "waypoint"
1550 /// ],
1551 /// "properties": {
1552 /// "agent": {
1553 /// "$ref": "#/components/schemas/Agent"
1554 /// },
1555 /// "chart": {
1556 /// "$ref": "#/components/schemas/Chart"
1557 /// },
1558 /// "transaction": {
1559 /// "$ref": "#/components/schemas/ChartTransaction"
1560 /// },
1561 /// "waypoint": {
1562 /// "$ref": "#/components/schemas/Waypoint"
1563 /// }
1564 /// }
1565 ///}
1566 /// ```
1567 /// </details>
1568 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1569 pub struct CreateChartResponseData {
1570 pub agent: Agent,
1571 pub chart: Chart,
1572 pub transaction: ChartTransaction,
1573 pub waypoint: Waypoint,
1574 }
1575 ///Successfully scanned for nearby ships.
1576 ///
1577 /// <details><summary>JSON schema</summary>
1578 ///
1579 /// ```json
1580 ///{
1581 /// "description": "Successfully scanned for nearby ships.",
1582 /// "type": "object",
1583 /// "required": [
1584 /// "data"
1585 /// ],
1586 /// "properties": {
1587 /// "data": {
1588 /// "type": "object",
1589 /// "required": [
1590 /// "cooldown",
1591 /// "ships"
1592 /// ],
1593 /// "properties": {
1594 /// "cooldown": {
1595 /// "$ref": "#/components/schemas/Cooldown"
1596 /// },
1597 /// "ships": {
1598 /// "description": "List of scanned ships.",
1599 /// "type": "array",
1600 /// "items": {
1601 /// "$ref": "#/components/schemas/ScannedShip"
1602 /// }
1603 /// }
1604 /// }
1605 /// }
1606 /// }
1607 ///}
1608 /// ```
1609 /// </details>
1610 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1611 pub struct CreateShipShipScanResponse {
1612 pub data: CreateShipShipScanResponseData,
1613 }
1614 ///`CreateShipShipScanResponseData`
1615 ///
1616 /// <details><summary>JSON schema</summary>
1617 ///
1618 /// ```json
1619 ///{
1620 /// "type": "object",
1621 /// "required": [
1622 /// "cooldown",
1623 /// "ships"
1624 /// ],
1625 /// "properties": {
1626 /// "cooldown": {
1627 /// "$ref": "#/components/schemas/Cooldown"
1628 /// },
1629 /// "ships": {
1630 /// "description": "List of scanned ships.",
1631 /// "type": "array",
1632 /// "items": {
1633 /// "$ref": "#/components/schemas/ScannedShip"
1634 /// }
1635 /// }
1636 /// }
1637 ///}
1638 /// ```
1639 /// </details>
1640 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1641 pub struct CreateShipShipScanResponseData {
1642 pub cooldown: Cooldown,
1643 ///List of scanned ships.
1644 pub ships: ::std::vec::Vec<ScannedShip>,
1645 }
1646 ///Successfully scanned for nearby systems.
1647 ///
1648 /// <details><summary>JSON schema</summary>
1649 ///
1650 /// ```json
1651 ///{
1652 /// "description": "Successfully scanned for nearby systems.",
1653 /// "type": "object",
1654 /// "required": [
1655 /// "data"
1656 /// ],
1657 /// "properties": {
1658 /// "data": {
1659 /// "type": "object",
1660 /// "required": [
1661 /// "cooldown",
1662 /// "systems"
1663 /// ],
1664 /// "properties": {
1665 /// "cooldown": {
1666 /// "$ref": "#/components/schemas/Cooldown"
1667 /// },
1668 /// "systems": {
1669 /// "description": "List of scanned systems.",
1670 /// "type": "array",
1671 /// "items": {
1672 /// "$ref": "#/components/schemas/ScannedSystem"
1673 /// }
1674 /// }
1675 /// }
1676 /// }
1677 /// }
1678 ///}
1679 /// ```
1680 /// </details>
1681 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1682 pub struct CreateShipSystemScanResponse {
1683 pub data: CreateShipSystemScanResponseData,
1684 }
1685 ///`CreateShipSystemScanResponseData`
1686 ///
1687 /// <details><summary>JSON schema</summary>
1688 ///
1689 /// ```json
1690 ///{
1691 /// "type": "object",
1692 /// "required": [
1693 /// "cooldown",
1694 /// "systems"
1695 /// ],
1696 /// "properties": {
1697 /// "cooldown": {
1698 /// "$ref": "#/components/schemas/Cooldown"
1699 /// },
1700 /// "systems": {
1701 /// "description": "List of scanned systems.",
1702 /// "type": "array",
1703 /// "items": {
1704 /// "$ref": "#/components/schemas/ScannedSystem"
1705 /// }
1706 /// }
1707 /// }
1708 ///}
1709 /// ```
1710 /// </details>
1711 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1712 pub struct CreateShipSystemScanResponseData {
1713 pub cooldown: Cooldown,
1714 ///List of scanned systems.
1715 pub systems: ::std::vec::Vec<ScannedSystem>,
1716 }
1717 ///Successfully scanned for nearby waypoints.
1718 ///
1719 /// <details><summary>JSON schema</summary>
1720 ///
1721 /// ```json
1722 ///{
1723 /// "description": "Successfully scanned for nearby waypoints.",
1724 /// "type": "object",
1725 /// "required": [
1726 /// "data"
1727 /// ],
1728 /// "properties": {
1729 /// "data": {
1730 /// "type": "object",
1731 /// "required": [
1732 /// "cooldown",
1733 /// "waypoints"
1734 /// ],
1735 /// "properties": {
1736 /// "cooldown": {
1737 /// "$ref": "#/components/schemas/Cooldown"
1738 /// },
1739 /// "waypoints": {
1740 /// "description": "List of scanned waypoints.",
1741 /// "type": "array",
1742 /// "items": {
1743 /// "$ref": "#/components/schemas/ScannedWaypoint"
1744 /// }
1745 /// }
1746 /// }
1747 /// }
1748 /// }
1749 ///}
1750 /// ```
1751 /// </details>
1752 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1753 pub struct CreateShipWaypointScanResponse {
1754 pub data: CreateShipWaypointScanResponseData,
1755 }
1756 ///`CreateShipWaypointScanResponseData`
1757 ///
1758 /// <details><summary>JSON schema</summary>
1759 ///
1760 /// ```json
1761 ///{
1762 /// "type": "object",
1763 /// "required": [
1764 /// "cooldown",
1765 /// "waypoints"
1766 /// ],
1767 /// "properties": {
1768 /// "cooldown": {
1769 /// "$ref": "#/components/schemas/Cooldown"
1770 /// },
1771 /// "waypoints": {
1772 /// "description": "List of scanned waypoints.",
1773 /// "type": "array",
1774 /// "items": {
1775 /// "$ref": "#/components/schemas/ScannedWaypoint"
1776 /// }
1777 /// }
1778 /// }
1779 ///}
1780 /// ```
1781 /// </details>
1782 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1783 pub struct CreateShipWaypointScanResponseData {
1784 pub cooldown: Cooldown,
1785 ///List of scanned waypoints.
1786 pub waypoints: ::std::vec::Vec<ScannedWaypoint>,
1787 }
1788 ///Surveys has been created.
1789 ///
1790 /// <details><summary>JSON schema</summary>
1791 ///
1792 /// ```json
1793 ///{
1794 /// "description": "Surveys has been created.",
1795 /// "type": "object",
1796 /// "required": [
1797 /// "data"
1798 /// ],
1799 /// "properties": {
1800 /// "data": {
1801 /// "type": "object",
1802 /// "required": [
1803 /// "cooldown",
1804 /// "surveys"
1805 /// ],
1806 /// "properties": {
1807 /// "cooldown": {
1808 /// "$ref": "#/components/schemas/Cooldown"
1809 /// },
1810 /// "surveys": {
1811 /// "description": "Surveys created by this action.",
1812 /// "type": "array",
1813 /// "items": {
1814 /// "$ref": "#/components/schemas/Survey"
1815 /// }
1816 /// }
1817 /// }
1818 /// }
1819 /// }
1820 ///}
1821 /// ```
1822 /// </details>
1823 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1824 pub struct CreateSurveyResponse {
1825 pub data: CreateSurveyResponseData,
1826 }
1827 ///`CreateSurveyResponseData`
1828 ///
1829 /// <details><summary>JSON schema</summary>
1830 ///
1831 /// ```json
1832 ///{
1833 /// "type": "object",
1834 /// "required": [
1835 /// "cooldown",
1836 /// "surveys"
1837 /// ],
1838 /// "properties": {
1839 /// "cooldown": {
1840 /// "$ref": "#/components/schemas/Cooldown"
1841 /// },
1842 /// "surveys": {
1843 /// "description": "Surveys created by this action.",
1844 /// "type": "array",
1845 /// "items": {
1846 /// "$ref": "#/components/schemas/Survey"
1847 /// }
1848 /// }
1849 /// }
1850 ///}
1851 /// ```
1852 /// </details>
1853 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1854 pub struct CreateSurveyResponseData {
1855 pub cooldown: Cooldown,
1856 ///Surveys created by this action.
1857 pub surveys: ::std::vec::Vec<Survey>,
1858 }
1859 ///`DeliverContractBody`
1860 ///
1861 /// <details><summary>JSON schema</summary>
1862 ///
1863 /// ```json
1864 ///{
1865 /// "type": "object",
1866 /// "required": [
1867 /// "shipSymbol",
1868 /// "tradeSymbol",
1869 /// "units"
1870 /// ],
1871 /// "properties": {
1872 /// "shipSymbol": {
1873 /// "description": "Symbol of a ship located in the destination to deliver a contract and that has a good to deliver in its cargo.",
1874 /// "type": "string"
1875 /// },
1876 /// "tradeSymbol": {
1877 /// "description": "The symbol of the good to deliver.",
1878 /// "examples": [
1879 /// "IRON_ORE"
1880 /// ],
1881 /// "type": "string"
1882 /// },
1883 /// "units": {
1884 /// "description": "Amount of units to deliver.",
1885 /// "examples": [
1886 /// 10
1887 /// ],
1888 /// "type": "integer",
1889 /// "minimum": 1.0
1890 /// }
1891 /// }
1892 ///}
1893 /// ```
1894 /// </details>
1895 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1896 pub struct DeliverContractBody {
1897 ///Symbol of a ship located in the destination to deliver a contract and that has a good to deliver in its cargo.
1898 #[serde(rename = "shipSymbol")]
1899 pub ship_symbol: ::std::string::String,
1900 ///The symbol of the good to deliver.
1901 #[serde(rename = "tradeSymbol")]
1902 pub trade_symbol: ::std::string::String,
1903 ///Amount of units to deliver.
1904 pub units: ::std::num::NonZeroU64,
1905 }
1906 ///Successfully delivered cargo to contract.
1907 ///
1908 /// <details><summary>JSON schema</summary>
1909 ///
1910 /// ```json
1911 ///{
1912 /// "description": "Successfully delivered cargo to contract.",
1913 /// "type": "object",
1914 /// "required": [
1915 /// "data"
1916 /// ],
1917 /// "properties": {
1918 /// "data": {
1919 /// "type": "object",
1920 /// "required": [
1921 /// "cargo",
1922 /// "contract"
1923 /// ],
1924 /// "properties": {
1925 /// "cargo": {
1926 /// "$ref": "#/components/schemas/ShipCargo"
1927 /// },
1928 /// "contract": {
1929 /// "$ref": "#/components/schemas/Contract"
1930 /// }
1931 /// }
1932 /// }
1933 /// }
1934 ///}
1935 /// ```
1936 /// </details>
1937 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1938 pub struct DeliverContractResponse {
1939 pub data: DeliverContractResponseData,
1940 }
1941 ///`DeliverContractResponseData`
1942 ///
1943 /// <details><summary>JSON schema</summary>
1944 ///
1945 /// ```json
1946 ///{
1947 /// "type": "object",
1948 /// "required": [
1949 /// "cargo",
1950 /// "contract"
1951 /// ],
1952 /// "properties": {
1953 /// "cargo": {
1954 /// "$ref": "#/components/schemas/ShipCargo"
1955 /// },
1956 /// "contract": {
1957 /// "$ref": "#/components/schemas/Contract"
1958 /// }
1959 /// }
1960 ///}
1961 /// ```
1962 /// </details>
1963 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1964 pub struct DeliverContractResponseData {
1965 pub cargo: ShipCargo,
1966 pub contract: Contract,
1967 }
1968 ///The ship has successfully docked at its current location.
1969 ///
1970 /// <details><summary>JSON schema</summary>
1971 ///
1972 /// ```json
1973 ///{
1974 /// "title": "Dock Ship 200 Response",
1975 /// "description": "The ship has successfully docked at its current location.",
1976 /// "type": "object",
1977 /// "required": [
1978 /// "data"
1979 /// ],
1980 /// "properties": {
1981 /// "data": {
1982 /// "type": "object",
1983 /// "required": [
1984 /// "nav"
1985 /// ],
1986 /// "properties": {
1987 /// "nav": {
1988 /// "$ref": "#/components/schemas/ShipNav"
1989 /// }
1990 /// }
1991 /// }
1992 /// }
1993 ///}
1994 /// ```
1995 /// </details>
1996 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1997 pub struct DockShip200Response {
1998 pub data: DockShip200ResponseData,
1999 }
2000 ///`DockShip200ResponseData`
2001 ///
2002 /// <details><summary>JSON schema</summary>
2003 ///
2004 /// ```json
2005 ///{
2006 /// "type": "object",
2007 /// "required": [
2008 /// "nav"
2009 /// ],
2010 /// "properties": {
2011 /// "nav": {
2012 /// "$ref": "#/components/schemas/ShipNav"
2013 /// }
2014 /// }
2015 ///}
2016 /// ```
2017 /// </details>
2018 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2019 pub struct DockShip200ResponseData {
2020 pub nav: ShipNav,
2021 }
2022 ///Successfully extracted resources.
2023 ///
2024 /// <details><summary>JSON schema</summary>
2025 ///
2026 /// ```json
2027 ///{
2028 /// "description": "Successfully extracted resources.",
2029 /// "type": "object",
2030 /// "required": [
2031 /// "data"
2032 /// ],
2033 /// "properties": {
2034 /// "data": {
2035 /// "type": "object",
2036 /// "required": [
2037 /// "cargo",
2038 /// "cooldown",
2039 /// "events",
2040 /// "extraction"
2041 /// ],
2042 /// "properties": {
2043 /// "cargo": {
2044 /// "$ref": "#/components/schemas/ShipCargo"
2045 /// },
2046 /// "cooldown": {
2047 /// "$ref": "#/components/schemas/Cooldown"
2048 /// },
2049 /// "events": {
2050 /// "type": "array",
2051 /// "items": {
2052 /// "$ref": "#/components/schemas/ShipConditionEvent"
2053 /// }
2054 /// },
2055 /// "extraction": {
2056 /// "$ref": "#/components/schemas/Extraction"
2057 /// },
2058 /// "modifiers": {
2059 /// "type": "array",
2060 /// "items": {
2061 /// "$ref": "#/components/schemas/WaypointModifier"
2062 /// }
2063 /// }
2064 /// }
2065 /// }
2066 /// }
2067 ///}
2068 /// ```
2069 /// </details>
2070 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2071 pub struct ExtractResourcesResponse {
2072 pub data: ExtractResourcesResponseData,
2073 }
2074 ///`ExtractResourcesResponseData`
2075 ///
2076 /// <details><summary>JSON schema</summary>
2077 ///
2078 /// ```json
2079 ///{
2080 /// "type": "object",
2081 /// "required": [
2082 /// "cargo",
2083 /// "cooldown",
2084 /// "events",
2085 /// "extraction"
2086 /// ],
2087 /// "properties": {
2088 /// "cargo": {
2089 /// "$ref": "#/components/schemas/ShipCargo"
2090 /// },
2091 /// "cooldown": {
2092 /// "$ref": "#/components/schemas/Cooldown"
2093 /// },
2094 /// "events": {
2095 /// "type": "array",
2096 /// "items": {
2097 /// "$ref": "#/components/schemas/ShipConditionEvent"
2098 /// }
2099 /// },
2100 /// "extraction": {
2101 /// "$ref": "#/components/schemas/Extraction"
2102 /// },
2103 /// "modifiers": {
2104 /// "type": "array",
2105 /// "items": {
2106 /// "$ref": "#/components/schemas/WaypointModifier"
2107 /// }
2108 /// }
2109 /// }
2110 ///}
2111 /// ```
2112 /// </details>
2113 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2114 pub struct ExtractResourcesResponseData {
2115 pub cargo: ShipCargo,
2116 pub cooldown: Cooldown,
2117 pub events: ::std::vec::Vec<ShipConditionEvent>,
2118 pub extraction: Extraction,
2119 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2120 pub modifiers: ::std::vec::Vec<WaypointModifier>,
2121 }
2122 ///Successfully extracted resources.
2123 ///
2124 /// <details><summary>JSON schema</summary>
2125 ///
2126 /// ```json
2127 ///{
2128 /// "description": "Successfully extracted resources.",
2129 /// "type": "object",
2130 /// "required": [
2131 /// "data"
2132 /// ],
2133 /// "properties": {
2134 /// "data": {
2135 /// "type": "object",
2136 /// "required": [
2137 /// "cargo",
2138 /// "cooldown",
2139 /// "events",
2140 /// "extraction"
2141 /// ],
2142 /// "properties": {
2143 /// "cargo": {
2144 /// "$ref": "#/components/schemas/ShipCargo"
2145 /// },
2146 /// "cooldown": {
2147 /// "$ref": "#/components/schemas/Cooldown"
2148 /// },
2149 /// "events": {
2150 /// "type": "array",
2151 /// "items": {
2152 /// "$ref": "#/components/schemas/ShipConditionEvent"
2153 /// }
2154 /// },
2155 /// "extraction": {
2156 /// "$ref": "#/components/schemas/Extraction"
2157 /// },
2158 /// "modifiers": {
2159 /// "type": "array",
2160 /// "items": {
2161 /// "$ref": "#/components/schemas/WaypointModifier"
2162 /// }
2163 /// }
2164 /// }
2165 /// }
2166 /// }
2167 ///}
2168 /// ```
2169 /// </details>
2170 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2171 pub struct ExtractResourcesWithSurveyResponse {
2172 pub data: ExtractResourcesWithSurveyResponseData,
2173 }
2174 ///`ExtractResourcesWithSurveyResponseData`
2175 ///
2176 /// <details><summary>JSON schema</summary>
2177 ///
2178 /// ```json
2179 ///{
2180 /// "type": "object",
2181 /// "required": [
2182 /// "cargo",
2183 /// "cooldown",
2184 /// "events",
2185 /// "extraction"
2186 /// ],
2187 /// "properties": {
2188 /// "cargo": {
2189 /// "$ref": "#/components/schemas/ShipCargo"
2190 /// },
2191 /// "cooldown": {
2192 /// "$ref": "#/components/schemas/Cooldown"
2193 /// },
2194 /// "events": {
2195 /// "type": "array",
2196 /// "items": {
2197 /// "$ref": "#/components/schemas/ShipConditionEvent"
2198 /// }
2199 /// },
2200 /// "extraction": {
2201 /// "$ref": "#/components/schemas/Extraction"
2202 /// },
2203 /// "modifiers": {
2204 /// "type": "array",
2205 /// "items": {
2206 /// "$ref": "#/components/schemas/WaypointModifier"
2207 /// }
2208 /// }
2209 /// }
2210 ///}
2211 /// ```
2212 /// </details>
2213 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2214 pub struct ExtractResourcesWithSurveyResponseData {
2215 pub cargo: ShipCargo,
2216 pub cooldown: Cooldown,
2217 pub events: ::std::vec::Vec<ShipConditionEvent>,
2218 pub extraction: Extraction,
2219 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2220 pub modifiers: ::std::vec::Vec<WaypointModifier>,
2221 }
2222 ///Extraction details.
2223 ///
2224 /// <details><summary>JSON schema</summary>
2225 ///
2226 /// ```json
2227 ///{
2228 /// "description": "Extraction details.",
2229 /// "type": "object",
2230 /// "required": [
2231 /// "shipSymbol",
2232 /// "yield"
2233 /// ],
2234 /// "properties": {
2235 /// "shipSymbol": {
2236 /// "description": "Symbol of the ship that executed the extraction.",
2237 /// "type": "string",
2238 /// "minLength": 1
2239 /// },
2240 /// "yield": {
2241 /// "$ref": "#/components/schemas/ExtractionYield"
2242 /// }
2243 /// }
2244 ///}
2245 /// ```
2246 /// </details>
2247 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2248 pub struct Extraction {
2249 ///Symbol of the ship that executed the extraction.
2250 #[serde(rename = "shipSymbol")]
2251 pub ship_symbol: ExtractionShipSymbol,
2252 #[serde(rename = "yield")]
2253 pub yield_: ExtractionYield,
2254 }
2255 ///Symbol of the ship that executed the extraction.
2256 ///
2257 /// <details><summary>JSON schema</summary>
2258 ///
2259 /// ```json
2260 ///{
2261 /// "description": "Symbol of the ship that executed the extraction.",
2262 /// "type": "string",
2263 /// "minLength": 1
2264 ///}
2265 /// ```
2266 /// </details>
2267 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2268 #[serde(transparent)]
2269 pub struct ExtractionShipSymbol(::std::string::String);
2270 impl ::std::ops::Deref for ExtractionShipSymbol {
2271 type Target = ::std::string::String;
2272 fn deref(&self) -> &::std::string::String {
2273 &self.0
2274 }
2275 }
2276 impl ::std::convert::From<ExtractionShipSymbol> for ::std::string::String {
2277 fn from(value: ExtractionShipSymbol) -> Self {
2278 value.0
2279 }
2280 }
2281 impl ::std::str::FromStr for ExtractionShipSymbol {
2282 type Err = self::error::ConversionError;
2283 fn from_str(
2284 value: &str,
2285 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2286 if value.chars().count() < 1usize {
2287 return Err("shorter than 1 characters".into());
2288 }
2289 Ok(Self(value.to_string()))
2290 }
2291 }
2292 impl ::std::convert::TryFrom<&str> for ExtractionShipSymbol {
2293 type Error = self::error::ConversionError;
2294 fn try_from(
2295 value: &str,
2296 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2297 value.parse()
2298 }
2299 }
2300 impl ::std::convert::TryFrom<&::std::string::String> for ExtractionShipSymbol {
2301 type Error = self::error::ConversionError;
2302 fn try_from(
2303 value: &::std::string::String,
2304 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2305 value.parse()
2306 }
2307 }
2308 impl ::std::convert::TryFrom<::std::string::String> for ExtractionShipSymbol {
2309 type Error = self::error::ConversionError;
2310 fn try_from(
2311 value: ::std::string::String,
2312 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2313 value.parse()
2314 }
2315 }
2316 impl<'de> ::serde::Deserialize<'de> for ExtractionShipSymbol {
2317 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2318 where
2319 D: ::serde::Deserializer<'de>,
2320 {
2321 ::std::string::String::deserialize(deserializer)?
2322 .parse()
2323 .map_err(|e: self::error::ConversionError| {
2324 <D::Error as ::serde::de::Error>::custom(e.to_string())
2325 })
2326 }
2327 }
2328 ///A yield from the extraction operation.
2329 ///
2330 /// <details><summary>JSON schema</summary>
2331 ///
2332 /// ```json
2333 ///{
2334 /// "description": "A yield from the extraction operation.",
2335 /// "type": "object",
2336 /// "required": [
2337 /// "symbol",
2338 /// "units"
2339 /// ],
2340 /// "properties": {
2341 /// "symbol": {
2342 /// "$ref": "#/components/schemas/TradeSymbol"
2343 /// },
2344 /// "units": {
2345 /// "description": "The number of units extracted that were placed into the ship's cargo hold.",
2346 /// "type": "integer"
2347 /// }
2348 /// }
2349 ///}
2350 /// ```
2351 /// </details>
2352 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2353 pub struct ExtractionYield {
2354 pub symbol: TradeSymbol,
2355 ///The number of units extracted that were placed into the ship's cargo hold.
2356 pub units: i64,
2357 }
2358 ///Faction details.
2359 ///
2360 /// <details><summary>JSON schema</summary>
2361 ///
2362 /// ```json
2363 ///{
2364 /// "description": "Faction details.",
2365 /// "type": "object",
2366 /// "required": [
2367 /// "description",
2368 /// "isRecruiting",
2369 /// "name",
2370 /// "symbol",
2371 /// "traits"
2372 /// ],
2373 /// "properties": {
2374 /// "description": {
2375 /// "description": "Description of the faction.",
2376 /// "type": "string",
2377 /// "minLength": 1
2378 /// },
2379 /// "headquarters": {
2380 /// "description": "The waypoint in which the faction's HQ is located in.",
2381 /// "type": "string",
2382 /// "minLength": 1
2383 /// },
2384 /// "isRecruiting": {
2385 /// "description": "Whether or not the faction is currently recruiting new agents.",
2386 /// "type": "boolean"
2387 /// },
2388 /// "name": {
2389 /// "description": "Name of the faction.",
2390 /// "type": "string",
2391 /// "minLength": 1
2392 /// },
2393 /// "symbol": {
2394 /// "$ref": "#/components/schemas/FactionSymbol"
2395 /// },
2396 /// "traits": {
2397 /// "description": "List of traits that define this faction.",
2398 /// "type": "array",
2399 /// "items": {
2400 /// "$ref": "#/components/schemas/FactionTrait"
2401 /// }
2402 /// }
2403 /// }
2404 ///}
2405 /// ```
2406 /// </details>
2407 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2408 pub struct Faction {
2409 ///Description of the faction.
2410 pub description: FactionDescription,
2411 ///The waypoint in which the faction's HQ is located in.
2412 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2413 pub headquarters: ::std::option::Option<FactionHeadquarters>,
2414 ///Whether or not the faction is currently recruiting new agents.
2415 #[serde(rename = "isRecruiting")]
2416 pub is_recruiting: bool,
2417 ///Name of the faction.
2418 pub name: FactionName,
2419 pub symbol: FactionSymbol,
2420 ///List of traits that define this faction.
2421 pub traits: ::std::vec::Vec<FactionTrait>,
2422 }
2423 ///Description of the faction.
2424 ///
2425 /// <details><summary>JSON schema</summary>
2426 ///
2427 /// ```json
2428 ///{
2429 /// "description": "Description of the faction.",
2430 /// "type": "string",
2431 /// "minLength": 1
2432 ///}
2433 /// ```
2434 /// </details>
2435 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2436 #[serde(transparent)]
2437 pub struct FactionDescription(::std::string::String);
2438 impl ::std::ops::Deref for FactionDescription {
2439 type Target = ::std::string::String;
2440 fn deref(&self) -> &::std::string::String {
2441 &self.0
2442 }
2443 }
2444 impl ::std::convert::From<FactionDescription> for ::std::string::String {
2445 fn from(value: FactionDescription) -> Self {
2446 value.0
2447 }
2448 }
2449 impl ::std::str::FromStr for FactionDescription {
2450 type Err = self::error::ConversionError;
2451 fn from_str(
2452 value: &str,
2453 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2454 if value.chars().count() < 1usize {
2455 return Err("shorter than 1 characters".into());
2456 }
2457 Ok(Self(value.to_string()))
2458 }
2459 }
2460 impl ::std::convert::TryFrom<&str> for FactionDescription {
2461 type Error = self::error::ConversionError;
2462 fn try_from(
2463 value: &str,
2464 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2465 value.parse()
2466 }
2467 }
2468 impl ::std::convert::TryFrom<&::std::string::String> for FactionDescription {
2469 type Error = self::error::ConversionError;
2470 fn try_from(
2471 value: &::std::string::String,
2472 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2473 value.parse()
2474 }
2475 }
2476 impl ::std::convert::TryFrom<::std::string::String> for FactionDescription {
2477 type Error = self::error::ConversionError;
2478 fn try_from(
2479 value: ::std::string::String,
2480 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2481 value.parse()
2482 }
2483 }
2484 impl<'de> ::serde::Deserialize<'de> for FactionDescription {
2485 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2486 where
2487 D: ::serde::Deserializer<'de>,
2488 {
2489 ::std::string::String::deserialize(deserializer)?
2490 .parse()
2491 .map_err(|e: self::error::ConversionError| {
2492 <D::Error as ::serde::de::Error>::custom(e.to_string())
2493 })
2494 }
2495 }
2496 ///The waypoint in which the faction's HQ is located in.
2497 ///
2498 /// <details><summary>JSON schema</summary>
2499 ///
2500 /// ```json
2501 ///{
2502 /// "description": "The waypoint in which the faction's HQ is located in.",
2503 /// "type": "string",
2504 /// "minLength": 1
2505 ///}
2506 /// ```
2507 /// </details>
2508 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2509 #[serde(transparent)]
2510 pub struct FactionHeadquarters(::std::string::String);
2511 impl ::std::ops::Deref for FactionHeadquarters {
2512 type Target = ::std::string::String;
2513 fn deref(&self) -> &::std::string::String {
2514 &self.0
2515 }
2516 }
2517 impl ::std::convert::From<FactionHeadquarters> for ::std::string::String {
2518 fn from(value: FactionHeadquarters) -> Self {
2519 value.0
2520 }
2521 }
2522 impl ::std::str::FromStr for FactionHeadquarters {
2523 type Err = self::error::ConversionError;
2524 fn from_str(
2525 value: &str,
2526 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2527 if value.chars().count() < 1usize {
2528 return Err("shorter than 1 characters".into());
2529 }
2530 Ok(Self(value.to_string()))
2531 }
2532 }
2533 impl ::std::convert::TryFrom<&str> for FactionHeadquarters {
2534 type Error = self::error::ConversionError;
2535 fn try_from(
2536 value: &str,
2537 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2538 value.parse()
2539 }
2540 }
2541 impl ::std::convert::TryFrom<&::std::string::String> for FactionHeadquarters {
2542 type Error = self::error::ConversionError;
2543 fn try_from(
2544 value: &::std::string::String,
2545 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2546 value.parse()
2547 }
2548 }
2549 impl ::std::convert::TryFrom<::std::string::String> for FactionHeadquarters {
2550 type Error = self::error::ConversionError;
2551 fn try_from(
2552 value: ::std::string::String,
2553 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2554 value.parse()
2555 }
2556 }
2557 impl<'de> ::serde::Deserialize<'de> for FactionHeadquarters {
2558 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2559 where
2560 D: ::serde::Deserializer<'de>,
2561 {
2562 ::std::string::String::deserialize(deserializer)?
2563 .parse()
2564 .map_err(|e: self::error::ConversionError| {
2565 <D::Error as ::serde::de::Error>::custom(e.to_string())
2566 })
2567 }
2568 }
2569 ///Name of the faction.
2570 ///
2571 /// <details><summary>JSON schema</summary>
2572 ///
2573 /// ```json
2574 ///{
2575 /// "description": "Name of the faction.",
2576 /// "type": "string",
2577 /// "minLength": 1
2578 ///}
2579 /// ```
2580 /// </details>
2581 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2582 #[serde(transparent)]
2583 pub struct FactionName(::std::string::String);
2584 impl ::std::ops::Deref for FactionName {
2585 type Target = ::std::string::String;
2586 fn deref(&self) -> &::std::string::String {
2587 &self.0
2588 }
2589 }
2590 impl ::std::convert::From<FactionName> for ::std::string::String {
2591 fn from(value: FactionName) -> Self {
2592 value.0
2593 }
2594 }
2595 impl ::std::str::FromStr for FactionName {
2596 type Err = self::error::ConversionError;
2597 fn from_str(
2598 value: &str,
2599 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2600 if value.chars().count() < 1usize {
2601 return Err("shorter than 1 characters".into());
2602 }
2603 Ok(Self(value.to_string()))
2604 }
2605 }
2606 impl ::std::convert::TryFrom<&str> for FactionName {
2607 type Error = self::error::ConversionError;
2608 fn try_from(
2609 value: &str,
2610 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2611 value.parse()
2612 }
2613 }
2614 impl ::std::convert::TryFrom<&::std::string::String> for FactionName {
2615 type Error = self::error::ConversionError;
2616 fn try_from(
2617 value: &::std::string::String,
2618 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2619 value.parse()
2620 }
2621 }
2622 impl ::std::convert::TryFrom<::std::string::String> for FactionName {
2623 type Error = self::error::ConversionError;
2624 fn try_from(
2625 value: ::std::string::String,
2626 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2627 value.parse()
2628 }
2629 }
2630 impl<'de> ::serde::Deserialize<'de> for FactionName {
2631 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2632 where
2633 D: ::serde::Deserializer<'de>,
2634 {
2635 ::std::string::String::deserialize(deserializer)?
2636 .parse()
2637 .map_err(|e: self::error::ConversionError| {
2638 <D::Error as ::serde::de::Error>::custom(e.to_string())
2639 })
2640 }
2641 }
2642 ///The symbol of the faction.
2643 ///
2644 /// <details><summary>JSON schema</summary>
2645 ///
2646 /// ```json
2647 ///{
2648 /// "description": "The symbol of the faction.",
2649 /// "type": "string",
2650 /// "enum": [
2651 /// "COSMIC",
2652 /// "VOID",
2653 /// "GALACTIC",
2654 /// "QUANTUM",
2655 /// "DOMINION",
2656 /// "ASTRO",
2657 /// "CORSAIRS",
2658 /// "OBSIDIAN",
2659 /// "AEGIS",
2660 /// "UNITED",
2661 /// "SOLITARY",
2662 /// "COBALT",
2663 /// "OMEGA",
2664 /// "ECHO",
2665 /// "LORDS",
2666 /// "CULT",
2667 /// "ANCIENTS",
2668 /// "SHADOW",
2669 /// "ETHEREAL"
2670 /// ]
2671 ///}
2672 /// ```
2673 /// </details>
2674 #[derive(
2675 ::serde::Deserialize,
2676 ::serde::Serialize,
2677 Clone,
2678 Copy,
2679 Debug,
2680 Eq,
2681 Hash,
2682 Ord,
2683 PartialEq,
2684 PartialOrd
2685 )]
2686 pub enum FactionSymbol {
2687 #[serde(rename = "COSMIC")]
2688 Cosmic,
2689 #[serde(rename = "VOID")]
2690 Void,
2691 #[serde(rename = "GALACTIC")]
2692 Galactic,
2693 #[serde(rename = "QUANTUM")]
2694 Quantum,
2695 #[serde(rename = "DOMINION")]
2696 Dominion,
2697 #[serde(rename = "ASTRO")]
2698 Astro,
2699 #[serde(rename = "CORSAIRS")]
2700 Corsairs,
2701 #[serde(rename = "OBSIDIAN")]
2702 Obsidian,
2703 #[serde(rename = "AEGIS")]
2704 Aegis,
2705 #[serde(rename = "UNITED")]
2706 United,
2707 #[serde(rename = "SOLITARY")]
2708 Solitary,
2709 #[serde(rename = "COBALT")]
2710 Cobalt,
2711 #[serde(rename = "OMEGA")]
2712 Omega,
2713 #[serde(rename = "ECHO")]
2714 Echo,
2715 #[serde(rename = "LORDS")]
2716 Lords,
2717 #[serde(rename = "CULT")]
2718 Cult,
2719 #[serde(rename = "ANCIENTS")]
2720 Ancients,
2721 #[serde(rename = "SHADOW")]
2722 Shadow,
2723 #[serde(rename = "ETHEREAL")]
2724 Ethereal,
2725 }
2726 impl ::std::fmt::Display for FactionSymbol {
2727 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2728 match *self {
2729 Self::Cosmic => f.write_str("COSMIC"),
2730 Self::Void => f.write_str("VOID"),
2731 Self::Galactic => f.write_str("GALACTIC"),
2732 Self::Quantum => f.write_str("QUANTUM"),
2733 Self::Dominion => f.write_str("DOMINION"),
2734 Self::Astro => f.write_str("ASTRO"),
2735 Self::Corsairs => f.write_str("CORSAIRS"),
2736 Self::Obsidian => f.write_str("OBSIDIAN"),
2737 Self::Aegis => f.write_str("AEGIS"),
2738 Self::United => f.write_str("UNITED"),
2739 Self::Solitary => f.write_str("SOLITARY"),
2740 Self::Cobalt => f.write_str("COBALT"),
2741 Self::Omega => f.write_str("OMEGA"),
2742 Self::Echo => f.write_str("ECHO"),
2743 Self::Lords => f.write_str("LORDS"),
2744 Self::Cult => f.write_str("CULT"),
2745 Self::Ancients => f.write_str("ANCIENTS"),
2746 Self::Shadow => f.write_str("SHADOW"),
2747 Self::Ethereal => f.write_str("ETHEREAL"),
2748 }
2749 }
2750 }
2751 impl ::std::str::FromStr for FactionSymbol {
2752 type Err = self::error::ConversionError;
2753 fn from_str(
2754 value: &str,
2755 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2756 match value {
2757 "COSMIC" => Ok(Self::Cosmic),
2758 "VOID" => Ok(Self::Void),
2759 "GALACTIC" => Ok(Self::Galactic),
2760 "QUANTUM" => Ok(Self::Quantum),
2761 "DOMINION" => Ok(Self::Dominion),
2762 "ASTRO" => Ok(Self::Astro),
2763 "CORSAIRS" => Ok(Self::Corsairs),
2764 "OBSIDIAN" => Ok(Self::Obsidian),
2765 "AEGIS" => Ok(Self::Aegis),
2766 "UNITED" => Ok(Self::United),
2767 "SOLITARY" => Ok(Self::Solitary),
2768 "COBALT" => Ok(Self::Cobalt),
2769 "OMEGA" => Ok(Self::Omega),
2770 "ECHO" => Ok(Self::Echo),
2771 "LORDS" => Ok(Self::Lords),
2772 "CULT" => Ok(Self::Cult),
2773 "ANCIENTS" => Ok(Self::Ancients),
2774 "SHADOW" => Ok(Self::Shadow),
2775 "ETHEREAL" => Ok(Self::Ethereal),
2776 _ => Err("invalid value".into()),
2777 }
2778 }
2779 }
2780 impl ::std::convert::TryFrom<&str> for FactionSymbol {
2781 type Error = self::error::ConversionError;
2782 fn try_from(
2783 value: &str,
2784 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2785 value.parse()
2786 }
2787 }
2788 impl ::std::convert::TryFrom<&::std::string::String> for FactionSymbol {
2789 type Error = self::error::ConversionError;
2790 fn try_from(
2791 value: &::std::string::String,
2792 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2793 value.parse()
2794 }
2795 }
2796 impl ::std::convert::TryFrom<::std::string::String> for FactionSymbol {
2797 type Error = self::error::ConversionError;
2798 fn try_from(
2799 value: ::std::string::String,
2800 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2801 value.parse()
2802 }
2803 }
2804 ///`FactionTrait`
2805 ///
2806 /// <details><summary>JSON schema</summary>
2807 ///
2808 /// ```json
2809 ///{
2810 /// "type": "object",
2811 /// "required": [
2812 /// "description",
2813 /// "name",
2814 /// "symbol"
2815 /// ],
2816 /// "properties": {
2817 /// "description": {
2818 /// "description": "A description of the trait.",
2819 /// "type": "string"
2820 /// },
2821 /// "name": {
2822 /// "description": "The name of the trait.",
2823 /// "type": "string"
2824 /// },
2825 /// "symbol": {
2826 /// "$ref": "#/components/schemas/FactionTraitSymbol"
2827 /// }
2828 /// }
2829 ///}
2830 /// ```
2831 /// </details>
2832 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2833 pub struct FactionTrait {
2834 ///A description of the trait.
2835 pub description: ::std::string::String,
2836 ///The name of the trait.
2837 pub name: ::std::string::String,
2838 pub symbol: FactionTraitSymbol,
2839 }
2840 ///The unique identifier of the trait.
2841 ///
2842 /// <details><summary>JSON schema</summary>
2843 ///
2844 /// ```json
2845 ///{
2846 /// "description": "The unique identifier of the trait.",
2847 /// "type": "string",
2848 /// "enum": [
2849 /// "BUREAUCRATIC",
2850 /// "SECRETIVE",
2851 /// "CAPITALISTIC",
2852 /// "INDUSTRIOUS",
2853 /// "PEACEFUL",
2854 /// "DISTRUSTFUL",
2855 /// "WELCOMING",
2856 /// "SMUGGLERS",
2857 /// "SCAVENGERS",
2858 /// "REBELLIOUS",
2859 /// "EXILES",
2860 /// "PIRATES",
2861 /// "RAIDERS",
2862 /// "CLAN",
2863 /// "GUILD",
2864 /// "DOMINION",
2865 /// "FRINGE",
2866 /// "FORSAKEN",
2867 /// "ISOLATED",
2868 /// "LOCALIZED",
2869 /// "ESTABLISHED",
2870 /// "NOTABLE",
2871 /// "DOMINANT",
2872 /// "INESCAPABLE",
2873 /// "INNOVATIVE",
2874 /// "BOLD",
2875 /// "VISIONARY",
2876 /// "CURIOUS",
2877 /// "DARING",
2878 /// "EXPLORATORY",
2879 /// "RESOURCEFUL",
2880 /// "FLEXIBLE",
2881 /// "COOPERATIVE",
2882 /// "UNITED",
2883 /// "STRATEGIC",
2884 /// "INTELLIGENT",
2885 /// "RESEARCH_FOCUSED",
2886 /// "COLLABORATIVE",
2887 /// "PROGRESSIVE",
2888 /// "MILITARISTIC",
2889 /// "TECHNOLOGICALLY_ADVANCED",
2890 /// "AGGRESSIVE",
2891 /// "IMPERIALISTIC",
2892 /// "TREASURE_HUNTERS",
2893 /// "DEXTEROUS",
2894 /// "UNPREDICTABLE",
2895 /// "BRUTAL",
2896 /// "FLEETING",
2897 /// "ADAPTABLE",
2898 /// "SELF_SUFFICIENT",
2899 /// "DEFENSIVE",
2900 /// "PROUD",
2901 /// "DIVERSE",
2902 /// "INDEPENDENT",
2903 /// "SELF_INTERESTED",
2904 /// "FRAGMENTED",
2905 /// "COMMERCIAL",
2906 /// "FREE_MARKETS",
2907 /// "ENTREPRENEURIAL"
2908 /// ]
2909 ///}
2910 /// ```
2911 /// </details>
2912 #[derive(
2913 ::serde::Deserialize,
2914 ::serde::Serialize,
2915 Clone,
2916 Copy,
2917 Debug,
2918 Eq,
2919 Hash,
2920 Ord,
2921 PartialEq,
2922 PartialOrd
2923 )]
2924 pub enum FactionTraitSymbol {
2925 #[serde(rename = "BUREAUCRATIC")]
2926 Bureaucratic,
2927 #[serde(rename = "SECRETIVE")]
2928 Secretive,
2929 #[serde(rename = "CAPITALISTIC")]
2930 Capitalistic,
2931 #[serde(rename = "INDUSTRIOUS")]
2932 Industrious,
2933 #[serde(rename = "PEACEFUL")]
2934 Peaceful,
2935 #[serde(rename = "DISTRUSTFUL")]
2936 Distrustful,
2937 #[serde(rename = "WELCOMING")]
2938 Welcoming,
2939 #[serde(rename = "SMUGGLERS")]
2940 Smugglers,
2941 #[serde(rename = "SCAVENGERS")]
2942 Scavengers,
2943 #[serde(rename = "REBELLIOUS")]
2944 Rebellious,
2945 #[serde(rename = "EXILES")]
2946 Exiles,
2947 #[serde(rename = "PIRATES")]
2948 Pirates,
2949 #[serde(rename = "RAIDERS")]
2950 Raiders,
2951 #[serde(rename = "CLAN")]
2952 Clan,
2953 #[serde(rename = "GUILD")]
2954 Guild,
2955 #[serde(rename = "DOMINION")]
2956 Dominion,
2957 #[serde(rename = "FRINGE")]
2958 Fringe,
2959 #[serde(rename = "FORSAKEN")]
2960 Forsaken,
2961 #[serde(rename = "ISOLATED")]
2962 Isolated,
2963 #[serde(rename = "LOCALIZED")]
2964 Localized,
2965 #[serde(rename = "ESTABLISHED")]
2966 Established,
2967 #[serde(rename = "NOTABLE")]
2968 Notable,
2969 #[serde(rename = "DOMINANT")]
2970 Dominant,
2971 #[serde(rename = "INESCAPABLE")]
2972 Inescapable,
2973 #[serde(rename = "INNOVATIVE")]
2974 Innovative,
2975 #[serde(rename = "BOLD")]
2976 Bold,
2977 #[serde(rename = "VISIONARY")]
2978 Visionary,
2979 #[serde(rename = "CURIOUS")]
2980 Curious,
2981 #[serde(rename = "DARING")]
2982 Daring,
2983 #[serde(rename = "EXPLORATORY")]
2984 Exploratory,
2985 #[serde(rename = "RESOURCEFUL")]
2986 Resourceful,
2987 #[serde(rename = "FLEXIBLE")]
2988 Flexible,
2989 #[serde(rename = "COOPERATIVE")]
2990 Cooperative,
2991 #[serde(rename = "UNITED")]
2992 United,
2993 #[serde(rename = "STRATEGIC")]
2994 Strategic,
2995 #[serde(rename = "INTELLIGENT")]
2996 Intelligent,
2997 #[serde(rename = "RESEARCH_FOCUSED")]
2998 ResearchFocused,
2999 #[serde(rename = "COLLABORATIVE")]
3000 Collaborative,
3001 #[serde(rename = "PROGRESSIVE")]
3002 Progressive,
3003 #[serde(rename = "MILITARISTIC")]
3004 Militaristic,
3005 #[serde(rename = "TECHNOLOGICALLY_ADVANCED")]
3006 TechnologicallyAdvanced,
3007 #[serde(rename = "AGGRESSIVE")]
3008 Aggressive,
3009 #[serde(rename = "IMPERIALISTIC")]
3010 Imperialistic,
3011 #[serde(rename = "TREASURE_HUNTERS")]
3012 TreasureHunters,
3013 #[serde(rename = "DEXTEROUS")]
3014 Dexterous,
3015 #[serde(rename = "UNPREDICTABLE")]
3016 Unpredictable,
3017 #[serde(rename = "BRUTAL")]
3018 Brutal,
3019 #[serde(rename = "FLEETING")]
3020 Fleeting,
3021 #[serde(rename = "ADAPTABLE")]
3022 Adaptable,
3023 #[serde(rename = "SELF_SUFFICIENT")]
3024 SelfSufficient,
3025 #[serde(rename = "DEFENSIVE")]
3026 Defensive,
3027 #[serde(rename = "PROUD")]
3028 Proud,
3029 #[serde(rename = "DIVERSE")]
3030 Diverse,
3031 #[serde(rename = "INDEPENDENT")]
3032 Independent,
3033 #[serde(rename = "SELF_INTERESTED")]
3034 SelfInterested,
3035 #[serde(rename = "FRAGMENTED")]
3036 Fragmented,
3037 #[serde(rename = "COMMERCIAL")]
3038 Commercial,
3039 #[serde(rename = "FREE_MARKETS")]
3040 FreeMarkets,
3041 #[serde(rename = "ENTREPRENEURIAL")]
3042 Entrepreneurial,
3043 }
3044 impl ::std::fmt::Display for FactionTraitSymbol {
3045 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3046 match *self {
3047 Self::Bureaucratic => f.write_str("BUREAUCRATIC"),
3048 Self::Secretive => f.write_str("SECRETIVE"),
3049 Self::Capitalistic => f.write_str("CAPITALISTIC"),
3050 Self::Industrious => f.write_str("INDUSTRIOUS"),
3051 Self::Peaceful => f.write_str("PEACEFUL"),
3052 Self::Distrustful => f.write_str("DISTRUSTFUL"),
3053 Self::Welcoming => f.write_str("WELCOMING"),
3054 Self::Smugglers => f.write_str("SMUGGLERS"),
3055 Self::Scavengers => f.write_str("SCAVENGERS"),
3056 Self::Rebellious => f.write_str("REBELLIOUS"),
3057 Self::Exiles => f.write_str("EXILES"),
3058 Self::Pirates => f.write_str("PIRATES"),
3059 Self::Raiders => f.write_str("RAIDERS"),
3060 Self::Clan => f.write_str("CLAN"),
3061 Self::Guild => f.write_str("GUILD"),
3062 Self::Dominion => f.write_str("DOMINION"),
3063 Self::Fringe => f.write_str("FRINGE"),
3064 Self::Forsaken => f.write_str("FORSAKEN"),
3065 Self::Isolated => f.write_str("ISOLATED"),
3066 Self::Localized => f.write_str("LOCALIZED"),
3067 Self::Established => f.write_str("ESTABLISHED"),
3068 Self::Notable => f.write_str("NOTABLE"),
3069 Self::Dominant => f.write_str("DOMINANT"),
3070 Self::Inescapable => f.write_str("INESCAPABLE"),
3071 Self::Innovative => f.write_str("INNOVATIVE"),
3072 Self::Bold => f.write_str("BOLD"),
3073 Self::Visionary => f.write_str("VISIONARY"),
3074 Self::Curious => f.write_str("CURIOUS"),
3075 Self::Daring => f.write_str("DARING"),
3076 Self::Exploratory => f.write_str("EXPLORATORY"),
3077 Self::Resourceful => f.write_str("RESOURCEFUL"),
3078 Self::Flexible => f.write_str("FLEXIBLE"),
3079 Self::Cooperative => f.write_str("COOPERATIVE"),
3080 Self::United => f.write_str("UNITED"),
3081 Self::Strategic => f.write_str("STRATEGIC"),
3082 Self::Intelligent => f.write_str("INTELLIGENT"),
3083 Self::ResearchFocused => f.write_str("RESEARCH_FOCUSED"),
3084 Self::Collaborative => f.write_str("COLLABORATIVE"),
3085 Self::Progressive => f.write_str("PROGRESSIVE"),
3086 Self::Militaristic => f.write_str("MILITARISTIC"),
3087 Self::TechnologicallyAdvanced => f.write_str("TECHNOLOGICALLY_ADVANCED"),
3088 Self::Aggressive => f.write_str("AGGRESSIVE"),
3089 Self::Imperialistic => f.write_str("IMPERIALISTIC"),
3090 Self::TreasureHunters => f.write_str("TREASURE_HUNTERS"),
3091 Self::Dexterous => f.write_str("DEXTEROUS"),
3092 Self::Unpredictable => f.write_str("UNPREDICTABLE"),
3093 Self::Brutal => f.write_str("BRUTAL"),
3094 Self::Fleeting => f.write_str("FLEETING"),
3095 Self::Adaptable => f.write_str("ADAPTABLE"),
3096 Self::SelfSufficient => f.write_str("SELF_SUFFICIENT"),
3097 Self::Defensive => f.write_str("DEFENSIVE"),
3098 Self::Proud => f.write_str("PROUD"),
3099 Self::Diverse => f.write_str("DIVERSE"),
3100 Self::Independent => f.write_str("INDEPENDENT"),
3101 Self::SelfInterested => f.write_str("SELF_INTERESTED"),
3102 Self::Fragmented => f.write_str("FRAGMENTED"),
3103 Self::Commercial => f.write_str("COMMERCIAL"),
3104 Self::FreeMarkets => f.write_str("FREE_MARKETS"),
3105 Self::Entrepreneurial => f.write_str("ENTREPRENEURIAL"),
3106 }
3107 }
3108 }
3109 impl ::std::str::FromStr for FactionTraitSymbol {
3110 type Err = self::error::ConversionError;
3111 fn from_str(
3112 value: &str,
3113 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3114 match value {
3115 "BUREAUCRATIC" => Ok(Self::Bureaucratic),
3116 "SECRETIVE" => Ok(Self::Secretive),
3117 "CAPITALISTIC" => Ok(Self::Capitalistic),
3118 "INDUSTRIOUS" => Ok(Self::Industrious),
3119 "PEACEFUL" => Ok(Self::Peaceful),
3120 "DISTRUSTFUL" => Ok(Self::Distrustful),
3121 "WELCOMING" => Ok(Self::Welcoming),
3122 "SMUGGLERS" => Ok(Self::Smugglers),
3123 "SCAVENGERS" => Ok(Self::Scavengers),
3124 "REBELLIOUS" => Ok(Self::Rebellious),
3125 "EXILES" => Ok(Self::Exiles),
3126 "PIRATES" => Ok(Self::Pirates),
3127 "RAIDERS" => Ok(Self::Raiders),
3128 "CLAN" => Ok(Self::Clan),
3129 "GUILD" => Ok(Self::Guild),
3130 "DOMINION" => Ok(Self::Dominion),
3131 "FRINGE" => Ok(Self::Fringe),
3132 "FORSAKEN" => Ok(Self::Forsaken),
3133 "ISOLATED" => Ok(Self::Isolated),
3134 "LOCALIZED" => Ok(Self::Localized),
3135 "ESTABLISHED" => Ok(Self::Established),
3136 "NOTABLE" => Ok(Self::Notable),
3137 "DOMINANT" => Ok(Self::Dominant),
3138 "INESCAPABLE" => Ok(Self::Inescapable),
3139 "INNOVATIVE" => Ok(Self::Innovative),
3140 "BOLD" => Ok(Self::Bold),
3141 "VISIONARY" => Ok(Self::Visionary),
3142 "CURIOUS" => Ok(Self::Curious),
3143 "DARING" => Ok(Self::Daring),
3144 "EXPLORATORY" => Ok(Self::Exploratory),
3145 "RESOURCEFUL" => Ok(Self::Resourceful),
3146 "FLEXIBLE" => Ok(Self::Flexible),
3147 "COOPERATIVE" => Ok(Self::Cooperative),
3148 "UNITED" => Ok(Self::United),
3149 "STRATEGIC" => Ok(Self::Strategic),
3150 "INTELLIGENT" => Ok(Self::Intelligent),
3151 "RESEARCH_FOCUSED" => Ok(Self::ResearchFocused),
3152 "COLLABORATIVE" => Ok(Self::Collaborative),
3153 "PROGRESSIVE" => Ok(Self::Progressive),
3154 "MILITARISTIC" => Ok(Self::Militaristic),
3155 "TECHNOLOGICALLY_ADVANCED" => Ok(Self::TechnologicallyAdvanced),
3156 "AGGRESSIVE" => Ok(Self::Aggressive),
3157 "IMPERIALISTIC" => Ok(Self::Imperialistic),
3158 "TREASURE_HUNTERS" => Ok(Self::TreasureHunters),
3159 "DEXTEROUS" => Ok(Self::Dexterous),
3160 "UNPREDICTABLE" => Ok(Self::Unpredictable),
3161 "BRUTAL" => Ok(Self::Brutal),
3162 "FLEETING" => Ok(Self::Fleeting),
3163 "ADAPTABLE" => Ok(Self::Adaptable),
3164 "SELF_SUFFICIENT" => Ok(Self::SelfSufficient),
3165 "DEFENSIVE" => Ok(Self::Defensive),
3166 "PROUD" => Ok(Self::Proud),
3167 "DIVERSE" => Ok(Self::Diverse),
3168 "INDEPENDENT" => Ok(Self::Independent),
3169 "SELF_INTERESTED" => Ok(Self::SelfInterested),
3170 "FRAGMENTED" => Ok(Self::Fragmented),
3171 "COMMERCIAL" => Ok(Self::Commercial),
3172 "FREE_MARKETS" => Ok(Self::FreeMarkets),
3173 "ENTREPRENEURIAL" => Ok(Self::Entrepreneurial),
3174 _ => Err("invalid value".into()),
3175 }
3176 }
3177 }
3178 impl ::std::convert::TryFrom<&str> for FactionTraitSymbol {
3179 type Error = self::error::ConversionError;
3180 fn try_from(
3181 value: &str,
3182 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3183 value.parse()
3184 }
3185 }
3186 impl ::std::convert::TryFrom<&::std::string::String> for FactionTraitSymbol {
3187 type Error = self::error::ConversionError;
3188 fn try_from(
3189 value: &::std::string::String,
3190 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3191 value.parse()
3192 }
3193 }
3194 impl ::std::convert::TryFrom<::std::string::String> for FactionTraitSymbol {
3195 type Error = self::error::ConversionError;
3196 fn try_from(
3197 value: ::std::string::String,
3198 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3199 value.parse()
3200 }
3201 }
3202 ///Successfully fulfilled a contract.
3203 ///
3204 /// <details><summary>JSON schema</summary>
3205 ///
3206 /// ```json
3207 ///{
3208 /// "description": "Successfully fulfilled a contract.",
3209 /// "type": "object",
3210 /// "required": [
3211 /// "data"
3212 /// ],
3213 /// "properties": {
3214 /// "data": {
3215 /// "type": "object",
3216 /// "required": [
3217 /// "agent",
3218 /// "contract"
3219 /// ],
3220 /// "properties": {
3221 /// "agent": {
3222 /// "$ref": "#/components/schemas/Agent"
3223 /// },
3224 /// "contract": {
3225 /// "$ref": "#/components/schemas/Contract"
3226 /// }
3227 /// }
3228 /// }
3229 /// }
3230 ///}
3231 /// ```
3232 /// </details>
3233 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3234 pub struct FulfillContractResponse {
3235 pub data: FulfillContractResponseData,
3236 }
3237 ///`FulfillContractResponseData`
3238 ///
3239 /// <details><summary>JSON schema</summary>
3240 ///
3241 /// ```json
3242 ///{
3243 /// "type": "object",
3244 /// "required": [
3245 /// "agent",
3246 /// "contract"
3247 /// ],
3248 /// "properties": {
3249 /// "agent": {
3250 /// "$ref": "#/components/schemas/Agent"
3251 /// },
3252 /// "contract": {
3253 /// "$ref": "#/components/schemas/Contract"
3254 /// }
3255 /// }
3256 ///}
3257 /// ```
3258 /// </details>
3259 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3260 pub struct FulfillContractResponseData {
3261 pub agent: Agent,
3262 pub contract: Contract,
3263 }
3264 ///`GetAgentResponse`
3265 ///
3266 /// <details><summary>JSON schema</summary>
3267 ///
3268 /// ```json
3269 ///{
3270 /// "type": "object",
3271 /// "required": [
3272 /// "data"
3273 /// ],
3274 /// "properties": {
3275 /// "data": {
3276 /// "$ref": "#/components/schemas/PublicAgent"
3277 /// }
3278 /// }
3279 ///}
3280 /// ```
3281 /// </details>
3282 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3283 pub struct GetAgentResponse {
3284 pub data: PublicAgent,
3285 }
3286 ///Successfully fetched agents details.
3287 ///
3288 /// <details><summary>JSON schema</summary>
3289 ///
3290 /// ```json
3291 ///{
3292 /// "description": "Successfully fetched agents details.",
3293 /// "type": "object",
3294 /// "required": [
3295 /// "data",
3296 /// "meta"
3297 /// ],
3298 /// "properties": {
3299 /// "data": {
3300 /// "type": "array",
3301 /// "items": {
3302 /// "$ref": "#/components/schemas/PublicAgent"
3303 /// }
3304 /// },
3305 /// "meta": {
3306 /// "$ref": "#/components/schemas/Meta"
3307 /// }
3308 /// }
3309 ///}
3310 /// ```
3311 /// </details>
3312 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3313 pub struct GetAgentsResponse {
3314 pub data: ::std::vec::Vec<PublicAgent>,
3315 pub meta: Meta,
3316 }
3317 ///Successfully fetched construction site.
3318 ///
3319 /// <details><summary>JSON schema</summary>
3320 ///
3321 /// ```json
3322 ///{
3323 /// "description": "Successfully fetched construction site.",
3324 /// "type": "object",
3325 /// "required": [
3326 /// "data"
3327 /// ],
3328 /// "properties": {
3329 /// "data": {
3330 /// "$ref": "#/components/schemas/Construction"
3331 /// }
3332 /// }
3333 ///}
3334 /// ```
3335 /// </details>
3336 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3337 pub struct GetConstructionResponse {
3338 pub data: Construction,
3339 }
3340 ///Successfully fetched contract.
3341 ///
3342 /// <details><summary>JSON schema</summary>
3343 ///
3344 /// ```json
3345 ///{
3346 /// "description": "Successfully fetched contract.",
3347 /// "type": "object",
3348 /// "required": [
3349 /// "data"
3350 /// ],
3351 /// "properties": {
3352 /// "data": {
3353 /// "$ref": "#/components/schemas/Contract"
3354 /// }
3355 /// }
3356 ///}
3357 /// ```
3358 /// </details>
3359 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3360 pub struct GetContractResponse {
3361 pub data: Contract,
3362 }
3363 ///Successfully listed contracts.
3364 ///
3365 /// <details><summary>JSON schema</summary>
3366 ///
3367 /// ```json
3368 ///{
3369 /// "description": "Successfully listed contracts.",
3370 /// "type": "object",
3371 /// "required": [
3372 /// "data",
3373 /// "meta"
3374 /// ],
3375 /// "properties": {
3376 /// "data": {
3377 /// "type": "array",
3378 /// "items": {
3379 /// "$ref": "#/components/schemas/Contract"
3380 /// }
3381 /// },
3382 /// "meta": {
3383 /// "$ref": "#/components/schemas/Meta"
3384 /// }
3385 /// }
3386 ///}
3387 /// ```
3388 /// </details>
3389 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3390 pub struct GetContractsResponse {
3391 pub data: ::std::vec::Vec<Contract>,
3392 pub meta: Meta,
3393 }
3394 ///Fetched error codes successfully.
3395 ///
3396 /// <details><summary>JSON schema</summary>
3397 ///
3398 /// ```json
3399 ///{
3400 /// "description": "Fetched error codes successfully.",
3401 /// "type": "object",
3402 /// "required": [
3403 /// "errorCodes"
3404 /// ],
3405 /// "properties": {
3406 /// "errorCodes": {
3407 /// "type": "array",
3408 /// "items": {
3409 /// "type": "object",
3410 /// "required": [
3411 /// "code",
3412 /// "name"
3413 /// ],
3414 /// "properties": {
3415 /// "code": {
3416 /// "type": "number"
3417 /// },
3418 /// "name": {
3419 /// "type": "string"
3420 /// }
3421 /// }
3422 /// }
3423 /// }
3424 /// }
3425 ///}
3426 /// ```
3427 /// </details>
3428 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3429 pub struct GetErrorCodesResponse {
3430 #[serde(rename = "errorCodes")]
3431 pub error_codes: ::std::vec::Vec<GetErrorCodesResponseErrorCodesItem>,
3432 }
3433 ///`GetErrorCodesResponseErrorCodesItem`
3434 ///
3435 /// <details><summary>JSON schema</summary>
3436 ///
3437 /// ```json
3438 ///{
3439 /// "type": "object",
3440 /// "required": [
3441 /// "code",
3442 /// "name"
3443 /// ],
3444 /// "properties": {
3445 /// "code": {
3446 /// "type": "number"
3447 /// },
3448 /// "name": {
3449 /// "type": "string"
3450 /// }
3451 /// }
3452 ///}
3453 /// ```
3454 /// </details>
3455 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3456 pub struct GetErrorCodesResponseErrorCodesItem {
3457 pub code: f64,
3458 pub name: ::std::string::String,
3459 }
3460 ///`GetFactionResponse`
3461 ///
3462 /// <details><summary>JSON schema</summary>
3463 ///
3464 /// ```json
3465 ///{
3466 /// "type": "object",
3467 /// "required": [
3468 /// "data"
3469 /// ],
3470 /// "properties": {
3471 /// "data": {
3472 /// "$ref": "#/components/schemas/Faction"
3473 /// }
3474 /// }
3475 ///}
3476 /// ```
3477 /// </details>
3478 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3479 pub struct GetFactionResponse {
3480 pub data: Faction,
3481 }
3482 ///Successfully fetched factions.
3483 ///
3484 /// <details><summary>JSON schema</summary>
3485 ///
3486 /// ```json
3487 ///{
3488 /// "description": "Successfully fetched factions.",
3489 /// "type": "object",
3490 /// "required": [
3491 /// "data",
3492 /// "meta"
3493 /// ],
3494 /// "properties": {
3495 /// "data": {
3496 /// "type": "array",
3497 /// "items": {
3498 /// "$ref": "#/components/schemas/Faction"
3499 /// }
3500 /// },
3501 /// "meta": {
3502 /// "$ref": "#/components/schemas/Meta"
3503 /// }
3504 /// }
3505 ///}
3506 /// ```
3507 /// </details>
3508 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3509 pub struct GetFactionsResponse {
3510 pub data: ::std::vec::Vec<Faction>,
3511 pub meta: Meta,
3512 }
3513 ///Jump gate details retrieved successfully.
3514 ///
3515 /// <details><summary>JSON schema</summary>
3516 ///
3517 /// ```json
3518 ///{
3519 /// "description": "Jump gate details retrieved successfully.",
3520 /// "type": "object",
3521 /// "required": [
3522 /// "data"
3523 /// ],
3524 /// "properties": {
3525 /// "data": {
3526 /// "$ref": "#/components/schemas/JumpGate"
3527 /// }
3528 /// }
3529 ///}
3530 /// ```
3531 /// </details>
3532 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3533 pub struct GetJumpGateResponse {
3534 pub data: JumpGate,
3535 }
3536 ///Successfully fetched the market.
3537 ///
3538 /// <details><summary>JSON schema</summary>
3539 ///
3540 /// ```json
3541 ///{
3542 /// "description": "Successfully fetched the market.",
3543 /// "type": "object",
3544 /// "required": [
3545 /// "data"
3546 /// ],
3547 /// "properties": {
3548 /// "data": {
3549 /// "$ref": "#/components/schemas/Market"
3550 /// }
3551 /// }
3552 ///}
3553 /// ```
3554 /// </details>
3555 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3556 pub struct GetMarketResponse {
3557 pub data: Market,
3558 }
3559 ///Successfully retrieved ship mounts.
3560 ///
3561 /// <details><summary>JSON schema</summary>
3562 ///
3563 /// ```json
3564 ///{
3565 /// "title": "Get Mounts 200 Response",
3566 /// "description": "Successfully retrieved ship mounts.",
3567 /// "type": "object",
3568 /// "required": [
3569 /// "data"
3570 /// ],
3571 /// "properties": {
3572 /// "data": {
3573 /// "type": "array",
3574 /// "items": {
3575 /// "$ref": "#/components/schemas/ShipMount"
3576 /// }
3577 /// }
3578 /// }
3579 ///}
3580 /// ```
3581 /// </details>
3582 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3583 pub struct GetMounts200Response {
3584 pub data: ::std::vec::Vec<ShipMount>,
3585 }
3586 ///`GetMyAccountResponse`
3587 ///
3588 /// <details><summary>JSON schema</summary>
3589 ///
3590 /// ```json
3591 ///{
3592 /// "type": "object",
3593 /// "required": [
3594 /// "data"
3595 /// ],
3596 /// "properties": {
3597 /// "data": {
3598 /// "type": "object",
3599 /// "required": [
3600 /// "account"
3601 /// ],
3602 /// "properties": {
3603 /// "account": {
3604 /// "type": "object",
3605 /// "required": [
3606 /// "createdAt",
3607 /// "email",
3608 /// "id"
3609 /// ],
3610 /// "properties": {
3611 /// "createdAt": {
3612 /// "type": "string",
3613 /// "format": "date-time"
3614 /// },
3615 /// "email": {
3616 /// "type": [
3617 /// "string",
3618 /// "null"
3619 /// ]
3620 /// },
3621 /// "id": {
3622 /// "type": "string"
3623 /// },
3624 /// "token": {
3625 /// "type": "string"
3626 /// }
3627 /// }
3628 /// }
3629 /// }
3630 /// }
3631 /// }
3632 ///}
3633 /// ```
3634 /// </details>
3635 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3636 pub struct GetMyAccountResponse {
3637 pub data: GetMyAccountResponseData,
3638 }
3639 ///`GetMyAccountResponseData`
3640 ///
3641 /// <details><summary>JSON schema</summary>
3642 ///
3643 /// ```json
3644 ///{
3645 /// "type": "object",
3646 /// "required": [
3647 /// "account"
3648 /// ],
3649 /// "properties": {
3650 /// "account": {
3651 /// "type": "object",
3652 /// "required": [
3653 /// "createdAt",
3654 /// "email",
3655 /// "id"
3656 /// ],
3657 /// "properties": {
3658 /// "createdAt": {
3659 /// "type": "string",
3660 /// "format": "date-time"
3661 /// },
3662 /// "email": {
3663 /// "type": [
3664 /// "string",
3665 /// "null"
3666 /// ]
3667 /// },
3668 /// "id": {
3669 /// "type": "string"
3670 /// },
3671 /// "token": {
3672 /// "type": "string"
3673 /// }
3674 /// }
3675 /// }
3676 /// }
3677 ///}
3678 /// ```
3679 /// </details>
3680 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3681 pub struct GetMyAccountResponseData {
3682 pub account: GetMyAccountResponseDataAccount,
3683 }
3684 ///`GetMyAccountResponseDataAccount`
3685 ///
3686 /// <details><summary>JSON schema</summary>
3687 ///
3688 /// ```json
3689 ///{
3690 /// "type": "object",
3691 /// "required": [
3692 /// "createdAt",
3693 /// "email",
3694 /// "id"
3695 /// ],
3696 /// "properties": {
3697 /// "createdAt": {
3698 /// "type": "string",
3699 /// "format": "date-time"
3700 /// },
3701 /// "email": {
3702 /// "type": [
3703 /// "string",
3704 /// "null"
3705 /// ]
3706 /// },
3707 /// "id": {
3708 /// "type": "string"
3709 /// },
3710 /// "token": {
3711 /// "type": "string"
3712 /// }
3713 /// }
3714 ///}
3715 /// ```
3716 /// </details>
3717 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3718 pub struct GetMyAccountResponseDataAccount {
3719 #[serde(rename = "createdAt")]
3720 pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
3721 pub email: ::std::option::Option<::std::string::String>,
3722 pub id: ::std::string::String,
3723 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3724 pub token: ::std::option::Option<::std::string::String>,
3725 }
3726 ///`GetMyAgentEventsResponse`
3727 ///
3728 /// <details><summary>JSON schema</summary>
3729 ///
3730 /// ```json
3731 ///{
3732 /// "type": "object",
3733 /// "required": [
3734 /// "data"
3735 /// ],
3736 /// "properties": {
3737 /// "data": {
3738 /// "type": "array",
3739 /// "items": {
3740 /// "$ref": "#/components/schemas/AgentEvent"
3741 /// }
3742 /// }
3743 /// }
3744 ///}
3745 /// ```
3746 /// </details>
3747 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3748 pub struct GetMyAgentEventsResponse {
3749 pub data: ::std::vec::Vec<AgentEvent>,
3750 }
3751 ///Successfully fetched agent details.
3752 ///
3753 /// <details><summary>JSON schema</summary>
3754 ///
3755 /// ```json
3756 ///{
3757 /// "description": "Successfully fetched agent details.",
3758 /// "type": "object",
3759 /// "required": [
3760 /// "data"
3761 /// ],
3762 /// "properties": {
3763 /// "data": {
3764 /// "$ref": "#/components/schemas/Agent"
3765 /// }
3766 /// }
3767 ///}
3768 /// ```
3769 /// </details>
3770 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3771 pub struct GetMyAgentResponse {
3772 pub data: Agent,
3773 }
3774 ///`GetMyFactionsResponse`
3775 ///
3776 /// <details><summary>JSON schema</summary>
3777 ///
3778 /// ```json
3779 ///{
3780 /// "type": "object",
3781 /// "required": [
3782 /// "data",
3783 /// "meta"
3784 /// ],
3785 /// "properties": {
3786 /// "data": {
3787 /// "type": "array",
3788 /// "items": {
3789 /// "type": "object",
3790 /// "required": [
3791 /// "reputation",
3792 /// "symbol"
3793 /// ],
3794 /// "properties": {
3795 /// "reputation": {
3796 /// "type": "integer"
3797 /// },
3798 /// "symbol": {
3799 /// "type": "string"
3800 /// }
3801 /// }
3802 /// }
3803 /// },
3804 /// "meta": {
3805 /// "$ref": "#/components/schemas/Meta"
3806 /// }
3807 /// }
3808 ///}
3809 /// ```
3810 /// </details>
3811 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3812 pub struct GetMyFactionsResponse {
3813 pub data: ::std::vec::Vec<GetMyFactionsResponseDataItem>,
3814 pub meta: Meta,
3815 }
3816 ///`GetMyFactionsResponseDataItem`
3817 ///
3818 /// <details><summary>JSON schema</summary>
3819 ///
3820 /// ```json
3821 ///{
3822 /// "type": "object",
3823 /// "required": [
3824 /// "reputation",
3825 /// "symbol"
3826 /// ],
3827 /// "properties": {
3828 /// "reputation": {
3829 /// "type": "integer"
3830 /// },
3831 /// "symbol": {
3832 /// "type": "string"
3833 /// }
3834 /// }
3835 ///}
3836 /// ```
3837 /// </details>
3838 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3839 pub struct GetMyFactionsResponseDataItem {
3840 pub reputation: i64,
3841 pub symbol: ::std::string::String,
3842 }
3843 ///Successfully fetched ship's cargo.
3844 ///
3845 /// <details><summary>JSON schema</summary>
3846 ///
3847 /// ```json
3848 ///{
3849 /// "description": "Successfully fetched ship's cargo.",
3850 /// "type": "object",
3851 /// "required": [
3852 /// "data"
3853 /// ],
3854 /// "properties": {
3855 /// "data": {
3856 /// "$ref": "#/components/schemas/ShipCargo"
3857 /// }
3858 /// }
3859 ///}
3860 /// ```
3861 /// </details>
3862 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3863 pub struct GetMyShipCargoResponse {
3864 pub data: ShipCargo,
3865 }
3866 ///Successfully fetched ship.
3867 ///
3868 /// <details><summary>JSON schema</summary>
3869 ///
3870 /// ```json
3871 ///{
3872 /// "description": "Successfully fetched ship.",
3873 /// "type": "object",
3874 /// "required": [
3875 /// "data"
3876 /// ],
3877 /// "properties": {
3878 /// "data": {
3879 /// "$ref": "#/components/schemas/Ship"
3880 /// }
3881 /// }
3882 ///}
3883 /// ```
3884 /// </details>
3885 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3886 pub struct GetMyShipResponse {
3887 pub data: Ship,
3888 }
3889 ///Successfully listed ships.
3890 ///
3891 /// <details><summary>JSON schema</summary>
3892 ///
3893 /// ```json
3894 ///{
3895 /// "description": "Successfully listed ships.",
3896 /// "type": "object",
3897 /// "required": [
3898 /// "data",
3899 /// "meta"
3900 /// ],
3901 /// "properties": {
3902 /// "data": {
3903 /// "type": "array",
3904 /// "items": {
3905 /// "$ref": "#/components/schemas/Ship"
3906 /// }
3907 /// },
3908 /// "meta": {
3909 /// "$ref": "#/components/schemas/Meta"
3910 /// }
3911 /// }
3912 ///}
3913 /// ```
3914 /// </details>
3915 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3916 pub struct GetMyShipsResponse {
3917 pub data: ::std::vec::Vec<Ship>,
3918 pub meta: Meta,
3919 }
3920 ///Successfully retrieved the cost of repairing a ship.
3921 ///
3922 /// <details><summary>JSON schema</summary>
3923 ///
3924 /// ```json
3925 ///{
3926 /// "description": "Successfully retrieved the cost of repairing a ship.",
3927 /// "type": "object",
3928 /// "required": [
3929 /// "data"
3930 /// ],
3931 /// "properties": {
3932 /// "data": {
3933 /// "type": "object",
3934 /// "required": [
3935 /// "transaction"
3936 /// ],
3937 /// "properties": {
3938 /// "transaction": {
3939 /// "$ref": "#/components/schemas/RepairTransaction"
3940 /// }
3941 /// }
3942 /// }
3943 /// }
3944 ///}
3945 /// ```
3946 /// </details>
3947 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3948 pub struct GetRepairShipResponse {
3949 pub data: GetRepairShipResponseData,
3950 }
3951 ///`GetRepairShipResponseData`
3952 ///
3953 /// <details><summary>JSON schema</summary>
3954 ///
3955 /// ```json
3956 ///{
3957 /// "type": "object",
3958 /// "required": [
3959 /// "transaction"
3960 /// ],
3961 /// "properties": {
3962 /// "transaction": {
3963 /// "$ref": "#/components/schemas/RepairTransaction"
3964 /// }
3965 /// }
3966 ///}
3967 /// ```
3968 /// </details>
3969 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3970 pub struct GetRepairShipResponseData {
3971 pub transaction: RepairTransaction,
3972 }
3973 ///Successfully retrieved the amount of value that will be returned when scrapping a ship.
3974 ///
3975 /// <details><summary>JSON schema</summary>
3976 ///
3977 /// ```json
3978 ///{
3979 /// "description": "Successfully retrieved the amount of value that will be returned when scrapping a ship.",
3980 /// "type": "object",
3981 /// "required": [
3982 /// "data"
3983 /// ],
3984 /// "properties": {
3985 /// "data": {
3986 /// "type": "object",
3987 /// "required": [
3988 /// "transaction"
3989 /// ],
3990 /// "properties": {
3991 /// "transaction": {
3992 /// "$ref": "#/components/schemas/ScrapTransaction"
3993 /// }
3994 /// }
3995 /// }
3996 /// }
3997 ///}
3998 /// ```
3999 /// </details>
4000 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4001 pub struct GetScrapShipResponse {
4002 pub data: GetScrapShipResponseData,
4003 }
4004 ///`GetScrapShipResponseData`
4005 ///
4006 /// <details><summary>JSON schema</summary>
4007 ///
4008 /// ```json
4009 ///{
4010 /// "type": "object",
4011 /// "required": [
4012 /// "transaction"
4013 /// ],
4014 /// "properties": {
4015 /// "transaction": {
4016 /// "$ref": "#/components/schemas/ScrapTransaction"
4017 /// }
4018 /// }
4019 ///}
4020 /// ```
4021 /// </details>
4022 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4023 pub struct GetScrapShipResponseData {
4024 pub transaction: ScrapTransaction,
4025 }
4026 ///Successfully fetched ship's cooldown.
4027 ///
4028 /// <details><summary>JSON schema</summary>
4029 ///
4030 /// ```json
4031 ///{
4032 /// "description": "Successfully fetched ship's cooldown.",
4033 /// "type": "object",
4034 /// "required": [
4035 /// "data"
4036 /// ],
4037 /// "properties": {
4038 /// "data": {
4039 /// "$ref": "#/components/schemas/Cooldown"
4040 /// }
4041 /// }
4042 ///}
4043 /// ```
4044 /// </details>
4045 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4046 pub struct GetShipCooldownResponse {
4047 pub data: Cooldown,
4048 }
4049 ///Successfully retrieved ship modules.
4050 ///
4051 /// <details><summary>JSON schema</summary>
4052 ///
4053 /// ```json
4054 ///{
4055 /// "description": "Successfully retrieved ship modules.",
4056 /// "type": "object",
4057 /// "required": [
4058 /// "data"
4059 /// ],
4060 /// "properties": {
4061 /// "data": {
4062 /// "type": "array",
4063 /// "items": {
4064 /// "$ref": "#/components/schemas/ShipModule"
4065 /// }
4066 /// }
4067 /// }
4068 ///}
4069 /// ```
4070 /// </details>
4071 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4072 pub struct GetShipModulesResponse {
4073 pub data: ::std::vec::Vec<ShipModule>,
4074 }
4075 ///The current nav status of the ship.
4076 ///
4077 /// <details><summary>JSON schema</summary>
4078 ///
4079 /// ```json
4080 ///{
4081 /// "description": "The current nav status of the ship.",
4082 /// "type": "object",
4083 /// "required": [
4084 /// "data"
4085 /// ],
4086 /// "properties": {
4087 /// "data": {
4088 /// "$ref": "#/components/schemas/ShipNav"
4089 /// }
4090 /// }
4091 ///}
4092 /// ```
4093 /// </details>
4094 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4095 pub struct GetShipNavResponse {
4096 pub data: ShipNav,
4097 }
4098 ///Successfully fetched the shipyard.
4099 ///
4100 /// <details><summary>JSON schema</summary>
4101 ///
4102 /// ```json
4103 ///{
4104 /// "description": "Successfully fetched the shipyard.",
4105 /// "type": "object",
4106 /// "required": [
4107 /// "data"
4108 /// ],
4109 /// "properties": {
4110 /// "data": {
4111 /// "$ref": "#/components/schemas/Shipyard"
4112 /// }
4113 /// }
4114 ///}
4115 /// ```
4116 /// </details>
4117 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4118 pub struct GetShipyardResponse {
4119 pub data: Shipyard,
4120 }
4121 ///Fetched status successfully.
4122 ///
4123 /// <details><summary>JSON schema</summary>
4124 ///
4125 /// ```json
4126 ///{
4127 /// "description": "Fetched status successfully.",
4128 /// "type": "object",
4129 /// "required": [
4130 /// "announcements",
4131 /// "description",
4132 /// "health",
4133 /// "leaderboards",
4134 /// "links",
4135 /// "resetDate",
4136 /// "serverResets",
4137 /// "stats",
4138 /// "status",
4139 /// "version"
4140 /// ],
4141 /// "properties": {
4142 /// "announcements": {
4143 /// "type": "array",
4144 /// "items": {
4145 /// "type": "object",
4146 /// "required": [
4147 /// "body",
4148 /// "title"
4149 /// ],
4150 /// "properties": {
4151 /// "body": {
4152 /// "type": "string"
4153 /// },
4154 /// "title": {
4155 /// "type": "string"
4156 /// }
4157 /// }
4158 /// }
4159 /// },
4160 /// "description": {
4161 /// "type": "string"
4162 /// },
4163 /// "health": {
4164 /// "type": "object",
4165 /// "properties": {
4166 /// "lastMarketUpdate": {
4167 /// "description": "The date/time when the market was last updated.",
4168 /// "type": "string"
4169 /// }
4170 /// }
4171 /// },
4172 /// "leaderboards": {
4173 /// "type": "object",
4174 /// "required": [
4175 /// "mostCredits",
4176 /// "mostSubmittedCharts"
4177 /// ],
4178 /// "properties": {
4179 /// "mostCredits": {
4180 /// "description": "Top agents with the most credits.",
4181 /// "type": "array",
4182 /// "items": {
4183 /// "type": "object",
4184 /// "required": [
4185 /// "agentSymbol",
4186 /// "credits"
4187 /// ],
4188 /// "properties": {
4189 /// "agentSymbol": {
4190 /// "description": "Symbol of the agent.",
4191 /// "type": "string"
4192 /// },
4193 /// "credits": {
4194 /// "description": "Amount of credits.",
4195 /// "type": "integer",
4196 /// "format": "int64"
4197 /// }
4198 /// }
4199 /// }
4200 /// },
4201 /// "mostSubmittedCharts": {
4202 /// "description": "Top agents with the most charted submitted.",
4203 /// "type": "array",
4204 /// "items": {
4205 /// "type": "object",
4206 /// "required": [
4207 /// "agentSymbol",
4208 /// "chartCount"
4209 /// ],
4210 /// "properties": {
4211 /// "agentSymbol": {
4212 /// "description": "Symbol of the agent.",
4213 /// "type": "string"
4214 /// },
4215 /// "chartCount": {
4216 /// "description": "Amount of charts done by the agent.",
4217 /// "type": "integer"
4218 /// }
4219 /// }
4220 /// }
4221 /// }
4222 /// }
4223 /// },
4224 /// "links": {
4225 /// "type": "array",
4226 /// "items": {
4227 /// "type": "object",
4228 /// "required": [
4229 /// "name",
4230 /// "url"
4231 /// ],
4232 /// "properties": {
4233 /// "name": {
4234 /// "type": "string"
4235 /// },
4236 /// "url": {
4237 /// "type": "string",
4238 /// "format": "uri"
4239 /// }
4240 /// }
4241 /// }
4242 /// },
4243 /// "resetDate": {
4244 /// "description": "The date when the game server was last reset.",
4245 /// "type": "string"
4246 /// },
4247 /// "serverResets": {
4248 /// "type": "object",
4249 /// "required": [
4250 /// "frequency",
4251 /// "next"
4252 /// ],
4253 /// "properties": {
4254 /// "frequency": {
4255 /// "description": "How often we intend to reset the game server.",
4256 /// "type": "string"
4257 /// },
4258 /// "next": {
4259 /// "description": "The date and time when the game server will reset.",
4260 /// "type": "string"
4261 /// }
4262 /// }
4263 /// },
4264 /// "stats": {
4265 /// "type": "object",
4266 /// "required": [
4267 /// "agents",
4268 /// "ships",
4269 /// "systems",
4270 /// "waypoints"
4271 /// ],
4272 /// "properties": {
4273 /// "accounts": {
4274 /// "description": "Total number of accounts registered on the game server.",
4275 /// "type": "integer"
4276 /// },
4277 /// "agents": {
4278 /// "description": "Number of registered agents in the game.",
4279 /// "type": "integer"
4280 /// },
4281 /// "ships": {
4282 /// "description": "Total number of ships in the game.",
4283 /// "type": "integer"
4284 /// },
4285 /// "systems": {
4286 /// "description": "Total number of systems in the game.",
4287 /// "type": "integer"
4288 /// },
4289 /// "waypoints": {
4290 /// "description": "Total number of waypoints in the game.",
4291 /// "type": "integer"
4292 /// }
4293 /// }
4294 /// },
4295 /// "status": {
4296 /// "description": "The current status of the game server.",
4297 /// "type": "string"
4298 /// },
4299 /// "version": {
4300 /// "description": "The current version of the API.",
4301 /// "type": "string"
4302 /// }
4303 /// }
4304 ///}
4305 /// ```
4306 /// </details>
4307 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4308 pub struct GetStatusResponse {
4309 pub announcements: ::std::vec::Vec<GetStatusResponseAnnouncementsItem>,
4310 pub description: ::std::string::String,
4311 pub health: GetStatusResponseHealth,
4312 pub leaderboards: GetStatusResponseLeaderboards,
4313 pub links: ::std::vec::Vec<GetStatusResponseLinksItem>,
4314 ///The date when the game server was last reset.
4315 #[serde(rename = "resetDate")]
4316 pub reset_date: ::std::string::String,
4317 #[serde(rename = "serverResets")]
4318 pub server_resets: GetStatusResponseServerResets,
4319 pub stats: GetStatusResponseStats,
4320 ///The current status of the game server.
4321 pub status: ::std::string::String,
4322 ///The current version of the API.
4323 pub version: ::std::string::String,
4324 }
4325 ///`GetStatusResponseAnnouncementsItem`
4326 ///
4327 /// <details><summary>JSON schema</summary>
4328 ///
4329 /// ```json
4330 ///{
4331 /// "type": "object",
4332 /// "required": [
4333 /// "body",
4334 /// "title"
4335 /// ],
4336 /// "properties": {
4337 /// "body": {
4338 /// "type": "string"
4339 /// },
4340 /// "title": {
4341 /// "type": "string"
4342 /// }
4343 /// }
4344 ///}
4345 /// ```
4346 /// </details>
4347 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4348 pub struct GetStatusResponseAnnouncementsItem {
4349 pub body: ::std::string::String,
4350 pub title: ::std::string::String,
4351 }
4352 ///`GetStatusResponseHealth`
4353 ///
4354 /// <details><summary>JSON schema</summary>
4355 ///
4356 /// ```json
4357 ///{
4358 /// "type": "object",
4359 /// "properties": {
4360 /// "lastMarketUpdate": {
4361 /// "description": "The date/time when the market was last updated.",
4362 /// "type": "string"
4363 /// }
4364 /// }
4365 ///}
4366 /// ```
4367 /// </details>
4368 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4369 pub struct GetStatusResponseHealth {
4370 ///The date/time when the market was last updated.
4371 #[serde(
4372 rename = "lastMarketUpdate",
4373 default,
4374 skip_serializing_if = "::std::option::Option::is_none"
4375 )]
4376 pub last_market_update: ::std::option::Option<::std::string::String>,
4377 }
4378 impl ::std::default::Default for GetStatusResponseHealth {
4379 fn default() -> Self {
4380 Self {
4381 last_market_update: Default::default(),
4382 }
4383 }
4384 }
4385 ///`GetStatusResponseLeaderboards`
4386 ///
4387 /// <details><summary>JSON schema</summary>
4388 ///
4389 /// ```json
4390 ///{
4391 /// "type": "object",
4392 /// "required": [
4393 /// "mostCredits",
4394 /// "mostSubmittedCharts"
4395 /// ],
4396 /// "properties": {
4397 /// "mostCredits": {
4398 /// "description": "Top agents with the most credits.",
4399 /// "type": "array",
4400 /// "items": {
4401 /// "type": "object",
4402 /// "required": [
4403 /// "agentSymbol",
4404 /// "credits"
4405 /// ],
4406 /// "properties": {
4407 /// "agentSymbol": {
4408 /// "description": "Symbol of the agent.",
4409 /// "type": "string"
4410 /// },
4411 /// "credits": {
4412 /// "description": "Amount of credits.",
4413 /// "type": "integer",
4414 /// "format": "int64"
4415 /// }
4416 /// }
4417 /// }
4418 /// },
4419 /// "mostSubmittedCharts": {
4420 /// "description": "Top agents with the most charted submitted.",
4421 /// "type": "array",
4422 /// "items": {
4423 /// "type": "object",
4424 /// "required": [
4425 /// "agentSymbol",
4426 /// "chartCount"
4427 /// ],
4428 /// "properties": {
4429 /// "agentSymbol": {
4430 /// "description": "Symbol of the agent.",
4431 /// "type": "string"
4432 /// },
4433 /// "chartCount": {
4434 /// "description": "Amount of charts done by the agent.",
4435 /// "type": "integer"
4436 /// }
4437 /// }
4438 /// }
4439 /// }
4440 /// }
4441 ///}
4442 /// ```
4443 /// </details>
4444 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4445 pub struct GetStatusResponseLeaderboards {
4446 ///Top agents with the most credits.
4447 #[serde(rename = "mostCredits")]
4448 pub most_credits: ::std::vec::Vec<GetStatusResponseLeaderboardsMostCreditsItem>,
4449 ///Top agents with the most charted submitted.
4450 #[serde(rename = "mostSubmittedCharts")]
4451 pub most_submitted_charts: ::std::vec::Vec<
4452 GetStatusResponseLeaderboardsMostSubmittedChartsItem,
4453 >,
4454 }
4455 ///`GetStatusResponseLeaderboardsMostCreditsItem`
4456 ///
4457 /// <details><summary>JSON schema</summary>
4458 ///
4459 /// ```json
4460 ///{
4461 /// "type": "object",
4462 /// "required": [
4463 /// "agentSymbol",
4464 /// "credits"
4465 /// ],
4466 /// "properties": {
4467 /// "agentSymbol": {
4468 /// "description": "Symbol of the agent.",
4469 /// "type": "string"
4470 /// },
4471 /// "credits": {
4472 /// "description": "Amount of credits.",
4473 /// "type": "integer",
4474 /// "format": "int64"
4475 /// }
4476 /// }
4477 ///}
4478 /// ```
4479 /// </details>
4480 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4481 pub struct GetStatusResponseLeaderboardsMostCreditsItem {
4482 ///Symbol of the agent.
4483 #[serde(rename = "agentSymbol")]
4484 pub agent_symbol: ::std::string::String,
4485 ///Amount of credits.
4486 pub credits: i64,
4487 }
4488 ///`GetStatusResponseLeaderboardsMostSubmittedChartsItem`
4489 ///
4490 /// <details><summary>JSON schema</summary>
4491 ///
4492 /// ```json
4493 ///{
4494 /// "type": "object",
4495 /// "required": [
4496 /// "agentSymbol",
4497 /// "chartCount"
4498 /// ],
4499 /// "properties": {
4500 /// "agentSymbol": {
4501 /// "description": "Symbol of the agent.",
4502 /// "type": "string"
4503 /// },
4504 /// "chartCount": {
4505 /// "description": "Amount of charts done by the agent.",
4506 /// "type": "integer"
4507 /// }
4508 /// }
4509 ///}
4510 /// ```
4511 /// </details>
4512 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4513 pub struct GetStatusResponseLeaderboardsMostSubmittedChartsItem {
4514 ///Symbol of the agent.
4515 #[serde(rename = "agentSymbol")]
4516 pub agent_symbol: ::std::string::String,
4517 ///Amount of charts done by the agent.
4518 #[serde(rename = "chartCount")]
4519 pub chart_count: i64,
4520 }
4521 ///`GetStatusResponseLinksItem`
4522 ///
4523 /// <details><summary>JSON schema</summary>
4524 ///
4525 /// ```json
4526 ///{
4527 /// "type": "object",
4528 /// "required": [
4529 /// "name",
4530 /// "url"
4531 /// ],
4532 /// "properties": {
4533 /// "name": {
4534 /// "type": "string"
4535 /// },
4536 /// "url": {
4537 /// "type": "string",
4538 /// "format": "uri"
4539 /// }
4540 /// }
4541 ///}
4542 /// ```
4543 /// </details>
4544 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4545 pub struct GetStatusResponseLinksItem {
4546 pub name: ::std::string::String,
4547 pub url: ::std::string::String,
4548 }
4549 ///`GetStatusResponseServerResets`
4550 ///
4551 /// <details><summary>JSON schema</summary>
4552 ///
4553 /// ```json
4554 ///{
4555 /// "type": "object",
4556 /// "required": [
4557 /// "frequency",
4558 /// "next"
4559 /// ],
4560 /// "properties": {
4561 /// "frequency": {
4562 /// "description": "How often we intend to reset the game server.",
4563 /// "type": "string"
4564 /// },
4565 /// "next": {
4566 /// "description": "The date and time when the game server will reset.",
4567 /// "type": "string"
4568 /// }
4569 /// }
4570 ///}
4571 /// ```
4572 /// </details>
4573 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4574 pub struct GetStatusResponseServerResets {
4575 ///How often we intend to reset the game server.
4576 pub frequency: ::std::string::String,
4577 ///The date and time when the game server will reset.
4578 pub next: ::std::string::String,
4579 }
4580 ///`GetStatusResponseStats`
4581 ///
4582 /// <details><summary>JSON schema</summary>
4583 ///
4584 /// ```json
4585 ///{
4586 /// "type": "object",
4587 /// "required": [
4588 /// "agents",
4589 /// "ships",
4590 /// "systems",
4591 /// "waypoints"
4592 /// ],
4593 /// "properties": {
4594 /// "accounts": {
4595 /// "description": "Total number of accounts registered on the game server.",
4596 /// "type": "integer"
4597 /// },
4598 /// "agents": {
4599 /// "description": "Number of registered agents in the game.",
4600 /// "type": "integer"
4601 /// },
4602 /// "ships": {
4603 /// "description": "Total number of ships in the game.",
4604 /// "type": "integer"
4605 /// },
4606 /// "systems": {
4607 /// "description": "Total number of systems in the game.",
4608 /// "type": "integer"
4609 /// },
4610 /// "waypoints": {
4611 /// "description": "Total number of waypoints in the game.",
4612 /// "type": "integer"
4613 /// }
4614 /// }
4615 ///}
4616 /// ```
4617 /// </details>
4618 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4619 pub struct GetStatusResponseStats {
4620 ///Total number of accounts registered on the game server.
4621 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4622 pub accounts: ::std::option::Option<i64>,
4623 ///Number of registered agents in the game.
4624 pub agents: i64,
4625 ///Total number of ships in the game.
4626 pub ships: i64,
4627 ///Total number of systems in the game.
4628 pub systems: i64,
4629 ///Total number of waypoints in the game.
4630 pub waypoints: i64,
4631 }
4632 ///Successfully retrieved the supply chain information
4633 ///
4634 /// <details><summary>JSON schema</summary>
4635 ///
4636 /// ```json
4637 ///{
4638 /// "description": "Successfully retrieved the supply chain information",
4639 /// "type": "object",
4640 /// "required": [
4641 /// "data"
4642 /// ],
4643 /// "properties": {
4644 /// "data": {
4645 /// "type": "object",
4646 /// "required": [
4647 /// "exportToImportMap"
4648 /// ],
4649 /// "properties": {
4650 /// "exportToImportMap": {
4651 /// "type": "object",
4652 /// "additionalProperties": {
4653 /// "type": "array",
4654 /// "items": {
4655 /// "type": "string"
4656 /// }
4657 /// }
4658 /// }
4659 /// }
4660 /// }
4661 /// }
4662 ///}
4663 /// ```
4664 /// </details>
4665 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4666 pub struct GetSupplyChainResponse {
4667 pub data: GetSupplyChainResponseData,
4668 }
4669 ///`GetSupplyChainResponseData`
4670 ///
4671 /// <details><summary>JSON schema</summary>
4672 ///
4673 /// ```json
4674 ///{
4675 /// "type": "object",
4676 /// "required": [
4677 /// "exportToImportMap"
4678 /// ],
4679 /// "properties": {
4680 /// "exportToImportMap": {
4681 /// "type": "object",
4682 /// "additionalProperties": {
4683 /// "type": "array",
4684 /// "items": {
4685 /// "type": "string"
4686 /// }
4687 /// }
4688 /// }
4689 /// }
4690 ///}
4691 /// ```
4692 /// </details>
4693 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4694 pub struct GetSupplyChainResponseData {
4695 #[serde(rename = "exportToImportMap")]
4696 pub export_to_import_map: ::std::collections::HashMap<
4697 ::std::string::String,
4698 ::std::vec::Vec<::std::string::String>,
4699 >,
4700 }
4701 ///Successfully fetched the system.
4702 ///
4703 /// <details><summary>JSON schema</summary>
4704 ///
4705 /// ```json
4706 ///{
4707 /// "description": "Successfully fetched the system.",
4708 /// "type": "object",
4709 /// "required": [
4710 /// "data"
4711 /// ],
4712 /// "properties": {
4713 /// "data": {
4714 /// "$ref": "#/components/schemas/System"
4715 /// }
4716 /// }
4717 ///}
4718 /// ```
4719 /// </details>
4720 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4721 pub struct GetSystemResponse {
4722 pub data: System,
4723 }
4724 ///Successfully listed waypoints.
4725 ///
4726 /// <details><summary>JSON schema</summary>
4727 ///
4728 /// ```json
4729 ///{
4730 /// "description": "Successfully listed waypoints.",
4731 /// "type": "object",
4732 /// "required": [
4733 /// "data",
4734 /// "meta"
4735 /// ],
4736 /// "properties": {
4737 /// "data": {
4738 /// "type": "array",
4739 /// "items": {
4740 /// "$ref": "#/components/schemas/Waypoint"
4741 /// }
4742 /// },
4743 /// "meta": {
4744 /// "$ref": "#/components/schemas/Meta"
4745 /// }
4746 /// }
4747 ///}
4748 /// ```
4749 /// </details>
4750 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4751 pub struct GetSystemWaypointsResponse {
4752 pub data: ::std::vec::Vec<Waypoint>,
4753 pub meta: Meta,
4754 }
4755 ///`GetSystemWaypointsTraits`
4756 ///
4757 /// <details><summary>JSON schema</summary>
4758 ///
4759 /// ```json
4760 ///{
4761 /// "anyOf": [
4762 /// {
4763 /// "type": "array",
4764 /// "items": {
4765 /// "$ref": "#/components/schemas/WaypointTraitSymbol"
4766 /// }
4767 /// },
4768 /// {
4769 /// "$ref": "#/components/schemas/WaypointTraitSymbol"
4770 /// }
4771 /// ]
4772 ///}
4773 /// ```
4774 /// </details>
4775 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4776 #[serde(untagged)]
4777 pub enum GetSystemWaypointsTraits {
4778 Array(::std::vec::Vec<WaypointTraitSymbol>),
4779 WaypointTraitSymbol(WaypointTraitSymbol),
4780 }
4781 impl ::std::convert::From<::std::vec::Vec<WaypointTraitSymbol>>
4782 for GetSystemWaypointsTraits {
4783 fn from(value: ::std::vec::Vec<WaypointTraitSymbol>) -> Self {
4784 Self::Array(value)
4785 }
4786 }
4787 impl ::std::convert::From<WaypointTraitSymbol> for GetSystemWaypointsTraits {
4788 fn from(value: WaypointTraitSymbol) -> Self {
4789 Self::WaypointTraitSymbol(value)
4790 }
4791 }
4792 ///Successfully listed systems.
4793 ///
4794 /// <details><summary>JSON schema</summary>
4795 ///
4796 /// ```json
4797 ///{
4798 /// "description": "Successfully listed systems.",
4799 /// "type": "object",
4800 /// "required": [
4801 /// "data",
4802 /// "meta"
4803 /// ],
4804 /// "properties": {
4805 /// "data": {
4806 /// "type": "array",
4807 /// "items": {
4808 /// "$ref": "#/components/schemas/System"
4809 /// }
4810 /// },
4811 /// "meta": {
4812 /// "$ref": "#/components/schemas/Meta"
4813 /// }
4814 /// }
4815 ///}
4816 /// ```
4817 /// </details>
4818 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4819 pub struct GetSystemsResponse {
4820 pub data: ::std::vec::Vec<System>,
4821 pub meta: Meta,
4822 }
4823 ///Successfully fetched waypoint details.
4824 ///
4825 /// <details><summary>JSON schema</summary>
4826 ///
4827 /// ```json
4828 ///{
4829 /// "description": "Successfully fetched waypoint details.",
4830 /// "type": "object",
4831 /// "required": [
4832 /// "data"
4833 /// ],
4834 /// "properties": {
4835 /// "data": {
4836 /// "$ref": "#/components/schemas/Waypoint"
4837 /// }
4838 /// }
4839 ///}
4840 /// ```
4841 /// </details>
4842 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4843 pub struct GetWaypointResponse {
4844 pub data: Waypoint,
4845 }
4846 ///Successfully installed the mount.
4847 ///
4848 /// <details><summary>JSON schema</summary>
4849 ///
4850 /// ```json
4851 ///{
4852 /// "title": "Install Mount 201 Response",
4853 /// "description": "Successfully installed the mount.",
4854 /// "type": "object",
4855 /// "required": [
4856 /// "data"
4857 /// ],
4858 /// "properties": {
4859 /// "data": {
4860 /// "type": "object",
4861 /// "required": [
4862 /// "agent",
4863 /// "cargo",
4864 /// "mounts",
4865 /// "transaction"
4866 /// ],
4867 /// "properties": {
4868 /// "agent": {
4869 /// "$ref": "#/components/schemas/Agent"
4870 /// },
4871 /// "cargo": {
4872 /// "$ref": "#/components/schemas/ShipCargo"
4873 /// },
4874 /// "mounts": {
4875 /// "description": "List of installed mounts after the installation of the new mount.",
4876 /// "type": "array",
4877 /// "items": {
4878 /// "$ref": "#/components/schemas/ShipMount"
4879 /// }
4880 /// },
4881 /// "transaction": {
4882 /// "$ref": "#/components/schemas/ShipModificationTransaction"
4883 /// }
4884 /// }
4885 /// }
4886 /// }
4887 ///}
4888 /// ```
4889 /// </details>
4890 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4891 pub struct InstallMount201Response {
4892 pub data: InstallMount201ResponseData,
4893 }
4894 ///`InstallMount201ResponseData`
4895 ///
4896 /// <details><summary>JSON schema</summary>
4897 ///
4898 /// ```json
4899 ///{
4900 /// "type": "object",
4901 /// "required": [
4902 /// "agent",
4903 /// "cargo",
4904 /// "mounts",
4905 /// "transaction"
4906 /// ],
4907 /// "properties": {
4908 /// "agent": {
4909 /// "$ref": "#/components/schemas/Agent"
4910 /// },
4911 /// "cargo": {
4912 /// "$ref": "#/components/schemas/ShipCargo"
4913 /// },
4914 /// "mounts": {
4915 /// "description": "List of installed mounts after the installation of the new mount.",
4916 /// "type": "array",
4917 /// "items": {
4918 /// "$ref": "#/components/schemas/ShipMount"
4919 /// }
4920 /// },
4921 /// "transaction": {
4922 /// "$ref": "#/components/schemas/ShipModificationTransaction"
4923 /// }
4924 /// }
4925 ///}
4926 /// ```
4927 /// </details>
4928 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4929 pub struct InstallMount201ResponseData {
4930 pub agent: Agent,
4931 pub cargo: ShipCargo,
4932 ///List of installed mounts after the installation of the new mount.
4933 pub mounts: ::std::vec::Vec<ShipMount>,
4934 pub transaction: ShipModificationTransaction,
4935 }
4936 ///`InstallMountRequest`
4937 ///
4938 /// <details><summary>JSON schema</summary>
4939 ///
4940 /// ```json
4941 ///{
4942 /// "title": "Install Mount Request",
4943 /// "type": "object",
4944 /// "required": [
4945 /// "symbol"
4946 /// ],
4947 /// "properties": {
4948 /// "symbol": {
4949 /// "description": "The symbol of the mount to install.",
4950 /// "type": "string",
4951 /// "minLength": 1
4952 /// }
4953 /// }
4954 ///}
4955 /// ```
4956 /// </details>
4957 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4958 pub struct InstallMountRequest {
4959 ///The symbol of the mount to install.
4960 pub symbol: InstallMountRequestSymbol,
4961 }
4962 ///The symbol of the mount to install.
4963 ///
4964 /// <details><summary>JSON schema</summary>
4965 ///
4966 /// ```json
4967 ///{
4968 /// "description": "The symbol of the mount to install.",
4969 /// "type": "string",
4970 /// "minLength": 1
4971 ///}
4972 /// ```
4973 /// </details>
4974 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4975 #[serde(transparent)]
4976 pub struct InstallMountRequestSymbol(::std::string::String);
4977 impl ::std::ops::Deref for InstallMountRequestSymbol {
4978 type Target = ::std::string::String;
4979 fn deref(&self) -> &::std::string::String {
4980 &self.0
4981 }
4982 }
4983 impl ::std::convert::From<InstallMountRequestSymbol> for ::std::string::String {
4984 fn from(value: InstallMountRequestSymbol) -> Self {
4985 value.0
4986 }
4987 }
4988 impl ::std::str::FromStr for InstallMountRequestSymbol {
4989 type Err = self::error::ConversionError;
4990 fn from_str(
4991 value: &str,
4992 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4993 if value.chars().count() < 1usize {
4994 return Err("shorter than 1 characters".into());
4995 }
4996 Ok(Self(value.to_string()))
4997 }
4998 }
4999 impl ::std::convert::TryFrom<&str> for InstallMountRequestSymbol {
5000 type Error = self::error::ConversionError;
5001 fn try_from(
5002 value: &str,
5003 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5004 value.parse()
5005 }
5006 }
5007 impl ::std::convert::TryFrom<&::std::string::String> for InstallMountRequestSymbol {
5008 type Error = self::error::ConversionError;
5009 fn try_from(
5010 value: &::std::string::String,
5011 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5012 value.parse()
5013 }
5014 }
5015 impl ::std::convert::TryFrom<::std::string::String> for InstallMountRequestSymbol {
5016 type Error = self::error::ConversionError;
5017 fn try_from(
5018 value: ::std::string::String,
5019 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5020 value.parse()
5021 }
5022 }
5023 impl<'de> ::serde::Deserialize<'de> for InstallMountRequestSymbol {
5024 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5025 where
5026 D: ::serde::Deserializer<'de>,
5027 {
5028 ::std::string::String::deserialize(deserializer)?
5029 .parse()
5030 .map_err(|e: self::error::ConversionError| {
5031 <D::Error as ::serde::de::Error>::custom(e.to_string())
5032 })
5033 }
5034 }
5035 ///`InstallShipModuleBody`
5036 ///
5037 /// <details><summary>JSON schema</summary>
5038 ///
5039 /// ```json
5040 ///{
5041 /// "type": "object",
5042 /// "required": [
5043 /// "symbol"
5044 /// ],
5045 /// "properties": {
5046 /// "symbol": {
5047 /// "description": "The symbol of the module to install.",
5048 /// "type": "string",
5049 /// "minLength": 1
5050 /// }
5051 /// }
5052 ///}
5053 /// ```
5054 /// </details>
5055 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5056 pub struct InstallShipModuleBody {
5057 ///The symbol of the module to install.
5058 pub symbol: InstallShipModuleBodySymbol,
5059 }
5060 ///The symbol of the module to install.
5061 ///
5062 /// <details><summary>JSON schema</summary>
5063 ///
5064 /// ```json
5065 ///{
5066 /// "description": "The symbol of the module to install.",
5067 /// "type": "string",
5068 /// "minLength": 1
5069 ///}
5070 /// ```
5071 /// </details>
5072 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5073 #[serde(transparent)]
5074 pub struct InstallShipModuleBodySymbol(::std::string::String);
5075 impl ::std::ops::Deref for InstallShipModuleBodySymbol {
5076 type Target = ::std::string::String;
5077 fn deref(&self) -> &::std::string::String {
5078 &self.0
5079 }
5080 }
5081 impl ::std::convert::From<InstallShipModuleBodySymbol> for ::std::string::String {
5082 fn from(value: InstallShipModuleBodySymbol) -> Self {
5083 value.0
5084 }
5085 }
5086 impl ::std::str::FromStr for InstallShipModuleBodySymbol {
5087 type Err = self::error::ConversionError;
5088 fn from_str(
5089 value: &str,
5090 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5091 if value.chars().count() < 1usize {
5092 return Err("shorter than 1 characters".into());
5093 }
5094 Ok(Self(value.to_string()))
5095 }
5096 }
5097 impl ::std::convert::TryFrom<&str> for InstallShipModuleBodySymbol {
5098 type Error = self::error::ConversionError;
5099 fn try_from(
5100 value: &str,
5101 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5102 value.parse()
5103 }
5104 }
5105 impl ::std::convert::TryFrom<&::std::string::String>
5106 for InstallShipModuleBodySymbol {
5107 type Error = self::error::ConversionError;
5108 fn try_from(
5109 value: &::std::string::String,
5110 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5111 value.parse()
5112 }
5113 }
5114 impl ::std::convert::TryFrom<::std::string::String> for InstallShipModuleBodySymbol {
5115 type Error = self::error::ConversionError;
5116 fn try_from(
5117 value: ::std::string::String,
5118 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5119 value.parse()
5120 }
5121 }
5122 impl<'de> ::serde::Deserialize<'de> for InstallShipModuleBodySymbol {
5123 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5124 where
5125 D: ::serde::Deserializer<'de>,
5126 {
5127 ::std::string::String::deserialize(deserializer)?
5128 .parse()
5129 .map_err(|e: self::error::ConversionError| {
5130 <D::Error as ::serde::de::Error>::custom(e.to_string())
5131 })
5132 }
5133 }
5134 ///Successfully installed the module on the ship.
5135 ///
5136 /// <details><summary>JSON schema</summary>
5137 ///
5138 /// ```json
5139 ///{
5140 /// "description": "Successfully installed the module on the ship.",
5141 /// "type": "object",
5142 /// "required": [
5143 /// "data"
5144 /// ],
5145 /// "properties": {
5146 /// "data": {
5147 /// "type": "object",
5148 /// "required": [
5149 /// "agent",
5150 /// "cargo",
5151 /// "modules",
5152 /// "transaction"
5153 /// ],
5154 /// "properties": {
5155 /// "agent": {
5156 /// "$ref": "#/components/schemas/Agent"
5157 /// },
5158 /// "cargo": {
5159 /// "$ref": "#/components/schemas/ShipCargo"
5160 /// },
5161 /// "modules": {
5162 /// "type": "array",
5163 /// "items": {
5164 /// "$ref": "#/components/schemas/ShipModule"
5165 /// }
5166 /// },
5167 /// "transaction": {
5168 /// "$ref": "#/components/schemas/ShipModificationTransaction"
5169 /// }
5170 /// }
5171 /// }
5172 /// }
5173 ///}
5174 /// ```
5175 /// </details>
5176 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5177 pub struct InstallShipModuleResponse {
5178 pub data: InstallShipModuleResponseData,
5179 }
5180 ///`InstallShipModuleResponseData`
5181 ///
5182 /// <details><summary>JSON schema</summary>
5183 ///
5184 /// ```json
5185 ///{
5186 /// "type": "object",
5187 /// "required": [
5188 /// "agent",
5189 /// "cargo",
5190 /// "modules",
5191 /// "transaction"
5192 /// ],
5193 /// "properties": {
5194 /// "agent": {
5195 /// "$ref": "#/components/schemas/Agent"
5196 /// },
5197 /// "cargo": {
5198 /// "$ref": "#/components/schemas/ShipCargo"
5199 /// },
5200 /// "modules": {
5201 /// "type": "array",
5202 /// "items": {
5203 /// "$ref": "#/components/schemas/ShipModule"
5204 /// }
5205 /// },
5206 /// "transaction": {
5207 /// "$ref": "#/components/schemas/ShipModificationTransaction"
5208 /// }
5209 /// }
5210 ///}
5211 /// ```
5212 /// </details>
5213 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5214 pub struct InstallShipModuleResponseData {
5215 pub agent: Agent,
5216 pub cargo: ShipCargo,
5217 pub modules: ::std::vec::Vec<ShipModule>,
5218 pub transaction: ShipModificationTransaction,
5219 }
5220 ///`JettisonBody`
5221 ///
5222 /// <details><summary>JSON schema</summary>
5223 ///
5224 /// ```json
5225 ///{
5226 /// "type": "object",
5227 /// "required": [
5228 /// "symbol",
5229 /// "units"
5230 /// ],
5231 /// "properties": {
5232 /// "symbol": {
5233 /// "$ref": "#/components/schemas/TradeSymbol"
5234 /// },
5235 /// "units": {
5236 /// "description": "Amount of units to jettison of this good.",
5237 /// "type": "integer",
5238 /// "minimum": 1.0
5239 /// }
5240 /// }
5241 ///}
5242 /// ```
5243 /// </details>
5244 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5245 pub struct JettisonBody {
5246 pub symbol: TradeSymbol,
5247 ///Amount of units to jettison of this good.
5248 pub units: ::std::num::NonZeroU64,
5249 }
5250 ///Jettison successful.
5251 ///
5252 /// <details><summary>JSON schema</summary>
5253 ///
5254 /// ```json
5255 ///{
5256 /// "description": "Jettison successful.",
5257 /// "type": "object",
5258 /// "required": [
5259 /// "data"
5260 /// ],
5261 /// "properties": {
5262 /// "data": {
5263 /// "type": "object",
5264 /// "required": [
5265 /// "cargo"
5266 /// ],
5267 /// "properties": {
5268 /// "cargo": {
5269 /// "$ref": "#/components/schemas/ShipCargo"
5270 /// }
5271 /// }
5272 /// }
5273 /// }
5274 ///}
5275 /// ```
5276 /// </details>
5277 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5278 pub struct JettisonResponse {
5279 pub data: JettisonResponseData,
5280 }
5281 ///`JettisonResponseData`
5282 ///
5283 /// <details><summary>JSON schema</summary>
5284 ///
5285 /// ```json
5286 ///{
5287 /// "type": "object",
5288 /// "required": [
5289 /// "cargo"
5290 /// ],
5291 /// "properties": {
5292 /// "cargo": {
5293 /// "$ref": "#/components/schemas/ShipCargo"
5294 /// }
5295 /// }
5296 ///}
5297 /// ```
5298 /// </details>
5299 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5300 pub struct JettisonResponseData {
5301 pub cargo: ShipCargo,
5302 }
5303 ///Details of a jump gate waypoint.
5304 ///
5305 /// <details><summary>JSON schema</summary>
5306 ///
5307 /// ```json
5308 ///{
5309 /// "description": "Details of a jump gate waypoint.",
5310 /// "type": "object",
5311 /// "required": [
5312 /// "connections",
5313 /// "symbol"
5314 /// ],
5315 /// "properties": {
5316 /// "connections": {
5317 /// "description": "All the gates that are connected to this waypoint.",
5318 /// "type": "array",
5319 /// "items": {
5320 /// "description": "The symbol of the waypoint that has a corresponding gate.",
5321 /// "type": "string"
5322 /// }
5323 /// },
5324 /// "symbol": {
5325 /// "$ref": "#/components/schemas/WaypointSymbol"
5326 /// }
5327 /// }
5328 ///}
5329 /// ```
5330 /// </details>
5331 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5332 pub struct JumpGate {
5333 ///All the gates that are connected to this waypoint.
5334 pub connections: ::std::vec::Vec<::std::string::String>,
5335 pub symbol: WaypointSymbol,
5336 }
5337 ///`JumpShipBody`
5338 ///
5339 /// <details><summary>JSON schema</summary>
5340 ///
5341 /// ```json
5342 ///{
5343 /// "type": "object",
5344 /// "required": [
5345 /// "waypointSymbol"
5346 /// ],
5347 /// "properties": {
5348 /// "waypointSymbol": {
5349 /// "description": "The symbol of the waypoint to jump to. The destination must be a connected waypoint.",
5350 /// "type": "string"
5351 /// }
5352 /// }
5353 ///}
5354 /// ```
5355 /// </details>
5356 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5357 pub struct JumpShipBody {
5358 ///The symbol of the waypoint to jump to. The destination must be a connected waypoint.
5359 #[serde(rename = "waypointSymbol")]
5360 pub waypoint_symbol: ::std::string::String,
5361 }
5362 ///Jump successful.
5363 ///
5364 /// <details><summary>JSON schema</summary>
5365 ///
5366 /// ```json
5367 ///{
5368 /// "description": "Jump successful.",
5369 /// "type": "object",
5370 /// "required": [
5371 /// "data"
5372 /// ],
5373 /// "properties": {
5374 /// "data": {
5375 /// "type": "object",
5376 /// "required": [
5377 /// "agent",
5378 /// "cooldown",
5379 /// "nav",
5380 /// "transaction"
5381 /// ],
5382 /// "properties": {
5383 /// "agent": {
5384 /// "$ref": "#/components/schemas/Agent"
5385 /// },
5386 /// "cooldown": {
5387 /// "$ref": "#/components/schemas/Cooldown"
5388 /// },
5389 /// "nav": {
5390 /// "$ref": "#/components/schemas/ShipNav"
5391 /// },
5392 /// "transaction": {
5393 /// "$ref": "#/components/schemas/MarketTransaction"
5394 /// }
5395 /// }
5396 /// }
5397 /// }
5398 ///}
5399 /// ```
5400 /// </details>
5401 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5402 pub struct JumpShipResponse {
5403 pub data: JumpShipResponseData,
5404 }
5405 ///`JumpShipResponseData`
5406 ///
5407 /// <details><summary>JSON schema</summary>
5408 ///
5409 /// ```json
5410 ///{
5411 /// "type": "object",
5412 /// "required": [
5413 /// "agent",
5414 /// "cooldown",
5415 /// "nav",
5416 /// "transaction"
5417 /// ],
5418 /// "properties": {
5419 /// "agent": {
5420 /// "$ref": "#/components/schemas/Agent"
5421 /// },
5422 /// "cooldown": {
5423 /// "$ref": "#/components/schemas/Cooldown"
5424 /// },
5425 /// "nav": {
5426 /// "$ref": "#/components/schemas/ShipNav"
5427 /// },
5428 /// "transaction": {
5429 /// "$ref": "#/components/schemas/MarketTransaction"
5430 /// }
5431 /// }
5432 ///}
5433 /// ```
5434 /// </details>
5435 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5436 pub struct JumpShipResponseData {
5437 pub agent: Agent,
5438 pub cooldown: Cooldown,
5439 pub nav: ShipNav,
5440 pub transaction: MarketTransaction,
5441 }
5442 ///Market details.
5443 ///
5444 /// <details><summary>JSON schema</summary>
5445 ///
5446 /// ```json
5447 ///{
5448 /// "description": "Market details.",
5449 /// "type": "object",
5450 /// "required": [
5451 /// "exchange",
5452 /// "exports",
5453 /// "imports",
5454 /// "symbol"
5455 /// ],
5456 /// "properties": {
5457 /// "exchange": {
5458 /// "description": "The list of goods that are bought and sold between agents at this market.",
5459 /// "type": "array",
5460 /// "items": {
5461 /// "$ref": "#/components/schemas/TradeGood"
5462 /// }
5463 /// },
5464 /// "exports": {
5465 /// "description": "The list of goods that are exported from this market.",
5466 /// "type": "array",
5467 /// "items": {
5468 /// "$ref": "#/components/schemas/TradeGood"
5469 /// }
5470 /// },
5471 /// "imports": {
5472 /// "description": "The list of goods that are sought as imports in this market.",
5473 /// "type": "array",
5474 /// "items": {
5475 /// "$ref": "#/components/schemas/TradeGood"
5476 /// }
5477 /// },
5478 /// "symbol": {
5479 /// "description": "The symbol of the market. The symbol is the same as the waypoint where the market is located.",
5480 /// "type": "string"
5481 /// },
5482 /// "tradeGoods": {
5483 /// "description": "The list of goods that are traded at this market. Visible only when a ship is present at the market.",
5484 /// "type": "array",
5485 /// "items": {
5486 /// "$ref": "#/components/schemas/MarketTradeGood"
5487 /// }
5488 /// },
5489 /// "transactions": {
5490 /// "description": "The list of recent transactions at this market. Visible only when a ship is present at the market.",
5491 /// "type": "array",
5492 /// "items": {
5493 /// "$ref": "#/components/schemas/MarketTransaction"
5494 /// }
5495 /// }
5496 /// }
5497 ///}
5498 /// ```
5499 /// </details>
5500 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5501 pub struct Market {
5502 ///The list of goods that are bought and sold between agents at this market.
5503 pub exchange: ::std::vec::Vec<TradeGood>,
5504 ///The list of goods that are exported from this market.
5505 pub exports: ::std::vec::Vec<TradeGood>,
5506 ///The list of goods that are sought as imports in this market.
5507 pub imports: ::std::vec::Vec<TradeGood>,
5508 ///The symbol of the market. The symbol is the same as the waypoint where the market is located.
5509 pub symbol: ::std::string::String,
5510 ///The list of goods that are traded at this market. Visible only when a ship is present at the market.
5511 #[serde(
5512 rename = "tradeGoods",
5513 default,
5514 skip_serializing_if = "::std::vec::Vec::is_empty"
5515 )]
5516 pub trade_goods: ::std::vec::Vec<MarketTradeGood>,
5517 ///The list of recent transactions at this market. Visible only when a ship is present at the market.
5518 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5519 pub transactions: ::std::vec::Vec<MarketTransaction>,
5520 }
5521 ///`MarketTradeGood`
5522 ///
5523 /// <details><summary>JSON schema</summary>
5524 ///
5525 /// ```json
5526 ///{
5527 /// "type": "object",
5528 /// "required": [
5529 /// "purchasePrice",
5530 /// "sellPrice",
5531 /// "supply",
5532 /// "symbol",
5533 /// "tradeVolume",
5534 /// "type"
5535 /// ],
5536 /// "properties": {
5537 /// "activity": {
5538 /// "$ref": "#/components/schemas/ActivityLevel"
5539 /// },
5540 /// "purchasePrice": {
5541 /// "description": "The price at which this good can be purchased from the market.",
5542 /// "type": "integer",
5543 /// "minimum": 0.0
5544 /// },
5545 /// "sellPrice": {
5546 /// "description": "The price at which this good can be sold to the market.",
5547 /// "type": "integer",
5548 /// "minimum": 0.0
5549 /// },
5550 /// "supply": {
5551 /// "$ref": "#/components/schemas/SupplyLevel"
5552 /// },
5553 /// "symbol": {
5554 /// "$ref": "#/components/schemas/TradeSymbol"
5555 /// },
5556 /// "tradeVolume": {
5557 /// "description": "This is the maximum number of units that can be purchased or sold at this market in a single trade for this good. Trade volume also gives an indication of price volatility. A market with a low trade volume will have large price swings, while high trade volume will be more resilient to price changes.",
5558 /// "type": "integer",
5559 /// "minimum": 1.0
5560 /// },
5561 /// "type": {
5562 /// "description": "The type of trade good (export, import, or exchange).",
5563 /// "type": "string",
5564 /// "enum": [
5565 /// "EXPORT",
5566 /// "IMPORT",
5567 /// "EXCHANGE"
5568 /// ]
5569 /// }
5570 /// }
5571 ///}
5572 /// ```
5573 /// </details>
5574 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5575 pub struct MarketTradeGood {
5576 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5577 pub activity: ::std::option::Option<ActivityLevel>,
5578 ///The price at which this good can be purchased from the market.
5579 #[serde(rename = "purchasePrice")]
5580 pub purchase_price: u64,
5581 ///The price at which this good can be sold to the market.
5582 #[serde(rename = "sellPrice")]
5583 pub sell_price: u64,
5584 pub supply: SupplyLevel,
5585 pub symbol: TradeSymbol,
5586 ///This is the maximum number of units that can be purchased or sold at this market in a single trade for this good. Trade volume also gives an indication of price volatility. A market with a low trade volume will have large price swings, while high trade volume will be more resilient to price changes.
5587 #[serde(rename = "tradeVolume")]
5588 pub trade_volume: ::std::num::NonZeroU64,
5589 ///The type of trade good (export, import, or exchange).
5590 #[serde(rename = "type")]
5591 pub type_: MarketTradeGoodType,
5592 }
5593 ///The type of trade good (export, import, or exchange).
5594 ///
5595 /// <details><summary>JSON schema</summary>
5596 ///
5597 /// ```json
5598 ///{
5599 /// "description": "The type of trade good (export, import, or exchange).",
5600 /// "type": "string",
5601 /// "enum": [
5602 /// "EXPORT",
5603 /// "IMPORT",
5604 /// "EXCHANGE"
5605 /// ]
5606 ///}
5607 /// ```
5608 /// </details>
5609 #[derive(
5610 ::serde::Deserialize,
5611 ::serde::Serialize,
5612 Clone,
5613 Copy,
5614 Debug,
5615 Eq,
5616 Hash,
5617 Ord,
5618 PartialEq,
5619 PartialOrd
5620 )]
5621 pub enum MarketTradeGoodType {
5622 #[serde(rename = "EXPORT")]
5623 Export,
5624 #[serde(rename = "IMPORT")]
5625 Import,
5626 #[serde(rename = "EXCHANGE")]
5627 Exchange,
5628 }
5629 impl ::std::fmt::Display for MarketTradeGoodType {
5630 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5631 match *self {
5632 Self::Export => f.write_str("EXPORT"),
5633 Self::Import => f.write_str("IMPORT"),
5634 Self::Exchange => f.write_str("EXCHANGE"),
5635 }
5636 }
5637 }
5638 impl ::std::str::FromStr for MarketTradeGoodType {
5639 type Err = self::error::ConversionError;
5640 fn from_str(
5641 value: &str,
5642 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5643 match value {
5644 "EXPORT" => Ok(Self::Export),
5645 "IMPORT" => Ok(Self::Import),
5646 "EXCHANGE" => Ok(Self::Exchange),
5647 _ => Err("invalid value".into()),
5648 }
5649 }
5650 }
5651 impl ::std::convert::TryFrom<&str> for MarketTradeGoodType {
5652 type Error = self::error::ConversionError;
5653 fn try_from(
5654 value: &str,
5655 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5656 value.parse()
5657 }
5658 }
5659 impl ::std::convert::TryFrom<&::std::string::String> for MarketTradeGoodType {
5660 type Error = self::error::ConversionError;
5661 fn try_from(
5662 value: &::std::string::String,
5663 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5664 value.parse()
5665 }
5666 }
5667 impl ::std::convert::TryFrom<::std::string::String> for MarketTradeGoodType {
5668 type Error = self::error::ConversionError;
5669 fn try_from(
5670 value: ::std::string::String,
5671 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5672 value.parse()
5673 }
5674 }
5675 ///Result of a transaction with a market.
5676 ///
5677 /// <details><summary>JSON schema</summary>
5678 ///
5679 /// ```json
5680 ///{
5681 /// "description": "Result of a transaction with a market.",
5682 /// "type": "object",
5683 /// "required": [
5684 /// "pricePerUnit",
5685 /// "shipSymbol",
5686 /// "timestamp",
5687 /// "totalPrice",
5688 /// "tradeSymbol",
5689 /// "type",
5690 /// "units",
5691 /// "waypointSymbol"
5692 /// ],
5693 /// "properties": {
5694 /// "pricePerUnit": {
5695 /// "description": "The price per unit of the transaction.",
5696 /// "type": "integer",
5697 /// "minimum": 0.0
5698 /// },
5699 /// "shipSymbol": {
5700 /// "description": "The symbol of the ship that made the transaction.",
5701 /// "type": "string"
5702 /// },
5703 /// "timestamp": {
5704 /// "description": "The timestamp of the transaction.",
5705 /// "type": "string",
5706 /// "format": "date-time"
5707 /// },
5708 /// "totalPrice": {
5709 /// "description": "The total price of the transaction.",
5710 /// "type": "integer",
5711 /// "minimum": 0.0
5712 /// },
5713 /// "tradeSymbol": {
5714 /// "description": "The symbol of the trade good.",
5715 /// "type": "string"
5716 /// },
5717 /// "type": {
5718 /// "description": "The type of transaction.",
5719 /// "type": "string",
5720 /// "enum": [
5721 /// "PURCHASE",
5722 /// "SELL"
5723 /// ]
5724 /// },
5725 /// "units": {
5726 /// "description": "The number of units of the transaction.",
5727 /// "type": "integer",
5728 /// "minimum": 0.0
5729 /// },
5730 /// "waypointSymbol": {
5731 /// "$ref": "#/components/schemas/WaypointSymbol"
5732 /// }
5733 /// }
5734 ///}
5735 /// ```
5736 /// </details>
5737 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5738 pub struct MarketTransaction {
5739 ///The price per unit of the transaction.
5740 #[serde(rename = "pricePerUnit")]
5741 pub price_per_unit: u64,
5742 ///The symbol of the ship that made the transaction.
5743 #[serde(rename = "shipSymbol")]
5744 pub ship_symbol: ::std::string::String,
5745 ///The timestamp of the transaction.
5746 pub timestamp: ::chrono::DateTime<::chrono::offset::Utc>,
5747 ///The total price of the transaction.
5748 #[serde(rename = "totalPrice")]
5749 pub total_price: u64,
5750 ///The symbol of the trade good.
5751 #[serde(rename = "tradeSymbol")]
5752 pub trade_symbol: ::std::string::String,
5753 ///The type of transaction.
5754 #[serde(rename = "type")]
5755 pub type_: MarketTransactionType,
5756 ///The number of units of the transaction.
5757 pub units: u64,
5758 #[serde(rename = "waypointSymbol")]
5759 pub waypoint_symbol: WaypointSymbol,
5760 }
5761 ///The type of transaction.
5762 ///
5763 /// <details><summary>JSON schema</summary>
5764 ///
5765 /// ```json
5766 ///{
5767 /// "description": "The type of transaction.",
5768 /// "type": "string",
5769 /// "enum": [
5770 /// "PURCHASE",
5771 /// "SELL"
5772 /// ]
5773 ///}
5774 /// ```
5775 /// </details>
5776 #[derive(
5777 ::serde::Deserialize,
5778 ::serde::Serialize,
5779 Clone,
5780 Copy,
5781 Debug,
5782 Eq,
5783 Hash,
5784 Ord,
5785 PartialEq,
5786 PartialOrd
5787 )]
5788 pub enum MarketTransactionType {
5789 #[serde(rename = "PURCHASE")]
5790 Purchase,
5791 #[serde(rename = "SELL")]
5792 Sell,
5793 }
5794 impl ::std::fmt::Display for MarketTransactionType {
5795 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5796 match *self {
5797 Self::Purchase => f.write_str("PURCHASE"),
5798 Self::Sell => f.write_str("SELL"),
5799 }
5800 }
5801 }
5802 impl ::std::str::FromStr for MarketTransactionType {
5803 type Err = self::error::ConversionError;
5804 fn from_str(
5805 value: &str,
5806 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5807 match value {
5808 "PURCHASE" => Ok(Self::Purchase),
5809 "SELL" => Ok(Self::Sell),
5810 _ => Err("invalid value".into()),
5811 }
5812 }
5813 }
5814 impl ::std::convert::TryFrom<&str> for MarketTransactionType {
5815 type Error = self::error::ConversionError;
5816 fn try_from(
5817 value: &str,
5818 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5819 value.parse()
5820 }
5821 }
5822 impl ::std::convert::TryFrom<&::std::string::String> for MarketTransactionType {
5823 type Error = self::error::ConversionError;
5824 fn try_from(
5825 value: &::std::string::String,
5826 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5827 value.parse()
5828 }
5829 }
5830 impl ::std::convert::TryFrom<::std::string::String> for MarketTransactionType {
5831 type Error = self::error::ConversionError;
5832 fn try_from(
5833 value: ::std::string::String,
5834 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5835 value.parse()
5836 }
5837 }
5838 ///Meta details for pagination.
5839 ///
5840 /// <details><summary>JSON schema</summary>
5841 ///
5842 /// ```json
5843 ///{
5844 /// "description": "Meta details for pagination.",
5845 /// "type": "object",
5846 /// "required": [
5847 /// "limit",
5848 /// "page",
5849 /// "total"
5850 /// ],
5851 /// "properties": {
5852 /// "limit": {
5853 /// "description": "The amount of items in each page. Limits how many items can be fetched at once.",
5854 /// "default": 10,
5855 /// "type": "integer",
5856 /// "maximum": 20.0,
5857 /// "minimum": 1.0
5858 /// },
5859 /// "page": {
5860 /// "description": "A page denotes an amount of items, offset from the first item. Each page holds an amount of items equal to the `limit`.",
5861 /// "default": 1,
5862 /// "type": "integer",
5863 /// "minimum": 1.0
5864 /// },
5865 /// "total": {
5866 /// "description": "Shows the total amount of items of this kind that exist.",
5867 /// "type": "integer",
5868 /// "minimum": 0.0
5869 /// }
5870 /// }
5871 ///}
5872 /// ```
5873 /// </details>
5874 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5875 pub struct Meta {
5876 ///The amount of items in each page. Limits how many items can be fetched at once.
5877 pub limit: ::std::num::NonZeroU64,
5878 ///A page denotes an amount of items, offset from the first item. Each page holds an amount of items equal to the `limit`.
5879 pub page: ::std::num::NonZeroU64,
5880 ///Shows the total amount of items of this kind that exist.
5881 pub total: u64,
5882 }
5883 ///`NavigateShipBody`
5884 ///
5885 /// <details><summary>JSON schema</summary>
5886 ///
5887 /// ```json
5888 ///{
5889 /// "type": "object",
5890 /// "required": [
5891 /// "waypointSymbol"
5892 /// ],
5893 /// "properties": {
5894 /// "waypointSymbol": {
5895 /// "description": "The symbol of the waypoint to navigate/warp to.",
5896 /// "type": "string",
5897 /// "minLength": 1
5898 /// }
5899 /// }
5900 ///}
5901 /// ```
5902 /// </details>
5903 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5904 pub struct NavigateShipBody {
5905 ///The symbol of the waypoint to navigate/warp to.
5906 #[serde(rename = "waypointSymbol")]
5907 pub waypoint_symbol: NavigateShipBodyWaypointSymbol,
5908 }
5909 ///The symbol of the waypoint to navigate/warp to.
5910 ///
5911 /// <details><summary>JSON schema</summary>
5912 ///
5913 /// ```json
5914 ///{
5915 /// "description": "The symbol of the waypoint to navigate/warp to.",
5916 /// "type": "string",
5917 /// "minLength": 1
5918 ///}
5919 /// ```
5920 /// </details>
5921 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5922 #[serde(transparent)]
5923 pub struct NavigateShipBodyWaypointSymbol(::std::string::String);
5924 impl ::std::ops::Deref for NavigateShipBodyWaypointSymbol {
5925 type Target = ::std::string::String;
5926 fn deref(&self) -> &::std::string::String {
5927 &self.0
5928 }
5929 }
5930 impl ::std::convert::From<NavigateShipBodyWaypointSymbol> for ::std::string::String {
5931 fn from(value: NavigateShipBodyWaypointSymbol) -> Self {
5932 value.0
5933 }
5934 }
5935 impl ::std::str::FromStr for NavigateShipBodyWaypointSymbol {
5936 type Err = self::error::ConversionError;
5937 fn from_str(
5938 value: &str,
5939 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5940 if value.chars().count() < 1usize {
5941 return Err("shorter than 1 characters".into());
5942 }
5943 Ok(Self(value.to_string()))
5944 }
5945 }
5946 impl ::std::convert::TryFrom<&str> for NavigateShipBodyWaypointSymbol {
5947 type Error = self::error::ConversionError;
5948 fn try_from(
5949 value: &str,
5950 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5951 value.parse()
5952 }
5953 }
5954 impl ::std::convert::TryFrom<&::std::string::String>
5955 for NavigateShipBodyWaypointSymbol {
5956 type Error = self::error::ConversionError;
5957 fn try_from(
5958 value: &::std::string::String,
5959 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5960 value.parse()
5961 }
5962 }
5963 impl ::std::convert::TryFrom<::std::string::String>
5964 for NavigateShipBodyWaypointSymbol {
5965 type Error = self::error::ConversionError;
5966 fn try_from(
5967 value: ::std::string::String,
5968 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5969 value.parse()
5970 }
5971 }
5972 impl<'de> ::serde::Deserialize<'de> for NavigateShipBodyWaypointSymbol {
5973 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5974 where
5975 D: ::serde::Deserializer<'de>,
5976 {
5977 ::std::string::String::deserialize(deserializer)?
5978 .parse()
5979 .map_err(|e: self::error::ConversionError| {
5980 <D::Error as ::serde::de::Error>::custom(e.to_string())
5981 })
5982 }
5983 }
5984 ///The successful transit information including the route details and changes to ship fuel. The route includes the expected time of arrival.
5985 ///
5986 /// <details><summary>JSON schema</summary>
5987 ///
5988 /// ```json
5989 ///{
5990 /// "description": "The successful transit information including the route details and changes to ship fuel. The route includes the expected time of arrival.",
5991 /// "type": "object",
5992 /// "required": [
5993 /// "data"
5994 /// ],
5995 /// "properties": {
5996 /// "data": {
5997 /// "type": "object",
5998 /// "required": [
5999 /// "events",
6000 /// "fuel",
6001 /// "nav"
6002 /// ],
6003 /// "properties": {
6004 /// "events": {
6005 /// "type": "array",
6006 /// "items": {
6007 /// "$ref": "#/components/schemas/ShipConditionEvent"
6008 /// }
6009 /// },
6010 /// "fuel": {
6011 /// "$ref": "#/components/schemas/ShipFuel"
6012 /// },
6013 /// "nav": {
6014 /// "$ref": "#/components/schemas/ShipNav"
6015 /// }
6016 /// }
6017 /// }
6018 /// }
6019 ///}
6020 /// ```
6021 /// </details>
6022 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6023 pub struct NavigateShipResponse {
6024 pub data: NavigateShipResponseData,
6025 }
6026 ///`NavigateShipResponseData`
6027 ///
6028 /// <details><summary>JSON schema</summary>
6029 ///
6030 /// ```json
6031 ///{
6032 /// "type": "object",
6033 /// "required": [
6034 /// "events",
6035 /// "fuel",
6036 /// "nav"
6037 /// ],
6038 /// "properties": {
6039 /// "events": {
6040 /// "type": "array",
6041 /// "items": {
6042 /// "$ref": "#/components/schemas/ShipConditionEvent"
6043 /// }
6044 /// },
6045 /// "fuel": {
6046 /// "$ref": "#/components/schemas/ShipFuel"
6047 /// },
6048 /// "nav": {
6049 /// "$ref": "#/components/schemas/ShipNav"
6050 /// }
6051 /// }
6052 ///}
6053 /// ```
6054 /// </details>
6055 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6056 pub struct NavigateShipResponseData {
6057 pub events: ::std::vec::Vec<ShipConditionEvent>,
6058 pub fuel: ShipFuel,
6059 pub nav: ShipNav,
6060 }
6061 ///Successfully negotiated a new contract.
6062 ///
6063 /// <details><summary>JSON schema</summary>
6064 ///
6065 /// ```json
6066 ///{
6067 /// "title": "Negotiate Contract 201 Response",
6068 /// "description": "Successfully negotiated a new contract.",
6069 /// "type": "object",
6070 /// "required": [
6071 /// "data"
6072 /// ],
6073 /// "properties": {
6074 /// "data": {
6075 /// "type": "object",
6076 /// "required": [
6077 /// "contract"
6078 /// ],
6079 /// "properties": {
6080 /// "contract": {
6081 /// "$ref": "#/components/schemas/Contract"
6082 /// }
6083 /// }
6084 /// }
6085 /// }
6086 ///}
6087 /// ```
6088 /// </details>
6089 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6090 pub struct NegotiateContract201Response {
6091 pub data: NegotiateContract201ResponseData,
6092 }
6093 ///`NegotiateContract201ResponseData`
6094 ///
6095 /// <details><summary>JSON schema</summary>
6096 ///
6097 /// ```json
6098 ///{
6099 /// "type": "object",
6100 /// "required": [
6101 /// "contract"
6102 /// ],
6103 /// "properties": {
6104 /// "contract": {
6105 /// "$ref": "#/components/schemas/Contract"
6106 /// }
6107 /// }
6108 ///}
6109 /// ```
6110 /// </details>
6111 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6112 pub struct NegotiateContract201ResponseData {
6113 pub contract: Contract,
6114 }
6115 ///The ship has successfully moved into orbit at its current location.
6116 ///
6117 /// <details><summary>JSON schema</summary>
6118 ///
6119 /// ```json
6120 ///{
6121 /// "title": "Orbit Ship 200 Response",
6122 /// "description": "The ship has successfully moved into orbit at its current location.",
6123 /// "type": "object",
6124 /// "required": [
6125 /// "data"
6126 /// ],
6127 /// "properties": {
6128 /// "data": {
6129 /// "type": "object",
6130 /// "required": [
6131 /// "nav"
6132 /// ],
6133 /// "properties": {
6134 /// "nav": {
6135 /// "$ref": "#/components/schemas/ShipNav"
6136 /// }
6137 /// }
6138 /// }
6139 /// }
6140 ///}
6141 /// ```
6142 /// </details>
6143 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6144 pub struct OrbitShip200Response {
6145 pub data: OrbitShip200ResponseData,
6146 }
6147 ///`OrbitShip200ResponseData`
6148 ///
6149 /// <details><summary>JSON schema</summary>
6150 ///
6151 /// ```json
6152 ///{
6153 /// "type": "object",
6154 /// "required": [
6155 /// "nav"
6156 /// ],
6157 /// "properties": {
6158 /// "nav": {
6159 /// "$ref": "#/components/schemas/ShipNav"
6160 /// }
6161 /// }
6162 ///}
6163 /// ```
6164 /// </details>
6165 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6166 pub struct OrbitShip200ResponseData {
6167 pub nav: ShipNav,
6168 }
6169 ///`PatchShipNavBody`
6170 ///
6171 /// <details><summary>JSON schema</summary>
6172 ///
6173 /// ```json
6174 ///{
6175 /// "type": "object",
6176 /// "properties": {
6177 /// "flightMode": {
6178 /// "$ref": "#/components/schemas/ShipNavFlightMode"
6179 /// }
6180 /// }
6181 ///}
6182 /// ```
6183 /// </details>
6184 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6185 pub struct PatchShipNavBody {
6186 #[serde(
6187 rename = "flightMode",
6188 default,
6189 skip_serializing_if = "::std::option::Option::is_none"
6190 )]
6191 pub flight_mode: ::std::option::Option<ShipNavFlightMode>,
6192 }
6193 impl ::std::default::Default for PatchShipNavBody {
6194 fn default() -> Self {
6195 Self {
6196 flight_mode: Default::default(),
6197 }
6198 }
6199 }
6200 ///Success response for updating the nav configuration of a ship.
6201 ///
6202 /// <details><summary>JSON schema</summary>
6203 ///
6204 /// ```json
6205 ///{
6206 /// "description": "Success response for updating the nav configuration of a ship.",
6207 /// "type": "object",
6208 /// "required": [
6209 /// "data"
6210 /// ],
6211 /// "properties": {
6212 /// "data": {
6213 /// "type": "object",
6214 /// "required": [
6215 /// "events",
6216 /// "fuel",
6217 /// "nav"
6218 /// ],
6219 /// "properties": {
6220 /// "events": {
6221 /// "type": "array",
6222 /// "items": {
6223 /// "$ref": "#/components/schemas/ShipConditionEvent"
6224 /// }
6225 /// },
6226 /// "fuel": {
6227 /// "$ref": "#/components/schemas/ShipFuel"
6228 /// },
6229 /// "nav": {
6230 /// "$ref": "#/components/schemas/ShipNav"
6231 /// }
6232 /// }
6233 /// }
6234 /// }
6235 ///}
6236 /// ```
6237 /// </details>
6238 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6239 pub struct PatchShipNavResponse {
6240 pub data: PatchShipNavResponseData,
6241 }
6242 ///`PatchShipNavResponseData`
6243 ///
6244 /// <details><summary>JSON schema</summary>
6245 ///
6246 /// ```json
6247 ///{
6248 /// "type": "object",
6249 /// "required": [
6250 /// "events",
6251 /// "fuel",
6252 /// "nav"
6253 /// ],
6254 /// "properties": {
6255 /// "events": {
6256 /// "type": "array",
6257 /// "items": {
6258 /// "$ref": "#/components/schemas/ShipConditionEvent"
6259 /// }
6260 /// },
6261 /// "fuel": {
6262 /// "$ref": "#/components/schemas/ShipFuel"
6263 /// },
6264 /// "nav": {
6265 /// "$ref": "#/components/schemas/ShipNav"
6266 /// }
6267 /// }
6268 ///}
6269 /// ```
6270 /// </details>
6271 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6272 pub struct PatchShipNavResponseData {
6273 pub events: ::std::vec::Vec<ShipConditionEvent>,
6274 pub fuel: ShipFuel,
6275 pub nav: ShipNav,
6276 }
6277 ///Public agent details.
6278 ///
6279 /// <details><summary>JSON schema</summary>
6280 ///
6281 /// ```json
6282 ///{
6283 /// "description": "Public agent details.",
6284 /// "type": "object",
6285 /// "required": [
6286 /// "credits",
6287 /// "headquarters",
6288 /// "shipCount",
6289 /// "startingFaction",
6290 /// "symbol"
6291 /// ],
6292 /// "properties": {
6293 /// "credits": {
6294 /// "description": "The number of credits the agent has available. Credits can be negative if funds have been overdrawn.",
6295 /// "type": "integer",
6296 /// "format": "int64"
6297 /// },
6298 /// "headquarters": {
6299 /// "description": "The headquarters of the agent.",
6300 /// "type": "string",
6301 /// "minLength": 1
6302 /// },
6303 /// "shipCount": {
6304 /// "description": "How many ships are owned by the agent.",
6305 /// "type": "integer"
6306 /// },
6307 /// "startingFaction": {
6308 /// "description": "The faction the agent started with.",
6309 /// "type": "string",
6310 /// "minLength": 1
6311 /// },
6312 /// "symbol": {
6313 /// "description": "Symbol of the agent.",
6314 /// "type": "string",
6315 /// "maxLength": 14,
6316 /// "minLength": 3
6317 /// }
6318 /// }
6319 ///}
6320 /// ```
6321 /// </details>
6322 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6323 pub struct PublicAgent {
6324 ///The number of credits the agent has available. Credits can be negative if funds have been overdrawn.
6325 pub credits: i64,
6326 ///The headquarters of the agent.
6327 pub headquarters: PublicAgentHeadquarters,
6328 ///How many ships are owned by the agent.
6329 #[serde(rename = "shipCount")]
6330 pub ship_count: i64,
6331 ///The faction the agent started with.
6332 #[serde(rename = "startingFaction")]
6333 pub starting_faction: PublicAgentStartingFaction,
6334 ///Symbol of the agent.
6335 pub symbol: PublicAgentSymbol,
6336 }
6337 ///The headquarters of the agent.
6338 ///
6339 /// <details><summary>JSON schema</summary>
6340 ///
6341 /// ```json
6342 ///{
6343 /// "description": "The headquarters of the agent.",
6344 /// "type": "string",
6345 /// "minLength": 1
6346 ///}
6347 /// ```
6348 /// </details>
6349 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6350 #[serde(transparent)]
6351 pub struct PublicAgentHeadquarters(::std::string::String);
6352 impl ::std::ops::Deref for PublicAgentHeadquarters {
6353 type Target = ::std::string::String;
6354 fn deref(&self) -> &::std::string::String {
6355 &self.0
6356 }
6357 }
6358 impl ::std::convert::From<PublicAgentHeadquarters> for ::std::string::String {
6359 fn from(value: PublicAgentHeadquarters) -> Self {
6360 value.0
6361 }
6362 }
6363 impl ::std::str::FromStr for PublicAgentHeadquarters {
6364 type Err = self::error::ConversionError;
6365 fn from_str(
6366 value: &str,
6367 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6368 if value.chars().count() < 1usize {
6369 return Err("shorter than 1 characters".into());
6370 }
6371 Ok(Self(value.to_string()))
6372 }
6373 }
6374 impl ::std::convert::TryFrom<&str> for PublicAgentHeadquarters {
6375 type Error = self::error::ConversionError;
6376 fn try_from(
6377 value: &str,
6378 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6379 value.parse()
6380 }
6381 }
6382 impl ::std::convert::TryFrom<&::std::string::String> for PublicAgentHeadquarters {
6383 type Error = self::error::ConversionError;
6384 fn try_from(
6385 value: &::std::string::String,
6386 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6387 value.parse()
6388 }
6389 }
6390 impl ::std::convert::TryFrom<::std::string::String> for PublicAgentHeadquarters {
6391 type Error = self::error::ConversionError;
6392 fn try_from(
6393 value: ::std::string::String,
6394 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6395 value.parse()
6396 }
6397 }
6398 impl<'de> ::serde::Deserialize<'de> for PublicAgentHeadquarters {
6399 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6400 where
6401 D: ::serde::Deserializer<'de>,
6402 {
6403 ::std::string::String::deserialize(deserializer)?
6404 .parse()
6405 .map_err(|e: self::error::ConversionError| {
6406 <D::Error as ::serde::de::Error>::custom(e.to_string())
6407 })
6408 }
6409 }
6410 ///The faction the agent started with.
6411 ///
6412 /// <details><summary>JSON schema</summary>
6413 ///
6414 /// ```json
6415 ///{
6416 /// "description": "The faction the agent started with.",
6417 /// "type": "string",
6418 /// "minLength": 1
6419 ///}
6420 /// ```
6421 /// </details>
6422 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6423 #[serde(transparent)]
6424 pub struct PublicAgentStartingFaction(::std::string::String);
6425 impl ::std::ops::Deref for PublicAgentStartingFaction {
6426 type Target = ::std::string::String;
6427 fn deref(&self) -> &::std::string::String {
6428 &self.0
6429 }
6430 }
6431 impl ::std::convert::From<PublicAgentStartingFaction> for ::std::string::String {
6432 fn from(value: PublicAgentStartingFaction) -> Self {
6433 value.0
6434 }
6435 }
6436 impl ::std::str::FromStr for PublicAgentStartingFaction {
6437 type Err = self::error::ConversionError;
6438 fn from_str(
6439 value: &str,
6440 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6441 if value.chars().count() < 1usize {
6442 return Err("shorter than 1 characters".into());
6443 }
6444 Ok(Self(value.to_string()))
6445 }
6446 }
6447 impl ::std::convert::TryFrom<&str> for PublicAgentStartingFaction {
6448 type Error = self::error::ConversionError;
6449 fn try_from(
6450 value: &str,
6451 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6452 value.parse()
6453 }
6454 }
6455 impl ::std::convert::TryFrom<&::std::string::String> for PublicAgentStartingFaction {
6456 type Error = self::error::ConversionError;
6457 fn try_from(
6458 value: &::std::string::String,
6459 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6460 value.parse()
6461 }
6462 }
6463 impl ::std::convert::TryFrom<::std::string::String> for PublicAgentStartingFaction {
6464 type Error = self::error::ConversionError;
6465 fn try_from(
6466 value: ::std::string::String,
6467 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6468 value.parse()
6469 }
6470 }
6471 impl<'de> ::serde::Deserialize<'de> for PublicAgentStartingFaction {
6472 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6473 where
6474 D: ::serde::Deserializer<'de>,
6475 {
6476 ::std::string::String::deserialize(deserializer)?
6477 .parse()
6478 .map_err(|e: self::error::ConversionError| {
6479 <D::Error as ::serde::de::Error>::custom(e.to_string())
6480 })
6481 }
6482 }
6483 ///Symbol of the agent.
6484 ///
6485 /// <details><summary>JSON schema</summary>
6486 ///
6487 /// ```json
6488 ///{
6489 /// "description": "Symbol of the agent.",
6490 /// "type": "string",
6491 /// "maxLength": 14,
6492 /// "minLength": 3
6493 ///}
6494 /// ```
6495 /// </details>
6496 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6497 #[serde(transparent)]
6498 pub struct PublicAgentSymbol(::std::string::String);
6499 impl ::std::ops::Deref for PublicAgentSymbol {
6500 type Target = ::std::string::String;
6501 fn deref(&self) -> &::std::string::String {
6502 &self.0
6503 }
6504 }
6505 impl ::std::convert::From<PublicAgentSymbol> for ::std::string::String {
6506 fn from(value: PublicAgentSymbol) -> Self {
6507 value.0
6508 }
6509 }
6510 impl ::std::str::FromStr for PublicAgentSymbol {
6511 type Err = self::error::ConversionError;
6512 fn from_str(
6513 value: &str,
6514 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6515 if value.chars().count() > 14usize {
6516 return Err("longer than 14 characters".into());
6517 }
6518 if value.chars().count() < 3usize {
6519 return Err("shorter than 3 characters".into());
6520 }
6521 Ok(Self(value.to_string()))
6522 }
6523 }
6524 impl ::std::convert::TryFrom<&str> for PublicAgentSymbol {
6525 type Error = self::error::ConversionError;
6526 fn try_from(
6527 value: &str,
6528 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6529 value.parse()
6530 }
6531 }
6532 impl ::std::convert::TryFrom<&::std::string::String> for PublicAgentSymbol {
6533 type Error = self::error::ConversionError;
6534 fn try_from(
6535 value: &::std::string::String,
6536 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6537 value.parse()
6538 }
6539 }
6540 impl ::std::convert::TryFrom<::std::string::String> for PublicAgentSymbol {
6541 type Error = self::error::ConversionError;
6542 fn try_from(
6543 value: ::std::string::String,
6544 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6545 value.parse()
6546 }
6547 }
6548 impl<'de> ::serde::Deserialize<'de> for PublicAgentSymbol {
6549 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6550 where
6551 D: ::serde::Deserializer<'de>,
6552 {
6553 ::std::string::String::deserialize(deserializer)?
6554 .parse()
6555 .map_err(|e: self::error::ConversionError| {
6556 <D::Error as ::serde::de::Error>::custom(e.to_string())
6557 })
6558 }
6559 }
6560 ///Purchased goods successfully.
6561 ///
6562 /// <details><summary>JSON schema</summary>
6563 ///
6564 /// ```json
6565 ///{
6566 /// "title": "Purchase Cargo 201 Response",
6567 /// "description": "Purchased goods successfully.",
6568 /// "type": "object",
6569 /// "required": [
6570 /// "data"
6571 /// ],
6572 /// "properties": {
6573 /// "data": {
6574 /// "type": "object",
6575 /// "required": [
6576 /// "agent",
6577 /// "cargo",
6578 /// "transaction"
6579 /// ],
6580 /// "properties": {
6581 /// "agent": {
6582 /// "$ref": "#/components/schemas/Agent"
6583 /// },
6584 /// "cargo": {
6585 /// "$ref": "#/components/schemas/ShipCargo"
6586 /// },
6587 /// "transaction": {
6588 /// "$ref": "#/components/schemas/MarketTransaction"
6589 /// }
6590 /// }
6591 /// }
6592 /// }
6593 ///}
6594 /// ```
6595 /// </details>
6596 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6597 pub struct PurchaseCargo201Response {
6598 pub data: PurchaseCargo201ResponseData,
6599 }
6600 ///`PurchaseCargo201ResponseData`
6601 ///
6602 /// <details><summary>JSON schema</summary>
6603 ///
6604 /// ```json
6605 ///{
6606 /// "type": "object",
6607 /// "required": [
6608 /// "agent",
6609 /// "cargo",
6610 /// "transaction"
6611 /// ],
6612 /// "properties": {
6613 /// "agent": {
6614 /// "$ref": "#/components/schemas/Agent"
6615 /// },
6616 /// "cargo": {
6617 /// "$ref": "#/components/schemas/ShipCargo"
6618 /// },
6619 /// "transaction": {
6620 /// "$ref": "#/components/schemas/MarketTransaction"
6621 /// }
6622 /// }
6623 ///}
6624 /// ```
6625 /// </details>
6626 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6627 pub struct PurchaseCargo201ResponseData {
6628 pub agent: Agent,
6629 pub cargo: ShipCargo,
6630 pub transaction: MarketTransaction,
6631 }
6632 ///`PurchaseCargoRequest`
6633 ///
6634 /// <details><summary>JSON schema</summary>
6635 ///
6636 /// ```json
6637 ///{
6638 /// "title": "Purchase Cargo Request",
6639 /// "type": "object",
6640 /// "required": [
6641 /// "symbol",
6642 /// "units"
6643 /// ],
6644 /// "properties": {
6645 /// "symbol": {
6646 /// "$ref": "#/components/schemas/TradeSymbol"
6647 /// },
6648 /// "units": {
6649 /// "description": "The number of units of the good to purchase.",
6650 /// "type": "integer",
6651 /// "minimum": 1.0
6652 /// }
6653 /// }
6654 ///}
6655 /// ```
6656 /// </details>
6657 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6658 pub struct PurchaseCargoRequest {
6659 pub symbol: TradeSymbol,
6660 ///The number of units of the good to purchase.
6661 pub units: ::std::num::NonZeroU64,
6662 }
6663 ///`PurchaseShipBody`
6664 ///
6665 /// <details><summary>JSON schema</summary>
6666 ///
6667 /// ```json
6668 ///{
6669 /// "type": "object",
6670 /// "required": [
6671 /// "shipType",
6672 /// "waypointSymbol"
6673 /// ],
6674 /// "properties": {
6675 /// "shipType": {
6676 /// "$ref": "#/components/schemas/ShipType"
6677 /// },
6678 /// "waypointSymbol": {
6679 /// "description": "The symbol of the waypoint you want to purchase the ship at.",
6680 /// "type": "string"
6681 /// }
6682 /// }
6683 ///}
6684 /// ```
6685 /// </details>
6686 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6687 pub struct PurchaseShipBody {
6688 #[serde(rename = "shipType")]
6689 pub ship_type: ShipType,
6690 ///The symbol of the waypoint you want to purchase the ship at.
6691 #[serde(rename = "waypointSymbol")]
6692 pub waypoint_symbol: ::std::string::String,
6693 }
6694 ///Purchased ship successfully.
6695 ///
6696 /// <details><summary>JSON schema</summary>
6697 ///
6698 /// ```json
6699 ///{
6700 /// "description": "Purchased ship successfully.",
6701 /// "type": "object",
6702 /// "required": [
6703 /// "data"
6704 /// ],
6705 /// "properties": {
6706 /// "data": {
6707 /// "type": "object",
6708 /// "required": [
6709 /// "agent",
6710 /// "ship",
6711 /// "transaction"
6712 /// ],
6713 /// "properties": {
6714 /// "agent": {
6715 /// "$ref": "#/components/schemas/Agent"
6716 /// },
6717 /// "ship": {
6718 /// "$ref": "#/components/schemas/Ship"
6719 /// },
6720 /// "transaction": {
6721 /// "$ref": "#/components/schemas/ShipyardTransaction"
6722 /// }
6723 /// }
6724 /// }
6725 /// }
6726 ///}
6727 /// ```
6728 /// </details>
6729 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6730 pub struct PurchaseShipResponse {
6731 pub data: PurchaseShipResponseData,
6732 }
6733 ///`PurchaseShipResponseData`
6734 ///
6735 /// <details><summary>JSON schema</summary>
6736 ///
6737 /// ```json
6738 ///{
6739 /// "type": "object",
6740 /// "required": [
6741 /// "agent",
6742 /// "ship",
6743 /// "transaction"
6744 /// ],
6745 /// "properties": {
6746 /// "agent": {
6747 /// "$ref": "#/components/schemas/Agent"
6748 /// },
6749 /// "ship": {
6750 /// "$ref": "#/components/schemas/Ship"
6751 /// },
6752 /// "transaction": {
6753 /// "$ref": "#/components/schemas/ShipyardTransaction"
6754 /// }
6755 /// }
6756 ///}
6757 /// ```
6758 /// </details>
6759 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6760 pub struct PurchaseShipResponseData {
6761 pub agent: Agent,
6762 pub ship: Ship,
6763 pub transaction: ShipyardTransaction,
6764 }
6765 ///`RefuelShipBody`
6766 ///
6767 /// <details><summary>JSON schema</summary>
6768 ///
6769 /// ```json
6770 ///{
6771 /// "type": "object",
6772 /// "properties": {
6773 /// "fromCargo": {
6774 /// "description": "Wether to use the FUEL thats in your cargo or not.",
6775 /// "default": false,
6776 /// "examples": [
6777 /// false
6778 /// ],
6779 /// "anyOf": [
6780 /// {
6781 /// "type": "boolean"
6782 /// }
6783 /// ]
6784 /// },
6785 /// "units": {
6786 /// "description": "The amount of fuel to fill in the ship's tanks. When not specified, the ship will be refueled to its maximum fuel capacity. If the amount specified is greater than the ship's remaining capacity, the ship will only be refueled to its maximum fuel capacity. The amount specified is not in market units but in ship fuel units.",
6787 /// "examples": [
6788 /// 100
6789 /// ],
6790 /// "type": "integer",
6791 /// "minimum": 1.0
6792 /// }
6793 /// }
6794 ///}
6795 /// ```
6796 /// </details>
6797 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6798 pub struct RefuelShipBody {
6799 ///Wether to use the FUEL thats in your cargo or not.
6800 #[serde(rename = "fromCargo", default)]
6801 pub from_cargo: bool,
6802 ///The amount of fuel to fill in the ship's tanks. When not specified, the ship will be refueled to its maximum fuel capacity. If the amount specified is greater than the ship's remaining capacity, the ship will only be refueled to its maximum fuel capacity. The amount specified is not in market units but in ship fuel units.
6803 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6804 pub units: ::std::option::Option<::std::num::NonZeroU64>,
6805 }
6806 impl ::std::default::Default for RefuelShipBody {
6807 fn default() -> Self {
6808 Self {
6809 from_cargo: Default::default(),
6810 units: Default::default(),
6811 }
6812 }
6813 }
6814 ///Refueled successfully.
6815 ///
6816 /// <details><summary>JSON schema</summary>
6817 ///
6818 /// ```json
6819 ///{
6820 /// "description": "Refueled successfully.",
6821 /// "type": "object",
6822 /// "required": [
6823 /// "data"
6824 /// ],
6825 /// "properties": {
6826 /// "data": {
6827 /// "type": "object",
6828 /// "required": [
6829 /// "agent",
6830 /// "fuel",
6831 /// "transaction"
6832 /// ],
6833 /// "properties": {
6834 /// "agent": {
6835 /// "$ref": "#/components/schemas/Agent"
6836 /// },
6837 /// "cargo": {
6838 /// "$ref": "#/components/schemas/ShipCargo"
6839 /// },
6840 /// "fuel": {
6841 /// "$ref": "#/components/schemas/ShipFuel"
6842 /// },
6843 /// "transaction": {
6844 /// "$ref": "#/components/schemas/MarketTransaction"
6845 /// }
6846 /// }
6847 /// }
6848 /// }
6849 ///}
6850 /// ```
6851 /// </details>
6852 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6853 pub struct RefuelShipResponse {
6854 pub data: RefuelShipResponseData,
6855 }
6856 ///`RefuelShipResponseData`
6857 ///
6858 /// <details><summary>JSON schema</summary>
6859 ///
6860 /// ```json
6861 ///{
6862 /// "type": "object",
6863 /// "required": [
6864 /// "agent",
6865 /// "fuel",
6866 /// "transaction"
6867 /// ],
6868 /// "properties": {
6869 /// "agent": {
6870 /// "$ref": "#/components/schemas/Agent"
6871 /// },
6872 /// "cargo": {
6873 /// "$ref": "#/components/schemas/ShipCargo"
6874 /// },
6875 /// "fuel": {
6876 /// "$ref": "#/components/schemas/ShipFuel"
6877 /// },
6878 /// "transaction": {
6879 /// "$ref": "#/components/schemas/MarketTransaction"
6880 /// }
6881 /// }
6882 ///}
6883 /// ```
6884 /// </details>
6885 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6886 pub struct RefuelShipResponseData {
6887 pub agent: Agent,
6888 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6889 pub cargo: ::std::option::Option<ShipCargo>,
6890 pub fuel: ShipFuel,
6891 pub transaction: MarketTransaction,
6892 }
6893 ///`RegisterBody`
6894 ///
6895 /// <details><summary>JSON schema</summary>
6896 ///
6897 /// ```json
6898 ///{
6899 /// "type": "object",
6900 /// "required": [
6901 /// "faction",
6902 /// "symbol"
6903 /// ],
6904 /// "properties": {
6905 /// "faction": {
6906 /// "$ref": "#/components/schemas/FactionSymbol"
6907 /// },
6908 /// "symbol": {
6909 /// "description": "Your desired agent symbol. This will be a unique name used to represent your agent, and will be the prefix for your ships.",
6910 /// "examples": [
6911 /// "BADGER"
6912 /// ],
6913 /// "type": "string",
6914 /// "maxLength": 14,
6915 /// "minLength": 3,
6916 /// "pattern": "^[a-zA-Z0-9-_]+$"
6917 /// }
6918 /// }
6919 ///}
6920 /// ```
6921 /// </details>
6922 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6923 pub struct RegisterBody {
6924 pub faction: FactionSymbol,
6925 ///Your desired agent symbol. This will be a unique name used to represent your agent, and will be the prefix for your ships.
6926 pub symbol: RegisterBodySymbol,
6927 }
6928 ///Your desired agent symbol. This will be a unique name used to represent your agent, and will be the prefix for your ships.
6929 ///
6930 /// <details><summary>JSON schema</summary>
6931 ///
6932 /// ```json
6933 ///{
6934 /// "description": "Your desired agent symbol. This will be a unique name used to represent your agent, and will be the prefix for your ships.",
6935 /// "examples": [
6936 /// "BADGER"
6937 /// ],
6938 /// "type": "string",
6939 /// "maxLength": 14,
6940 /// "minLength": 3,
6941 /// "pattern": "^[a-zA-Z0-9-_]+$"
6942 ///}
6943 /// ```
6944 /// </details>
6945 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6946 #[serde(transparent)]
6947 pub struct RegisterBodySymbol(::std::string::String);
6948 impl ::std::ops::Deref for RegisterBodySymbol {
6949 type Target = ::std::string::String;
6950 fn deref(&self) -> &::std::string::String {
6951 &self.0
6952 }
6953 }
6954 impl ::std::convert::From<RegisterBodySymbol> for ::std::string::String {
6955 fn from(value: RegisterBodySymbol) -> Self {
6956 value.0
6957 }
6958 }
6959 impl ::std::str::FromStr for RegisterBodySymbol {
6960 type Err = self::error::ConversionError;
6961 fn from_str(
6962 value: &str,
6963 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6964 if value.chars().count() > 14usize {
6965 return Err("longer than 14 characters".into());
6966 }
6967 if value.chars().count() < 3usize {
6968 return Err("shorter than 3 characters".into());
6969 }
6970 static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(||
6971 { ::regress::Regex::new("^[a-zA-Z0-9-_]+$").unwrap() });
6972 if PATTERN.find(value).is_none() {
6973 return Err("doesn't match pattern \"^[a-zA-Z0-9-_]+$\"".into());
6974 }
6975 Ok(Self(value.to_string()))
6976 }
6977 }
6978 impl ::std::convert::TryFrom<&str> for RegisterBodySymbol {
6979 type Error = self::error::ConversionError;
6980 fn try_from(
6981 value: &str,
6982 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6983 value.parse()
6984 }
6985 }
6986 impl ::std::convert::TryFrom<&::std::string::String> for RegisterBodySymbol {
6987 type Error = self::error::ConversionError;
6988 fn try_from(
6989 value: &::std::string::String,
6990 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6991 value.parse()
6992 }
6993 }
6994 impl ::std::convert::TryFrom<::std::string::String> for RegisterBodySymbol {
6995 type Error = self::error::ConversionError;
6996 fn try_from(
6997 value: ::std::string::String,
6998 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6999 value.parse()
7000 }
7001 }
7002 impl<'de> ::serde::Deserialize<'de> for RegisterBodySymbol {
7003 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7004 where
7005 D: ::serde::Deserializer<'de>,
7006 {
7007 ::std::string::String::deserialize(deserializer)?
7008 .parse()
7009 .map_err(|e: self::error::ConversionError| {
7010 <D::Error as ::serde::de::Error>::custom(e.to_string())
7011 })
7012 }
7013 }
7014 ///Successfully registered.
7015 ///
7016 /// <details><summary>JSON schema</summary>
7017 ///
7018 /// ```json
7019 ///{
7020 /// "description": "Successfully registered.",
7021 /// "type": "object",
7022 /// "required": [
7023 /// "data"
7024 /// ],
7025 /// "properties": {
7026 /// "data": {
7027 /// "type": "object",
7028 /// "required": [
7029 /// "agent",
7030 /// "contract",
7031 /// "faction",
7032 /// "ships",
7033 /// "token"
7034 /// ],
7035 /// "properties": {
7036 /// "agent": {
7037 /// "$ref": "#/components/schemas/Agent"
7038 /// },
7039 /// "contract": {
7040 /// "$ref": "#/components/schemas/Contract"
7041 /// },
7042 /// "faction": {
7043 /// "$ref": "#/components/schemas/Faction"
7044 /// },
7045 /// "ships": {
7046 /// "type": "array",
7047 /// "items": {
7048 /// "$ref": "#/components/schemas/Ship"
7049 /// }
7050 /// },
7051 /// "token": {
7052 /// "description": "A Bearer token for accessing secured API endpoints.",
7053 /// "type": "string"
7054 /// }
7055 /// }
7056 /// }
7057 /// }
7058 ///}
7059 /// ```
7060 /// </details>
7061 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7062 pub struct RegisterResponse {
7063 pub data: RegisterResponseData,
7064 }
7065 ///`RegisterResponseData`
7066 ///
7067 /// <details><summary>JSON schema</summary>
7068 ///
7069 /// ```json
7070 ///{
7071 /// "type": "object",
7072 /// "required": [
7073 /// "agent",
7074 /// "contract",
7075 /// "faction",
7076 /// "ships",
7077 /// "token"
7078 /// ],
7079 /// "properties": {
7080 /// "agent": {
7081 /// "$ref": "#/components/schemas/Agent"
7082 /// },
7083 /// "contract": {
7084 /// "$ref": "#/components/schemas/Contract"
7085 /// },
7086 /// "faction": {
7087 /// "$ref": "#/components/schemas/Faction"
7088 /// },
7089 /// "ships": {
7090 /// "type": "array",
7091 /// "items": {
7092 /// "$ref": "#/components/schemas/Ship"
7093 /// }
7094 /// },
7095 /// "token": {
7096 /// "description": "A Bearer token for accessing secured API endpoints.",
7097 /// "type": "string"
7098 /// }
7099 /// }
7100 ///}
7101 /// ```
7102 /// </details>
7103 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7104 pub struct RegisterResponseData {
7105 pub agent: Agent,
7106 pub contract: Contract,
7107 pub faction: Faction,
7108 pub ships: ::std::vec::Vec<Ship>,
7109 ///A Bearer token for accessing secured API endpoints.
7110 pub token: ::std::string::String,
7111 }
7112 ///Successfully removed the mount.
7113 ///
7114 /// <details><summary>JSON schema</summary>
7115 ///
7116 /// ```json
7117 ///{
7118 /// "title": "Remove Mount 201 Response",
7119 /// "description": "Successfully removed the mount.",
7120 /// "type": "object",
7121 /// "required": [
7122 /// "data"
7123 /// ],
7124 /// "properties": {
7125 /// "data": {
7126 /// "type": "object",
7127 /// "required": [
7128 /// "agent",
7129 /// "cargo",
7130 /// "mounts",
7131 /// "transaction"
7132 /// ],
7133 /// "properties": {
7134 /// "agent": {
7135 /// "$ref": "#/components/schemas/Agent"
7136 /// },
7137 /// "cargo": {
7138 /// "$ref": "#/components/schemas/ShipCargo"
7139 /// },
7140 /// "mounts": {
7141 /// "description": "List of installed mounts after the removal of the selected mount.",
7142 /// "type": "array",
7143 /// "items": {
7144 /// "$ref": "#/components/schemas/ShipMount"
7145 /// }
7146 /// },
7147 /// "transaction": {
7148 /// "$ref": "#/components/schemas/ShipModificationTransaction"
7149 /// }
7150 /// }
7151 /// }
7152 /// }
7153 ///}
7154 /// ```
7155 /// </details>
7156 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7157 pub struct RemoveMount201Response {
7158 pub data: RemoveMount201ResponseData,
7159 }
7160 ///`RemoveMount201ResponseData`
7161 ///
7162 /// <details><summary>JSON schema</summary>
7163 ///
7164 /// ```json
7165 ///{
7166 /// "type": "object",
7167 /// "required": [
7168 /// "agent",
7169 /// "cargo",
7170 /// "mounts",
7171 /// "transaction"
7172 /// ],
7173 /// "properties": {
7174 /// "agent": {
7175 /// "$ref": "#/components/schemas/Agent"
7176 /// },
7177 /// "cargo": {
7178 /// "$ref": "#/components/schemas/ShipCargo"
7179 /// },
7180 /// "mounts": {
7181 /// "description": "List of installed mounts after the removal of the selected mount.",
7182 /// "type": "array",
7183 /// "items": {
7184 /// "$ref": "#/components/schemas/ShipMount"
7185 /// }
7186 /// },
7187 /// "transaction": {
7188 /// "$ref": "#/components/schemas/ShipModificationTransaction"
7189 /// }
7190 /// }
7191 ///}
7192 /// ```
7193 /// </details>
7194 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7195 pub struct RemoveMount201ResponseData {
7196 pub agent: Agent,
7197 pub cargo: ShipCargo,
7198 ///List of installed mounts after the removal of the selected mount.
7199 pub mounts: ::std::vec::Vec<ShipMount>,
7200 pub transaction: ShipModificationTransaction,
7201 }
7202 ///`RemoveMountRequest`
7203 ///
7204 /// <details><summary>JSON schema</summary>
7205 ///
7206 /// ```json
7207 ///{
7208 /// "title": "Remove Mount Request",
7209 /// "type": "object",
7210 /// "required": [
7211 /// "symbol"
7212 /// ],
7213 /// "properties": {
7214 /// "symbol": {
7215 /// "description": "The symbol of the mount to remove.",
7216 /// "type": "string",
7217 /// "minLength": 1
7218 /// }
7219 /// }
7220 ///}
7221 /// ```
7222 /// </details>
7223 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7224 pub struct RemoveMountRequest {
7225 ///The symbol of the mount to remove.
7226 pub symbol: RemoveMountRequestSymbol,
7227 }
7228 ///The symbol of the mount to remove.
7229 ///
7230 /// <details><summary>JSON schema</summary>
7231 ///
7232 /// ```json
7233 ///{
7234 /// "description": "The symbol of the mount to remove.",
7235 /// "type": "string",
7236 /// "minLength": 1
7237 ///}
7238 /// ```
7239 /// </details>
7240 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7241 #[serde(transparent)]
7242 pub struct RemoveMountRequestSymbol(::std::string::String);
7243 impl ::std::ops::Deref for RemoveMountRequestSymbol {
7244 type Target = ::std::string::String;
7245 fn deref(&self) -> &::std::string::String {
7246 &self.0
7247 }
7248 }
7249 impl ::std::convert::From<RemoveMountRequestSymbol> for ::std::string::String {
7250 fn from(value: RemoveMountRequestSymbol) -> Self {
7251 value.0
7252 }
7253 }
7254 impl ::std::str::FromStr for RemoveMountRequestSymbol {
7255 type Err = self::error::ConversionError;
7256 fn from_str(
7257 value: &str,
7258 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7259 if value.chars().count() < 1usize {
7260 return Err("shorter than 1 characters".into());
7261 }
7262 Ok(Self(value.to_string()))
7263 }
7264 }
7265 impl ::std::convert::TryFrom<&str> for RemoveMountRequestSymbol {
7266 type Error = self::error::ConversionError;
7267 fn try_from(
7268 value: &str,
7269 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7270 value.parse()
7271 }
7272 }
7273 impl ::std::convert::TryFrom<&::std::string::String> for RemoveMountRequestSymbol {
7274 type Error = self::error::ConversionError;
7275 fn try_from(
7276 value: &::std::string::String,
7277 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7278 value.parse()
7279 }
7280 }
7281 impl ::std::convert::TryFrom<::std::string::String> for RemoveMountRequestSymbol {
7282 type Error = self::error::ConversionError;
7283 fn try_from(
7284 value: ::std::string::String,
7285 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7286 value.parse()
7287 }
7288 }
7289 impl<'de> ::serde::Deserialize<'de> for RemoveMountRequestSymbol {
7290 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7291 where
7292 D: ::serde::Deserializer<'de>,
7293 {
7294 ::std::string::String::deserialize(deserializer)?
7295 .parse()
7296 .map_err(|e: self::error::ConversionError| {
7297 <D::Error as ::serde::de::Error>::custom(e.to_string())
7298 })
7299 }
7300 }
7301 ///`RemoveShipModuleBody`
7302 ///
7303 /// <details><summary>JSON schema</summary>
7304 ///
7305 /// ```json
7306 ///{
7307 /// "type": "object",
7308 /// "required": [
7309 /// "symbol"
7310 /// ],
7311 /// "properties": {
7312 /// "symbol": {
7313 /// "description": "The symbol of the module to remove.",
7314 /// "type": "string",
7315 /// "minLength": 1
7316 /// }
7317 /// }
7318 ///}
7319 /// ```
7320 /// </details>
7321 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7322 pub struct RemoveShipModuleBody {
7323 ///The symbol of the module to remove.
7324 pub symbol: RemoveShipModuleBodySymbol,
7325 }
7326 ///The symbol of the module to remove.
7327 ///
7328 /// <details><summary>JSON schema</summary>
7329 ///
7330 /// ```json
7331 ///{
7332 /// "description": "The symbol of the module to remove.",
7333 /// "type": "string",
7334 /// "minLength": 1
7335 ///}
7336 /// ```
7337 /// </details>
7338 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7339 #[serde(transparent)]
7340 pub struct RemoveShipModuleBodySymbol(::std::string::String);
7341 impl ::std::ops::Deref for RemoveShipModuleBodySymbol {
7342 type Target = ::std::string::String;
7343 fn deref(&self) -> &::std::string::String {
7344 &self.0
7345 }
7346 }
7347 impl ::std::convert::From<RemoveShipModuleBodySymbol> for ::std::string::String {
7348 fn from(value: RemoveShipModuleBodySymbol) -> Self {
7349 value.0
7350 }
7351 }
7352 impl ::std::str::FromStr for RemoveShipModuleBodySymbol {
7353 type Err = self::error::ConversionError;
7354 fn from_str(
7355 value: &str,
7356 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7357 if value.chars().count() < 1usize {
7358 return Err("shorter than 1 characters".into());
7359 }
7360 Ok(Self(value.to_string()))
7361 }
7362 }
7363 impl ::std::convert::TryFrom<&str> for RemoveShipModuleBodySymbol {
7364 type Error = self::error::ConversionError;
7365 fn try_from(
7366 value: &str,
7367 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7368 value.parse()
7369 }
7370 }
7371 impl ::std::convert::TryFrom<&::std::string::String> for RemoveShipModuleBodySymbol {
7372 type Error = self::error::ConversionError;
7373 fn try_from(
7374 value: &::std::string::String,
7375 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7376 value.parse()
7377 }
7378 }
7379 impl ::std::convert::TryFrom<::std::string::String> for RemoveShipModuleBodySymbol {
7380 type Error = self::error::ConversionError;
7381 fn try_from(
7382 value: ::std::string::String,
7383 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7384 value.parse()
7385 }
7386 }
7387 impl<'de> ::serde::Deserialize<'de> for RemoveShipModuleBodySymbol {
7388 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7389 where
7390 D: ::serde::Deserializer<'de>,
7391 {
7392 ::std::string::String::deserialize(deserializer)?
7393 .parse()
7394 .map_err(|e: self::error::ConversionError| {
7395 <D::Error as ::serde::de::Error>::custom(e.to_string())
7396 })
7397 }
7398 }
7399 ///Successfully removed the module from the ship.
7400 ///
7401 /// <details><summary>JSON schema</summary>
7402 ///
7403 /// ```json
7404 ///{
7405 /// "description": "Successfully removed the module from the ship.",
7406 /// "type": "object",
7407 /// "required": [
7408 /// "data"
7409 /// ],
7410 /// "properties": {
7411 /// "data": {
7412 /// "type": "object",
7413 /// "required": [
7414 /// "agent",
7415 /// "cargo",
7416 /// "modules",
7417 /// "transaction"
7418 /// ],
7419 /// "properties": {
7420 /// "agent": {
7421 /// "$ref": "#/components/schemas/Agent"
7422 /// },
7423 /// "cargo": {
7424 /// "$ref": "#/components/schemas/ShipCargo"
7425 /// },
7426 /// "modules": {
7427 /// "type": "array",
7428 /// "items": {
7429 /// "$ref": "#/components/schemas/ShipModule"
7430 /// }
7431 /// },
7432 /// "transaction": {
7433 /// "$ref": "#/components/schemas/ShipModificationTransaction"
7434 /// }
7435 /// }
7436 /// }
7437 /// }
7438 ///}
7439 /// ```
7440 /// </details>
7441 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7442 pub struct RemoveShipModuleResponse {
7443 pub data: RemoveShipModuleResponseData,
7444 }
7445 ///`RemoveShipModuleResponseData`
7446 ///
7447 /// <details><summary>JSON schema</summary>
7448 ///
7449 /// ```json
7450 ///{
7451 /// "type": "object",
7452 /// "required": [
7453 /// "agent",
7454 /// "cargo",
7455 /// "modules",
7456 /// "transaction"
7457 /// ],
7458 /// "properties": {
7459 /// "agent": {
7460 /// "$ref": "#/components/schemas/Agent"
7461 /// },
7462 /// "cargo": {
7463 /// "$ref": "#/components/schemas/ShipCargo"
7464 /// },
7465 /// "modules": {
7466 /// "type": "array",
7467 /// "items": {
7468 /// "$ref": "#/components/schemas/ShipModule"
7469 /// }
7470 /// },
7471 /// "transaction": {
7472 /// "$ref": "#/components/schemas/ShipModificationTransaction"
7473 /// }
7474 /// }
7475 ///}
7476 /// ```
7477 /// </details>
7478 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7479 pub struct RemoveShipModuleResponseData {
7480 pub agent: Agent,
7481 pub cargo: ShipCargo,
7482 pub modules: ::std::vec::Vec<ShipModule>,
7483 pub transaction: ShipModificationTransaction,
7484 }
7485 ///Ship repaired successfully.
7486 ///
7487 /// <details><summary>JSON schema</summary>
7488 ///
7489 /// ```json
7490 ///{
7491 /// "description": "Ship repaired successfully.",
7492 /// "type": "object",
7493 /// "required": [
7494 /// "data"
7495 /// ],
7496 /// "properties": {
7497 /// "data": {
7498 /// "type": "object",
7499 /// "required": [
7500 /// "agent",
7501 /// "ship",
7502 /// "transaction"
7503 /// ],
7504 /// "properties": {
7505 /// "agent": {
7506 /// "$ref": "#/components/schemas/Agent"
7507 /// },
7508 /// "ship": {
7509 /// "$ref": "#/components/schemas/Ship"
7510 /// },
7511 /// "transaction": {
7512 /// "$ref": "#/components/schemas/RepairTransaction"
7513 /// }
7514 /// }
7515 /// }
7516 /// }
7517 ///}
7518 /// ```
7519 /// </details>
7520 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7521 pub struct RepairShipResponse {
7522 pub data: RepairShipResponseData,
7523 }
7524 ///`RepairShipResponseData`
7525 ///
7526 /// <details><summary>JSON schema</summary>
7527 ///
7528 /// ```json
7529 ///{
7530 /// "type": "object",
7531 /// "required": [
7532 /// "agent",
7533 /// "ship",
7534 /// "transaction"
7535 /// ],
7536 /// "properties": {
7537 /// "agent": {
7538 /// "$ref": "#/components/schemas/Agent"
7539 /// },
7540 /// "ship": {
7541 /// "$ref": "#/components/schemas/Ship"
7542 /// },
7543 /// "transaction": {
7544 /// "$ref": "#/components/schemas/RepairTransaction"
7545 /// }
7546 /// }
7547 ///}
7548 /// ```
7549 /// </details>
7550 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7551 pub struct RepairShipResponseData {
7552 pub agent: Agent,
7553 pub ship: Ship,
7554 pub transaction: RepairTransaction,
7555 }
7556 ///Result of a repair transaction.
7557 ///
7558 /// <details><summary>JSON schema</summary>
7559 ///
7560 /// ```json
7561 ///{
7562 /// "description": "Result of a repair transaction.",
7563 /// "type": "object",
7564 /// "required": [
7565 /// "shipSymbol",
7566 /// "timestamp",
7567 /// "totalPrice",
7568 /// "waypointSymbol"
7569 /// ],
7570 /// "properties": {
7571 /// "shipSymbol": {
7572 /// "description": "The symbol of the ship.",
7573 /// "type": "string"
7574 /// },
7575 /// "timestamp": {
7576 /// "description": "The timestamp of the transaction.",
7577 /// "type": "string",
7578 /// "format": "date-time"
7579 /// },
7580 /// "totalPrice": {
7581 /// "description": "The total price of the transaction.",
7582 /// "type": "integer",
7583 /// "minimum": 0.0
7584 /// },
7585 /// "waypointSymbol": {
7586 /// "$ref": "#/components/schemas/WaypointSymbol"
7587 /// }
7588 /// }
7589 ///}
7590 /// ```
7591 /// </details>
7592 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7593 pub struct RepairTransaction {
7594 ///The symbol of the ship.
7595 #[serde(rename = "shipSymbol")]
7596 pub ship_symbol: ::std::string::String,
7597 ///The timestamp of the transaction.
7598 pub timestamp: ::chrono::DateTime<::chrono::offset::Utc>,
7599 ///The total price of the transaction.
7600 #[serde(rename = "totalPrice")]
7601 pub total_price: u64,
7602 #[serde(rename = "waypointSymbol")]
7603 pub waypoint_symbol: WaypointSymbol,
7604 }
7605 ///The ship that was scanned. Details include information about the ship that could be detected by the scanner.
7606 ///
7607 /// <details><summary>JSON schema</summary>
7608 ///
7609 /// ```json
7610 ///{
7611 /// "description": "The ship that was scanned. Details include information about the ship that could be detected by the scanner.",
7612 /// "type": "object",
7613 /// "required": [
7614 /// "engine",
7615 /// "nav",
7616 /// "registration",
7617 /// "symbol"
7618 /// ],
7619 /// "properties": {
7620 /// "engine": {
7621 /// "description": "The engine of the ship.",
7622 /// "type": "object",
7623 /// "required": [
7624 /// "symbol"
7625 /// ],
7626 /// "properties": {
7627 /// "symbol": {
7628 /// "description": "The symbol of the engine.",
7629 /// "type": "string"
7630 /// }
7631 /// }
7632 /// },
7633 /// "frame": {
7634 /// "description": "The frame of the ship.",
7635 /// "type": "object",
7636 /// "required": [
7637 /// "symbol"
7638 /// ],
7639 /// "properties": {
7640 /// "symbol": {
7641 /// "description": "The symbol of the frame.",
7642 /// "type": "string"
7643 /// }
7644 /// }
7645 /// },
7646 /// "mounts": {
7647 /// "description": "List of mounts installed in the ship.",
7648 /// "type": "array",
7649 /// "items": {
7650 /// "type": "object",
7651 /// "required": [
7652 /// "symbol"
7653 /// ],
7654 /// "properties": {
7655 /// "symbol": {
7656 /// "description": "The symbol of the mount.",
7657 /// "type": "string"
7658 /// }
7659 /// }
7660 /// }
7661 /// },
7662 /// "nav": {
7663 /// "$ref": "#/components/schemas/ShipNav"
7664 /// },
7665 /// "reactor": {
7666 /// "description": "The reactor of the ship.",
7667 /// "type": "object",
7668 /// "required": [
7669 /// "symbol"
7670 /// ],
7671 /// "properties": {
7672 /// "symbol": {
7673 /// "description": "The symbol of the reactor.",
7674 /// "type": "string"
7675 /// }
7676 /// }
7677 /// },
7678 /// "registration": {
7679 /// "$ref": "#/components/schemas/ShipRegistration"
7680 /// },
7681 /// "symbol": {
7682 /// "description": "The globally unique identifier of the ship.",
7683 /// "type": "string"
7684 /// }
7685 /// }
7686 ///}
7687 /// ```
7688 /// </details>
7689 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7690 pub struct ScannedShip {
7691 pub engine: ScannedShipEngine,
7692 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7693 pub frame: ::std::option::Option<ScannedShipFrame>,
7694 ///List of mounts installed in the ship.
7695 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7696 pub mounts: ::std::vec::Vec<ScannedShipMountsItem>,
7697 pub nav: ShipNav,
7698 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7699 pub reactor: ::std::option::Option<ScannedShipReactor>,
7700 pub registration: ShipRegistration,
7701 ///The globally unique identifier of the ship.
7702 pub symbol: ::std::string::String,
7703 }
7704 ///The engine of the ship.
7705 ///
7706 /// <details><summary>JSON schema</summary>
7707 ///
7708 /// ```json
7709 ///{
7710 /// "description": "The engine of the ship.",
7711 /// "type": "object",
7712 /// "required": [
7713 /// "symbol"
7714 /// ],
7715 /// "properties": {
7716 /// "symbol": {
7717 /// "description": "The symbol of the engine.",
7718 /// "type": "string"
7719 /// }
7720 /// }
7721 ///}
7722 /// ```
7723 /// </details>
7724 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7725 pub struct ScannedShipEngine {
7726 ///The symbol of the engine.
7727 pub symbol: ::std::string::String,
7728 }
7729 ///The frame of the ship.
7730 ///
7731 /// <details><summary>JSON schema</summary>
7732 ///
7733 /// ```json
7734 ///{
7735 /// "description": "The frame of the ship.",
7736 /// "type": "object",
7737 /// "required": [
7738 /// "symbol"
7739 /// ],
7740 /// "properties": {
7741 /// "symbol": {
7742 /// "description": "The symbol of the frame.",
7743 /// "type": "string"
7744 /// }
7745 /// }
7746 ///}
7747 /// ```
7748 /// </details>
7749 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7750 pub struct ScannedShipFrame {
7751 ///The symbol of the frame.
7752 pub symbol: ::std::string::String,
7753 }
7754 ///`ScannedShipMountsItem`
7755 ///
7756 /// <details><summary>JSON schema</summary>
7757 ///
7758 /// ```json
7759 ///{
7760 /// "type": "object",
7761 /// "required": [
7762 /// "symbol"
7763 /// ],
7764 /// "properties": {
7765 /// "symbol": {
7766 /// "description": "The symbol of the mount.",
7767 /// "type": "string"
7768 /// }
7769 /// }
7770 ///}
7771 /// ```
7772 /// </details>
7773 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7774 pub struct ScannedShipMountsItem {
7775 ///The symbol of the mount.
7776 pub symbol: ::std::string::String,
7777 }
7778 ///The reactor of the ship.
7779 ///
7780 /// <details><summary>JSON schema</summary>
7781 ///
7782 /// ```json
7783 ///{
7784 /// "description": "The reactor of the ship.",
7785 /// "type": "object",
7786 /// "required": [
7787 /// "symbol"
7788 /// ],
7789 /// "properties": {
7790 /// "symbol": {
7791 /// "description": "The symbol of the reactor.",
7792 /// "type": "string"
7793 /// }
7794 /// }
7795 ///}
7796 /// ```
7797 /// </details>
7798 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7799 pub struct ScannedShipReactor {
7800 ///The symbol of the reactor.
7801 pub symbol: ::std::string::String,
7802 }
7803 ///Details of a system was that scanned.
7804 ///
7805 /// <details><summary>JSON schema</summary>
7806 ///
7807 /// ```json
7808 ///{
7809 /// "description": "Details of a system was that scanned.",
7810 /// "type": "object",
7811 /// "required": [
7812 /// "distance",
7813 /// "sectorSymbol",
7814 /// "symbol",
7815 /// "type",
7816 /// "x",
7817 /// "y"
7818 /// ],
7819 /// "properties": {
7820 /// "distance": {
7821 /// "description": "The system's distance from the scanning ship.",
7822 /// "type": "integer"
7823 /// },
7824 /// "sectorSymbol": {
7825 /// "description": "Symbol of the system's sector.",
7826 /// "type": "string",
7827 /// "minLength": 1
7828 /// },
7829 /// "symbol": {
7830 /// "description": "Symbol of the system.",
7831 /// "type": "string",
7832 /// "minLength": 1
7833 /// },
7834 /// "type": {
7835 /// "$ref": "#/components/schemas/SystemType"
7836 /// },
7837 /// "x": {
7838 /// "description": "Position in the universe in the x axis.",
7839 /// "type": "integer"
7840 /// },
7841 /// "y": {
7842 /// "description": "Position in the universe in the y axis.",
7843 /// "type": "integer"
7844 /// }
7845 /// }
7846 ///}
7847 /// ```
7848 /// </details>
7849 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7850 pub struct ScannedSystem {
7851 ///The system's distance from the scanning ship.
7852 pub distance: i64,
7853 ///Symbol of the system's sector.
7854 #[serde(rename = "sectorSymbol")]
7855 pub sector_symbol: ScannedSystemSectorSymbol,
7856 ///Symbol of the system.
7857 pub symbol: ScannedSystemSymbol,
7858 #[serde(rename = "type")]
7859 pub type_: SystemType,
7860 ///Position in the universe in the x axis.
7861 pub x: i64,
7862 ///Position in the universe in the y axis.
7863 pub y: i64,
7864 }
7865 ///Symbol of the system's sector.
7866 ///
7867 /// <details><summary>JSON schema</summary>
7868 ///
7869 /// ```json
7870 ///{
7871 /// "description": "Symbol of the system's sector.",
7872 /// "type": "string",
7873 /// "minLength": 1
7874 ///}
7875 /// ```
7876 /// </details>
7877 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7878 #[serde(transparent)]
7879 pub struct ScannedSystemSectorSymbol(::std::string::String);
7880 impl ::std::ops::Deref for ScannedSystemSectorSymbol {
7881 type Target = ::std::string::String;
7882 fn deref(&self) -> &::std::string::String {
7883 &self.0
7884 }
7885 }
7886 impl ::std::convert::From<ScannedSystemSectorSymbol> for ::std::string::String {
7887 fn from(value: ScannedSystemSectorSymbol) -> Self {
7888 value.0
7889 }
7890 }
7891 impl ::std::str::FromStr for ScannedSystemSectorSymbol {
7892 type Err = self::error::ConversionError;
7893 fn from_str(
7894 value: &str,
7895 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7896 if value.chars().count() < 1usize {
7897 return Err("shorter than 1 characters".into());
7898 }
7899 Ok(Self(value.to_string()))
7900 }
7901 }
7902 impl ::std::convert::TryFrom<&str> for ScannedSystemSectorSymbol {
7903 type Error = self::error::ConversionError;
7904 fn try_from(
7905 value: &str,
7906 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7907 value.parse()
7908 }
7909 }
7910 impl ::std::convert::TryFrom<&::std::string::String> for ScannedSystemSectorSymbol {
7911 type Error = self::error::ConversionError;
7912 fn try_from(
7913 value: &::std::string::String,
7914 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7915 value.parse()
7916 }
7917 }
7918 impl ::std::convert::TryFrom<::std::string::String> for ScannedSystemSectorSymbol {
7919 type Error = self::error::ConversionError;
7920 fn try_from(
7921 value: ::std::string::String,
7922 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7923 value.parse()
7924 }
7925 }
7926 impl<'de> ::serde::Deserialize<'de> for ScannedSystemSectorSymbol {
7927 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7928 where
7929 D: ::serde::Deserializer<'de>,
7930 {
7931 ::std::string::String::deserialize(deserializer)?
7932 .parse()
7933 .map_err(|e: self::error::ConversionError| {
7934 <D::Error as ::serde::de::Error>::custom(e.to_string())
7935 })
7936 }
7937 }
7938 ///Symbol of the system.
7939 ///
7940 /// <details><summary>JSON schema</summary>
7941 ///
7942 /// ```json
7943 ///{
7944 /// "description": "Symbol of the system.",
7945 /// "type": "string",
7946 /// "minLength": 1
7947 ///}
7948 /// ```
7949 /// </details>
7950 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7951 #[serde(transparent)]
7952 pub struct ScannedSystemSymbol(::std::string::String);
7953 impl ::std::ops::Deref for ScannedSystemSymbol {
7954 type Target = ::std::string::String;
7955 fn deref(&self) -> &::std::string::String {
7956 &self.0
7957 }
7958 }
7959 impl ::std::convert::From<ScannedSystemSymbol> for ::std::string::String {
7960 fn from(value: ScannedSystemSymbol) -> Self {
7961 value.0
7962 }
7963 }
7964 impl ::std::str::FromStr for ScannedSystemSymbol {
7965 type Err = self::error::ConversionError;
7966 fn from_str(
7967 value: &str,
7968 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7969 if value.chars().count() < 1usize {
7970 return Err("shorter than 1 characters".into());
7971 }
7972 Ok(Self(value.to_string()))
7973 }
7974 }
7975 impl ::std::convert::TryFrom<&str> for ScannedSystemSymbol {
7976 type Error = self::error::ConversionError;
7977 fn try_from(
7978 value: &str,
7979 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7980 value.parse()
7981 }
7982 }
7983 impl ::std::convert::TryFrom<&::std::string::String> for ScannedSystemSymbol {
7984 type Error = self::error::ConversionError;
7985 fn try_from(
7986 value: &::std::string::String,
7987 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7988 value.parse()
7989 }
7990 }
7991 impl ::std::convert::TryFrom<::std::string::String> for ScannedSystemSymbol {
7992 type Error = self::error::ConversionError;
7993 fn try_from(
7994 value: ::std::string::String,
7995 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7996 value.parse()
7997 }
7998 }
7999 impl<'de> ::serde::Deserialize<'de> for ScannedSystemSymbol {
8000 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
8001 where
8002 D: ::serde::Deserializer<'de>,
8003 {
8004 ::std::string::String::deserialize(deserializer)?
8005 .parse()
8006 .map_err(|e: self::error::ConversionError| {
8007 <D::Error as ::serde::de::Error>::custom(e.to_string())
8008 })
8009 }
8010 }
8011 ///A waypoint that was scanned by a ship.
8012 ///
8013 /// <details><summary>JSON schema</summary>
8014 ///
8015 /// ```json
8016 ///{
8017 /// "description": "A waypoint that was scanned by a ship.",
8018 /// "type": "object",
8019 /// "required": [
8020 /// "orbitals",
8021 /// "symbol",
8022 /// "systemSymbol",
8023 /// "traits",
8024 /// "type",
8025 /// "x",
8026 /// "y"
8027 /// ],
8028 /// "properties": {
8029 /// "chart": {
8030 /// "$ref": "#/components/schemas/Chart"
8031 /// },
8032 /// "faction": {
8033 /// "$ref": "#/components/schemas/WaypointFaction"
8034 /// },
8035 /// "orbitals": {
8036 /// "description": "List of waypoints that orbit this waypoint.",
8037 /// "type": "array",
8038 /// "items": {
8039 /// "$ref": "#/components/schemas/WaypointOrbital"
8040 /// }
8041 /// },
8042 /// "symbol": {
8043 /// "$ref": "#/components/schemas/WaypointSymbol"
8044 /// },
8045 /// "systemSymbol": {
8046 /// "$ref": "#/components/schemas/SystemSymbol"
8047 /// },
8048 /// "traits": {
8049 /// "description": "The traits of the waypoint.",
8050 /// "type": "array",
8051 /// "items": {
8052 /// "$ref": "#/components/schemas/WaypointTrait"
8053 /// }
8054 /// },
8055 /// "type": {
8056 /// "$ref": "#/components/schemas/WaypointType"
8057 /// },
8058 /// "x": {
8059 /// "description": "Position in the universe in the x axis.",
8060 /// "type": "integer"
8061 /// },
8062 /// "y": {
8063 /// "description": "Position in the universe in the y axis.",
8064 /// "type": "integer"
8065 /// }
8066 /// }
8067 ///}
8068 /// ```
8069 /// </details>
8070 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8071 pub struct ScannedWaypoint {
8072 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8073 pub chart: ::std::option::Option<Chart>,
8074 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8075 pub faction: ::std::option::Option<WaypointFaction>,
8076 ///List of waypoints that orbit this waypoint.
8077 pub orbitals: ::std::vec::Vec<WaypointOrbital>,
8078 pub symbol: WaypointSymbol,
8079 #[serde(rename = "systemSymbol")]
8080 pub system_symbol: SystemSymbol,
8081 ///The traits of the waypoint.
8082 pub traits: ::std::vec::Vec<WaypointTrait>,
8083 #[serde(rename = "type")]
8084 pub type_: WaypointType,
8085 ///Position in the universe in the x axis.
8086 pub x: i64,
8087 ///Position in the universe in the y axis.
8088 pub y: i64,
8089 }
8090 ///Ship scrapped successfully.
8091 ///
8092 /// <details><summary>JSON schema</summary>
8093 ///
8094 /// ```json
8095 ///{
8096 /// "description": "Ship scrapped successfully.",
8097 /// "type": "object",
8098 /// "required": [
8099 /// "data"
8100 /// ],
8101 /// "properties": {
8102 /// "data": {
8103 /// "type": "object",
8104 /// "required": [
8105 /// "agent",
8106 /// "transaction"
8107 /// ],
8108 /// "properties": {
8109 /// "agent": {
8110 /// "$ref": "#/components/schemas/Agent"
8111 /// },
8112 /// "transaction": {
8113 /// "$ref": "#/components/schemas/ScrapTransaction"
8114 /// }
8115 /// }
8116 /// }
8117 /// }
8118 ///}
8119 /// ```
8120 /// </details>
8121 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8122 pub struct ScrapShipResponse {
8123 pub data: ScrapShipResponseData,
8124 }
8125 ///`ScrapShipResponseData`
8126 ///
8127 /// <details><summary>JSON schema</summary>
8128 ///
8129 /// ```json
8130 ///{
8131 /// "type": "object",
8132 /// "required": [
8133 /// "agent",
8134 /// "transaction"
8135 /// ],
8136 /// "properties": {
8137 /// "agent": {
8138 /// "$ref": "#/components/schemas/Agent"
8139 /// },
8140 /// "transaction": {
8141 /// "$ref": "#/components/schemas/ScrapTransaction"
8142 /// }
8143 /// }
8144 ///}
8145 /// ```
8146 /// </details>
8147 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8148 pub struct ScrapShipResponseData {
8149 pub agent: Agent,
8150 pub transaction: ScrapTransaction,
8151 }
8152 ///Result of a scrap transaction.
8153 ///
8154 /// <details><summary>JSON schema</summary>
8155 ///
8156 /// ```json
8157 ///{
8158 /// "description": "Result of a scrap transaction.",
8159 /// "type": "object",
8160 /// "required": [
8161 /// "shipSymbol",
8162 /// "timestamp",
8163 /// "totalPrice",
8164 /// "waypointSymbol"
8165 /// ],
8166 /// "properties": {
8167 /// "shipSymbol": {
8168 /// "description": "The symbol of the ship.",
8169 /// "type": "string"
8170 /// },
8171 /// "timestamp": {
8172 /// "description": "The timestamp of the transaction.",
8173 /// "type": "string",
8174 /// "format": "date-time"
8175 /// },
8176 /// "totalPrice": {
8177 /// "description": "The total price of the transaction.",
8178 /// "type": "integer",
8179 /// "minimum": 0.0
8180 /// },
8181 /// "waypointSymbol": {
8182 /// "$ref": "#/components/schemas/WaypointSymbol"
8183 /// }
8184 /// }
8185 ///}
8186 /// ```
8187 /// </details>
8188 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8189 pub struct ScrapTransaction {
8190 ///The symbol of the ship.
8191 #[serde(rename = "shipSymbol")]
8192 pub ship_symbol: ::std::string::String,
8193 ///The timestamp of the transaction.
8194 pub timestamp: ::chrono::DateTime<::chrono::offset::Utc>,
8195 ///The total price of the transaction.
8196 #[serde(rename = "totalPrice")]
8197 pub total_price: u64,
8198 #[serde(rename = "waypointSymbol")]
8199 pub waypoint_symbol: WaypointSymbol,
8200 }
8201 ///Cargo was successfully sold.
8202 ///
8203 /// <details><summary>JSON schema</summary>
8204 ///
8205 /// ```json
8206 ///{
8207 /// "title": "Sell Cargo 201 Response",
8208 /// "description": "Cargo was successfully sold.",
8209 /// "type": "object",
8210 /// "required": [
8211 /// "data"
8212 /// ],
8213 /// "properties": {
8214 /// "data": {
8215 /// "type": "object",
8216 /// "required": [
8217 /// "agent",
8218 /// "cargo",
8219 /// "transaction"
8220 /// ],
8221 /// "properties": {
8222 /// "agent": {
8223 /// "$ref": "#/components/schemas/Agent"
8224 /// },
8225 /// "cargo": {
8226 /// "$ref": "#/components/schemas/ShipCargo"
8227 /// },
8228 /// "transaction": {
8229 /// "$ref": "#/components/schemas/MarketTransaction"
8230 /// }
8231 /// }
8232 /// }
8233 /// }
8234 ///}
8235 /// ```
8236 /// </details>
8237 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8238 pub struct SellCargo201Response {
8239 pub data: SellCargo201ResponseData,
8240 }
8241 ///`SellCargo201ResponseData`
8242 ///
8243 /// <details><summary>JSON schema</summary>
8244 ///
8245 /// ```json
8246 ///{
8247 /// "type": "object",
8248 /// "required": [
8249 /// "agent",
8250 /// "cargo",
8251 /// "transaction"
8252 /// ],
8253 /// "properties": {
8254 /// "agent": {
8255 /// "$ref": "#/components/schemas/Agent"
8256 /// },
8257 /// "cargo": {
8258 /// "$ref": "#/components/schemas/ShipCargo"
8259 /// },
8260 /// "transaction": {
8261 /// "$ref": "#/components/schemas/MarketTransaction"
8262 /// }
8263 /// }
8264 ///}
8265 /// ```
8266 /// </details>
8267 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8268 pub struct SellCargo201ResponseData {
8269 pub agent: Agent,
8270 pub cargo: ShipCargo,
8271 pub transaction: MarketTransaction,
8272 }
8273 ///`SellCargoRequest`
8274 ///
8275 /// <details><summary>JSON schema</summary>
8276 ///
8277 /// ```json
8278 ///{
8279 /// "title": "SellCargoRequest",
8280 /// "type": "object",
8281 /// "required": [
8282 /// "symbol",
8283 /// "units"
8284 /// ],
8285 /// "properties": {
8286 /// "symbol": {
8287 /// "$ref": "#/components/schemas/TradeSymbol"
8288 /// },
8289 /// "units": {
8290 /// "description": "Amounts of units to sell of the selected good.",
8291 /// "examples": [
8292 /// 100
8293 /// ],
8294 /// "type": "integer",
8295 /// "minimum": 1.0
8296 /// }
8297 /// }
8298 ///}
8299 /// ```
8300 /// </details>
8301 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8302 pub struct SellCargoRequest {
8303 pub symbol: TradeSymbol,
8304 ///Amounts of units to sell of the selected good.
8305 pub units: ::std::num::NonZeroU64,
8306 }
8307 ///Ship details.
8308 ///
8309 /// <details><summary>JSON schema</summary>
8310 ///
8311 /// ```json
8312 ///{
8313 /// "description": "Ship details.",
8314 /// "type": "object",
8315 /// "required": [
8316 /// "cargo",
8317 /// "cooldown",
8318 /// "crew",
8319 /// "engine",
8320 /// "frame",
8321 /// "fuel",
8322 /// "modules",
8323 /// "mounts",
8324 /// "nav",
8325 /// "reactor",
8326 /// "registration",
8327 /// "symbol"
8328 /// ],
8329 /// "properties": {
8330 /// "cargo": {
8331 /// "$ref": "#/components/schemas/ShipCargo"
8332 /// },
8333 /// "cooldown": {
8334 /// "$ref": "#/components/schemas/Cooldown"
8335 /// },
8336 /// "crew": {
8337 /// "$ref": "#/components/schemas/ShipCrew"
8338 /// },
8339 /// "engine": {
8340 /// "$ref": "#/components/schemas/ShipEngine"
8341 /// },
8342 /// "frame": {
8343 /// "$ref": "#/components/schemas/ShipFrame"
8344 /// },
8345 /// "fuel": {
8346 /// "$ref": "#/components/schemas/ShipFuel"
8347 /// },
8348 /// "modules": {
8349 /// "description": "Modules installed in this ship.",
8350 /// "type": "array",
8351 /// "items": {
8352 /// "$ref": "#/components/schemas/ShipModule"
8353 /// }
8354 /// },
8355 /// "mounts": {
8356 /// "description": "Mounts installed in this ship.",
8357 /// "type": "array",
8358 /// "items": {
8359 /// "$ref": "#/components/schemas/ShipMount"
8360 /// }
8361 /// },
8362 /// "nav": {
8363 /// "$ref": "#/components/schemas/ShipNav"
8364 /// },
8365 /// "reactor": {
8366 /// "$ref": "#/components/schemas/ShipReactor"
8367 /// },
8368 /// "registration": {
8369 /// "$ref": "#/components/schemas/ShipRegistration"
8370 /// },
8371 /// "symbol": {
8372 /// "description": "The globally unique identifier of the ship in the following format: `[AGENT_SYMBOL]-[HEX_ID]`",
8373 /// "type": "string"
8374 /// }
8375 /// }
8376 ///}
8377 /// ```
8378 /// </details>
8379 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8380 pub struct Ship {
8381 pub cargo: ShipCargo,
8382 pub cooldown: Cooldown,
8383 pub crew: ShipCrew,
8384 pub engine: ShipEngine,
8385 pub frame: ShipFrame,
8386 pub fuel: ShipFuel,
8387 ///Modules installed in this ship.
8388 pub modules: ::std::vec::Vec<ShipModule>,
8389 ///Mounts installed in this ship.
8390 pub mounts: ::std::vec::Vec<ShipMount>,
8391 pub nav: ShipNav,
8392 pub reactor: ShipReactor,
8393 pub registration: ShipRegistration,
8394 ///The globally unique identifier of the ship in the following format: `[AGENT_SYMBOL]-[HEX_ID]`
8395 pub symbol: ::std::string::String,
8396 }
8397 ///Ship cargo details.
8398 ///
8399 /// <details><summary>JSON schema</summary>
8400 ///
8401 /// ```json
8402 ///{
8403 /// "description": "Ship cargo details.",
8404 /// "type": "object",
8405 /// "required": [
8406 /// "capacity",
8407 /// "inventory",
8408 /// "units"
8409 /// ],
8410 /// "properties": {
8411 /// "capacity": {
8412 /// "description": "The max number of items that can be stored in the cargo hold.",
8413 /// "type": "integer",
8414 /// "minimum": 0.0
8415 /// },
8416 /// "inventory": {
8417 /// "description": "The items currently in the cargo hold.",
8418 /// "type": "array",
8419 /// "items": {
8420 /// "$ref": "#/components/schemas/ShipCargoItem"
8421 /// }
8422 /// },
8423 /// "units": {
8424 /// "description": "The number of items currently stored in the cargo hold.",
8425 /// "type": "integer",
8426 /// "minimum": 0.0
8427 /// }
8428 /// }
8429 ///}
8430 /// ```
8431 /// </details>
8432 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8433 pub struct ShipCargo {
8434 ///The max number of items that can be stored in the cargo hold.
8435 pub capacity: u64,
8436 ///The items currently in the cargo hold.
8437 pub inventory: ::std::vec::Vec<ShipCargoItem>,
8438 ///The number of items currently stored in the cargo hold.
8439 pub units: u64,
8440 }
8441 ///The type of cargo item and the number of units.
8442 ///
8443 /// <details><summary>JSON schema</summary>
8444 ///
8445 /// ```json
8446 ///{
8447 /// "description": "The type of cargo item and the number of units.",
8448 /// "type": "object",
8449 /// "required": [
8450 /// "description",
8451 /// "name",
8452 /// "symbol",
8453 /// "units"
8454 /// ],
8455 /// "properties": {
8456 /// "description": {
8457 /// "description": "The description of the cargo item type.",
8458 /// "type": "string"
8459 /// },
8460 /// "name": {
8461 /// "description": "The name of the cargo item type.",
8462 /// "type": "string"
8463 /// },
8464 /// "symbol": {
8465 /// "$ref": "#/components/schemas/TradeSymbol"
8466 /// },
8467 /// "units": {
8468 /// "description": "The number of units of the cargo item.",
8469 /// "type": "integer",
8470 /// "minimum": 1.0
8471 /// }
8472 /// }
8473 ///}
8474 /// ```
8475 /// </details>
8476 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8477 pub struct ShipCargoItem {
8478 ///The description of the cargo item type.
8479 pub description: ::std::string::String,
8480 ///The name of the cargo item type.
8481 pub name: ::std::string::String,
8482 pub symbol: TradeSymbol,
8483 ///The number of units of the cargo item.
8484 pub units: ::std::num::NonZeroU64,
8485 }
8486 ///The repairable condition of a component. A value of 0 indicates the component needs significant repairs, while a value of 1 indicates the component is in near perfect condition. As the condition of a component is repaired, the overall integrity of the component decreases.
8487 ///
8488 /// <details><summary>JSON schema</summary>
8489 ///
8490 /// ```json
8491 ///{
8492 /// "description": "The repairable condition of a component. A value of 0 indicates the component needs significant repairs, while a value of 1 indicates the component is in near perfect condition. As the condition of a component is repaired, the overall integrity of the component decreases.",
8493 /// "type": "number",
8494 /// "format": "double",
8495 /// "maximum": 1.0,
8496 /// "minimum": 0.0
8497 ///}
8498 /// ```
8499 /// </details>
8500 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8501 #[serde(transparent)]
8502 pub struct ShipComponentCondition(pub f64);
8503 impl ::std::ops::Deref for ShipComponentCondition {
8504 type Target = f64;
8505 fn deref(&self) -> &f64 {
8506 &self.0
8507 }
8508 }
8509 impl ::std::convert::From<ShipComponentCondition> for f64 {
8510 fn from(value: ShipComponentCondition) -> Self {
8511 value.0
8512 }
8513 }
8514 impl ::std::convert::From<f64> for ShipComponentCondition {
8515 fn from(value: f64) -> Self {
8516 Self(value)
8517 }
8518 }
8519 impl ::std::str::FromStr for ShipComponentCondition {
8520 type Err = <f64 as ::std::str::FromStr>::Err;
8521 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
8522 Ok(Self(value.parse()?))
8523 }
8524 }
8525 impl ::std::convert::TryFrom<&str> for ShipComponentCondition {
8526 type Error = <f64 as ::std::str::FromStr>::Err;
8527 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
8528 value.parse()
8529 }
8530 }
8531 impl ::std::convert::TryFrom<String> for ShipComponentCondition {
8532 type Error = <f64 as ::std::str::FromStr>::Err;
8533 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
8534 value.parse()
8535 }
8536 }
8537 impl ::std::fmt::Display for ShipComponentCondition {
8538 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8539 self.0.fmt(f)
8540 }
8541 }
8542 ///The overall integrity of the component, which determines the performance of the component. A value of 0 indicates that the component is almost completely degraded, while a value of 1 indicates that the component is in near perfect condition. The integrity of the component is non-repairable, and represents permanent wear over time.
8543 ///
8544 /// <details><summary>JSON schema</summary>
8545 ///
8546 /// ```json
8547 ///{
8548 /// "description": "The overall integrity of the component, which determines the performance of the component. A value of 0 indicates that the component is almost completely degraded, while a value of 1 indicates that the component is in near perfect condition. The integrity of the component is non-repairable, and represents permanent wear over time.",
8549 /// "type": "number",
8550 /// "format": "double",
8551 /// "maximum": 1.0,
8552 /// "minimum": 0.0
8553 ///}
8554 /// ```
8555 /// </details>
8556 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8557 #[serde(transparent)]
8558 pub struct ShipComponentIntegrity(pub f64);
8559 impl ::std::ops::Deref for ShipComponentIntegrity {
8560 type Target = f64;
8561 fn deref(&self) -> &f64 {
8562 &self.0
8563 }
8564 }
8565 impl ::std::convert::From<ShipComponentIntegrity> for f64 {
8566 fn from(value: ShipComponentIntegrity) -> Self {
8567 value.0
8568 }
8569 }
8570 impl ::std::convert::From<f64> for ShipComponentIntegrity {
8571 fn from(value: f64) -> Self {
8572 Self(value)
8573 }
8574 }
8575 impl ::std::str::FromStr for ShipComponentIntegrity {
8576 type Err = <f64 as ::std::str::FromStr>::Err;
8577 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
8578 Ok(Self(value.parse()?))
8579 }
8580 }
8581 impl ::std::convert::TryFrom<&str> for ShipComponentIntegrity {
8582 type Error = <f64 as ::std::str::FromStr>::Err;
8583 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
8584 value.parse()
8585 }
8586 }
8587 impl ::std::convert::TryFrom<String> for ShipComponentIntegrity {
8588 type Error = <f64 as ::std::str::FromStr>::Err;
8589 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
8590 value.parse()
8591 }
8592 }
8593 impl ::std::fmt::Display for ShipComponentIntegrity {
8594 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8595 self.0.fmt(f)
8596 }
8597 }
8598 ///The overall quality of the component, which determines the quality of the component. High quality components return more ships parts and ship plating when a ship is scrapped. But also require more of these parts to repair. This is transparent to the player, as the parts are bought from/sold to the marketplace.
8599 ///
8600 /// <details><summary>JSON schema</summary>
8601 ///
8602 /// ```json
8603 ///{
8604 /// "description": "The overall quality of the component, which determines the quality of the component. High quality components return more ships parts and ship plating when a ship is scrapped. But also require more of these parts to repair. This is transparent to the player, as the parts are bought from/sold to the marketplace.",
8605 /// "type": "number",
8606 /// "format": "integer"
8607 ///}
8608 /// ```
8609 /// </details>
8610 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8611 #[serde(transparent)]
8612 pub struct ShipComponentQuality(pub f64);
8613 impl ::std::ops::Deref for ShipComponentQuality {
8614 type Target = f64;
8615 fn deref(&self) -> &f64 {
8616 &self.0
8617 }
8618 }
8619 impl ::std::convert::From<ShipComponentQuality> for f64 {
8620 fn from(value: ShipComponentQuality) -> Self {
8621 value.0
8622 }
8623 }
8624 impl ::std::convert::From<f64> for ShipComponentQuality {
8625 fn from(value: f64) -> Self {
8626 Self(value)
8627 }
8628 }
8629 impl ::std::str::FromStr for ShipComponentQuality {
8630 type Err = <f64 as ::std::str::FromStr>::Err;
8631 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
8632 Ok(Self(value.parse()?))
8633 }
8634 }
8635 impl ::std::convert::TryFrom<&str> for ShipComponentQuality {
8636 type Error = <f64 as ::std::str::FromStr>::Err;
8637 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
8638 value.parse()
8639 }
8640 }
8641 impl ::std::convert::TryFrom<String> for ShipComponentQuality {
8642 type Error = <f64 as ::std::str::FromStr>::Err;
8643 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
8644 value.parse()
8645 }
8646 }
8647 impl ::std::fmt::Display for ShipComponentQuality {
8648 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8649 self.0.fmt(f)
8650 }
8651 }
8652 ///An event that represents damage or wear to a ship's reactor, frame, or engine, reducing the condition of the ship.
8653 ///
8654 /// <details><summary>JSON schema</summary>
8655 ///
8656 /// ```json
8657 ///{
8658 /// "description": "An event that represents damage or wear to a ship's reactor, frame, or engine, reducing the condition of the ship.",
8659 /// "type": "object",
8660 /// "required": [
8661 /// "component",
8662 /// "description",
8663 /// "name",
8664 /// "symbol"
8665 /// ],
8666 /// "properties": {
8667 /// "component": {
8668 /// "type": "string",
8669 /// "enum": [
8670 /// "FRAME",
8671 /// "REACTOR",
8672 /// "ENGINE"
8673 /// ]
8674 /// },
8675 /// "description": {
8676 /// "description": "A description of the event.",
8677 /// "type": "string"
8678 /// },
8679 /// "name": {
8680 /// "description": "The name of the event.",
8681 /// "type": "string"
8682 /// },
8683 /// "symbol": {
8684 /// "description": "The symbol of the event that occurred.",
8685 /// "type": "string",
8686 /// "enum": [
8687 /// "REACTOR_OVERLOAD",
8688 /// "ENERGY_SPIKE_FROM_MINERAL",
8689 /// "SOLAR_FLARE_INTERFERENCE",
8690 /// "COOLANT_LEAK",
8691 /// "POWER_DISTRIBUTION_FLUCTUATION",
8692 /// "MAGNETIC_FIELD_DISRUPTION",
8693 /// "HULL_MICROMETEORITE_STRIKES",
8694 /// "STRUCTURAL_STRESS_FRACTURES",
8695 /// "CORROSIVE_MINERAL_CONTAMINATION",
8696 /// "THERMAL_EXPANSION_MISMATCH",
8697 /// "VIBRATION_DAMAGE_FROM_DRILLING",
8698 /// "ELECTROMAGNETIC_FIELD_INTERFERENCE",
8699 /// "IMPACT_WITH_EXTRACTED_DEBRIS",
8700 /// "FUEL_EFFICIENCY_DEGRADATION",
8701 /// "COOLANT_SYSTEM_AGEING",
8702 /// "DUST_MICROABRASIONS",
8703 /// "THRUSTER_NOZZLE_WEAR",
8704 /// "EXHAUST_PORT_CLOGGING",
8705 /// "BEARING_LUBRICATION_FADE",
8706 /// "SENSOR_CALIBRATION_DRIFT",
8707 /// "HULL_MICROMETEORITE_DAMAGE",
8708 /// "SPACE_DEBRIS_COLLISION",
8709 /// "THERMAL_STRESS",
8710 /// "VIBRATION_OVERLOAD",
8711 /// "PRESSURE_DIFFERENTIAL_STRESS",
8712 /// "ELECTROMAGNETIC_SURGE_EFFECTS",
8713 /// "ATMOSPHERIC_ENTRY_HEAT"
8714 /// ]
8715 /// }
8716 /// }
8717 ///}
8718 /// ```
8719 /// </details>
8720 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8721 pub struct ShipConditionEvent {
8722 pub component: ShipConditionEventComponent,
8723 ///A description of the event.
8724 pub description: ::std::string::String,
8725 ///The name of the event.
8726 pub name: ::std::string::String,
8727 ///The symbol of the event that occurred.
8728 pub symbol: ShipConditionEventSymbol,
8729 }
8730 ///`ShipConditionEventComponent`
8731 ///
8732 /// <details><summary>JSON schema</summary>
8733 ///
8734 /// ```json
8735 ///{
8736 /// "type": "string",
8737 /// "enum": [
8738 /// "FRAME",
8739 /// "REACTOR",
8740 /// "ENGINE"
8741 /// ]
8742 ///}
8743 /// ```
8744 /// </details>
8745 #[derive(
8746 ::serde::Deserialize,
8747 ::serde::Serialize,
8748 Clone,
8749 Copy,
8750 Debug,
8751 Eq,
8752 Hash,
8753 Ord,
8754 PartialEq,
8755 PartialOrd
8756 )]
8757 pub enum ShipConditionEventComponent {
8758 #[serde(rename = "FRAME")]
8759 Frame,
8760 #[serde(rename = "REACTOR")]
8761 Reactor,
8762 #[serde(rename = "ENGINE")]
8763 Engine,
8764 }
8765 impl ::std::fmt::Display for ShipConditionEventComponent {
8766 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8767 match *self {
8768 Self::Frame => f.write_str("FRAME"),
8769 Self::Reactor => f.write_str("REACTOR"),
8770 Self::Engine => f.write_str("ENGINE"),
8771 }
8772 }
8773 }
8774 impl ::std::str::FromStr for ShipConditionEventComponent {
8775 type Err = self::error::ConversionError;
8776 fn from_str(
8777 value: &str,
8778 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8779 match value {
8780 "FRAME" => Ok(Self::Frame),
8781 "REACTOR" => Ok(Self::Reactor),
8782 "ENGINE" => Ok(Self::Engine),
8783 _ => Err("invalid value".into()),
8784 }
8785 }
8786 }
8787 impl ::std::convert::TryFrom<&str> for ShipConditionEventComponent {
8788 type Error = self::error::ConversionError;
8789 fn try_from(
8790 value: &str,
8791 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8792 value.parse()
8793 }
8794 }
8795 impl ::std::convert::TryFrom<&::std::string::String>
8796 for ShipConditionEventComponent {
8797 type Error = self::error::ConversionError;
8798 fn try_from(
8799 value: &::std::string::String,
8800 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8801 value.parse()
8802 }
8803 }
8804 impl ::std::convert::TryFrom<::std::string::String> for ShipConditionEventComponent {
8805 type Error = self::error::ConversionError;
8806 fn try_from(
8807 value: ::std::string::String,
8808 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8809 value.parse()
8810 }
8811 }
8812 ///The symbol of the event that occurred.
8813 ///
8814 /// <details><summary>JSON schema</summary>
8815 ///
8816 /// ```json
8817 ///{
8818 /// "description": "The symbol of the event that occurred.",
8819 /// "type": "string",
8820 /// "enum": [
8821 /// "REACTOR_OVERLOAD",
8822 /// "ENERGY_SPIKE_FROM_MINERAL",
8823 /// "SOLAR_FLARE_INTERFERENCE",
8824 /// "COOLANT_LEAK",
8825 /// "POWER_DISTRIBUTION_FLUCTUATION",
8826 /// "MAGNETIC_FIELD_DISRUPTION",
8827 /// "HULL_MICROMETEORITE_STRIKES",
8828 /// "STRUCTURAL_STRESS_FRACTURES",
8829 /// "CORROSIVE_MINERAL_CONTAMINATION",
8830 /// "THERMAL_EXPANSION_MISMATCH",
8831 /// "VIBRATION_DAMAGE_FROM_DRILLING",
8832 /// "ELECTROMAGNETIC_FIELD_INTERFERENCE",
8833 /// "IMPACT_WITH_EXTRACTED_DEBRIS",
8834 /// "FUEL_EFFICIENCY_DEGRADATION",
8835 /// "COOLANT_SYSTEM_AGEING",
8836 /// "DUST_MICROABRASIONS",
8837 /// "THRUSTER_NOZZLE_WEAR",
8838 /// "EXHAUST_PORT_CLOGGING",
8839 /// "BEARING_LUBRICATION_FADE",
8840 /// "SENSOR_CALIBRATION_DRIFT",
8841 /// "HULL_MICROMETEORITE_DAMAGE",
8842 /// "SPACE_DEBRIS_COLLISION",
8843 /// "THERMAL_STRESS",
8844 /// "VIBRATION_OVERLOAD",
8845 /// "PRESSURE_DIFFERENTIAL_STRESS",
8846 /// "ELECTROMAGNETIC_SURGE_EFFECTS",
8847 /// "ATMOSPHERIC_ENTRY_HEAT"
8848 /// ]
8849 ///}
8850 /// ```
8851 /// </details>
8852 #[derive(
8853 ::serde::Deserialize,
8854 ::serde::Serialize,
8855 Clone,
8856 Copy,
8857 Debug,
8858 Eq,
8859 Hash,
8860 Ord,
8861 PartialEq,
8862 PartialOrd
8863 )]
8864 pub enum ShipConditionEventSymbol {
8865 #[serde(rename = "REACTOR_OVERLOAD")]
8866 ReactorOverload,
8867 #[serde(rename = "ENERGY_SPIKE_FROM_MINERAL")]
8868 EnergySpikeFromMineral,
8869 #[serde(rename = "SOLAR_FLARE_INTERFERENCE")]
8870 SolarFlareInterference,
8871 #[serde(rename = "COOLANT_LEAK")]
8872 CoolantLeak,
8873 #[serde(rename = "POWER_DISTRIBUTION_FLUCTUATION")]
8874 PowerDistributionFluctuation,
8875 #[serde(rename = "MAGNETIC_FIELD_DISRUPTION")]
8876 MagneticFieldDisruption,
8877 #[serde(rename = "HULL_MICROMETEORITE_STRIKES")]
8878 HullMicrometeoriteStrikes,
8879 #[serde(rename = "STRUCTURAL_STRESS_FRACTURES")]
8880 StructuralStressFractures,
8881 #[serde(rename = "CORROSIVE_MINERAL_CONTAMINATION")]
8882 CorrosiveMineralContamination,
8883 #[serde(rename = "THERMAL_EXPANSION_MISMATCH")]
8884 ThermalExpansionMismatch,
8885 #[serde(rename = "VIBRATION_DAMAGE_FROM_DRILLING")]
8886 VibrationDamageFromDrilling,
8887 #[serde(rename = "ELECTROMAGNETIC_FIELD_INTERFERENCE")]
8888 ElectromagneticFieldInterference,
8889 #[serde(rename = "IMPACT_WITH_EXTRACTED_DEBRIS")]
8890 ImpactWithExtractedDebris,
8891 #[serde(rename = "FUEL_EFFICIENCY_DEGRADATION")]
8892 FuelEfficiencyDegradation,
8893 #[serde(rename = "COOLANT_SYSTEM_AGEING")]
8894 CoolantSystemAgeing,
8895 #[serde(rename = "DUST_MICROABRASIONS")]
8896 DustMicroabrasions,
8897 #[serde(rename = "THRUSTER_NOZZLE_WEAR")]
8898 ThrusterNozzleWear,
8899 #[serde(rename = "EXHAUST_PORT_CLOGGING")]
8900 ExhaustPortClogging,
8901 #[serde(rename = "BEARING_LUBRICATION_FADE")]
8902 BearingLubricationFade,
8903 #[serde(rename = "SENSOR_CALIBRATION_DRIFT")]
8904 SensorCalibrationDrift,
8905 #[serde(rename = "HULL_MICROMETEORITE_DAMAGE")]
8906 HullMicrometeoriteDamage,
8907 #[serde(rename = "SPACE_DEBRIS_COLLISION")]
8908 SpaceDebrisCollision,
8909 #[serde(rename = "THERMAL_STRESS")]
8910 ThermalStress,
8911 #[serde(rename = "VIBRATION_OVERLOAD")]
8912 VibrationOverload,
8913 #[serde(rename = "PRESSURE_DIFFERENTIAL_STRESS")]
8914 PressureDifferentialStress,
8915 #[serde(rename = "ELECTROMAGNETIC_SURGE_EFFECTS")]
8916 ElectromagneticSurgeEffects,
8917 #[serde(rename = "ATMOSPHERIC_ENTRY_HEAT")]
8918 AtmosphericEntryHeat,
8919 }
8920 impl ::std::fmt::Display for ShipConditionEventSymbol {
8921 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8922 match *self {
8923 Self::ReactorOverload => f.write_str("REACTOR_OVERLOAD"),
8924 Self::EnergySpikeFromMineral => f.write_str("ENERGY_SPIKE_FROM_MINERAL"),
8925 Self::SolarFlareInterference => f.write_str("SOLAR_FLARE_INTERFERENCE"),
8926 Self::CoolantLeak => f.write_str("COOLANT_LEAK"),
8927 Self::PowerDistributionFluctuation => {
8928 f.write_str("POWER_DISTRIBUTION_FLUCTUATION")
8929 }
8930 Self::MagneticFieldDisruption => f.write_str("MAGNETIC_FIELD_DISRUPTION"),
8931 Self::HullMicrometeoriteStrikes => {
8932 f.write_str("HULL_MICROMETEORITE_STRIKES")
8933 }
8934 Self::StructuralStressFractures => {
8935 f.write_str("STRUCTURAL_STRESS_FRACTURES")
8936 }
8937 Self::CorrosiveMineralContamination => {
8938 f.write_str("CORROSIVE_MINERAL_CONTAMINATION")
8939 }
8940 Self::ThermalExpansionMismatch => {
8941 f.write_str("THERMAL_EXPANSION_MISMATCH")
8942 }
8943 Self::VibrationDamageFromDrilling => {
8944 f.write_str("VIBRATION_DAMAGE_FROM_DRILLING")
8945 }
8946 Self::ElectromagneticFieldInterference => {
8947 f.write_str("ELECTROMAGNETIC_FIELD_INTERFERENCE")
8948 }
8949 Self::ImpactWithExtractedDebris => {
8950 f.write_str("IMPACT_WITH_EXTRACTED_DEBRIS")
8951 }
8952 Self::FuelEfficiencyDegradation => {
8953 f.write_str("FUEL_EFFICIENCY_DEGRADATION")
8954 }
8955 Self::CoolantSystemAgeing => f.write_str("COOLANT_SYSTEM_AGEING"),
8956 Self::DustMicroabrasions => f.write_str("DUST_MICROABRASIONS"),
8957 Self::ThrusterNozzleWear => f.write_str("THRUSTER_NOZZLE_WEAR"),
8958 Self::ExhaustPortClogging => f.write_str("EXHAUST_PORT_CLOGGING"),
8959 Self::BearingLubricationFade => f.write_str("BEARING_LUBRICATION_FADE"),
8960 Self::SensorCalibrationDrift => f.write_str("SENSOR_CALIBRATION_DRIFT"),
8961 Self::HullMicrometeoriteDamage => {
8962 f.write_str("HULL_MICROMETEORITE_DAMAGE")
8963 }
8964 Self::SpaceDebrisCollision => f.write_str("SPACE_DEBRIS_COLLISION"),
8965 Self::ThermalStress => f.write_str("THERMAL_STRESS"),
8966 Self::VibrationOverload => f.write_str("VIBRATION_OVERLOAD"),
8967 Self::PressureDifferentialStress => {
8968 f.write_str("PRESSURE_DIFFERENTIAL_STRESS")
8969 }
8970 Self::ElectromagneticSurgeEffects => {
8971 f.write_str("ELECTROMAGNETIC_SURGE_EFFECTS")
8972 }
8973 Self::AtmosphericEntryHeat => f.write_str("ATMOSPHERIC_ENTRY_HEAT"),
8974 }
8975 }
8976 }
8977 impl ::std::str::FromStr for ShipConditionEventSymbol {
8978 type Err = self::error::ConversionError;
8979 fn from_str(
8980 value: &str,
8981 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8982 match value {
8983 "REACTOR_OVERLOAD" => Ok(Self::ReactorOverload),
8984 "ENERGY_SPIKE_FROM_MINERAL" => Ok(Self::EnergySpikeFromMineral),
8985 "SOLAR_FLARE_INTERFERENCE" => Ok(Self::SolarFlareInterference),
8986 "COOLANT_LEAK" => Ok(Self::CoolantLeak),
8987 "POWER_DISTRIBUTION_FLUCTUATION" => {
8988 Ok(Self::PowerDistributionFluctuation)
8989 }
8990 "MAGNETIC_FIELD_DISRUPTION" => Ok(Self::MagneticFieldDisruption),
8991 "HULL_MICROMETEORITE_STRIKES" => Ok(Self::HullMicrometeoriteStrikes),
8992 "STRUCTURAL_STRESS_FRACTURES" => Ok(Self::StructuralStressFractures),
8993 "CORROSIVE_MINERAL_CONTAMINATION" => {
8994 Ok(Self::CorrosiveMineralContamination)
8995 }
8996 "THERMAL_EXPANSION_MISMATCH" => Ok(Self::ThermalExpansionMismatch),
8997 "VIBRATION_DAMAGE_FROM_DRILLING" => Ok(Self::VibrationDamageFromDrilling),
8998 "ELECTROMAGNETIC_FIELD_INTERFERENCE" => {
8999 Ok(Self::ElectromagneticFieldInterference)
9000 }
9001 "IMPACT_WITH_EXTRACTED_DEBRIS" => Ok(Self::ImpactWithExtractedDebris),
9002 "FUEL_EFFICIENCY_DEGRADATION" => Ok(Self::FuelEfficiencyDegradation),
9003 "COOLANT_SYSTEM_AGEING" => Ok(Self::CoolantSystemAgeing),
9004 "DUST_MICROABRASIONS" => Ok(Self::DustMicroabrasions),
9005 "THRUSTER_NOZZLE_WEAR" => Ok(Self::ThrusterNozzleWear),
9006 "EXHAUST_PORT_CLOGGING" => Ok(Self::ExhaustPortClogging),
9007 "BEARING_LUBRICATION_FADE" => Ok(Self::BearingLubricationFade),
9008 "SENSOR_CALIBRATION_DRIFT" => Ok(Self::SensorCalibrationDrift),
9009 "HULL_MICROMETEORITE_DAMAGE" => Ok(Self::HullMicrometeoriteDamage),
9010 "SPACE_DEBRIS_COLLISION" => Ok(Self::SpaceDebrisCollision),
9011 "THERMAL_STRESS" => Ok(Self::ThermalStress),
9012 "VIBRATION_OVERLOAD" => Ok(Self::VibrationOverload),
9013 "PRESSURE_DIFFERENTIAL_STRESS" => Ok(Self::PressureDifferentialStress),
9014 "ELECTROMAGNETIC_SURGE_EFFECTS" => Ok(Self::ElectromagneticSurgeEffects),
9015 "ATMOSPHERIC_ENTRY_HEAT" => Ok(Self::AtmosphericEntryHeat),
9016 _ => Err("invalid value".into()),
9017 }
9018 }
9019 }
9020 impl ::std::convert::TryFrom<&str> for ShipConditionEventSymbol {
9021 type Error = self::error::ConversionError;
9022 fn try_from(
9023 value: &str,
9024 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9025 value.parse()
9026 }
9027 }
9028 impl ::std::convert::TryFrom<&::std::string::String> for ShipConditionEventSymbol {
9029 type Error = self::error::ConversionError;
9030 fn try_from(
9031 value: &::std::string::String,
9032 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9033 value.parse()
9034 }
9035 }
9036 impl ::std::convert::TryFrom<::std::string::String> for ShipConditionEventSymbol {
9037 type Error = self::error::ConversionError;
9038 fn try_from(
9039 value: ::std::string::String,
9040 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9041 value.parse()
9042 }
9043 }
9044 ///The ship's crew service and maintain the ship's systems and equipment.
9045 ///
9046 /// <details><summary>JSON schema</summary>
9047 ///
9048 /// ```json
9049 ///{
9050 /// "description": "The ship's crew service and maintain the ship's systems and equipment.",
9051 /// "type": "object",
9052 /// "required": [
9053 /// "capacity",
9054 /// "current",
9055 /// "morale",
9056 /// "required",
9057 /// "rotation",
9058 /// "wages"
9059 /// ],
9060 /// "properties": {
9061 /// "capacity": {
9062 /// "description": "The maximum number of crew members the ship can support.",
9063 /// "type": "integer"
9064 /// },
9065 /// "current": {
9066 /// "description": "The current number of crew members on the ship.",
9067 /// "type": "integer"
9068 /// },
9069 /// "morale": {
9070 /// "description": "A rough measure of the crew's morale. A higher morale means the crew is happier and more productive. A lower morale means the ship is more prone to accidents.",
9071 /// "type": "integer",
9072 /// "maximum": 100.0,
9073 /// "minimum": 0.0
9074 /// },
9075 /// "required": {
9076 /// "description": "The minimum number of crew members required to maintain the ship.",
9077 /// "type": "integer"
9078 /// },
9079 /// "rotation": {
9080 /// "description": "The rotation of crew shifts. A stricter shift improves the ship's performance. A more relaxed shift improves the crew's morale.",
9081 /// "default": "STRICT",
9082 /// "type": "string",
9083 /// "enum": [
9084 /// "STRICT",
9085 /// "RELAXED"
9086 /// ]
9087 /// },
9088 /// "wages": {
9089 /// "description": "The amount of credits per crew member paid per hour. Wages are paid when a ship docks at a civilized waypoint.",
9090 /// "type": "integer",
9091 /// "minimum": 0.0
9092 /// }
9093 /// }
9094 ///}
9095 /// ```
9096 /// </details>
9097 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9098 pub struct ShipCrew {
9099 ///The maximum number of crew members the ship can support.
9100 pub capacity: i64,
9101 ///The current number of crew members on the ship.
9102 pub current: i64,
9103 ///A rough measure of the crew's morale. A higher morale means the crew is happier and more productive. A lower morale means the ship is more prone to accidents.
9104 pub morale: i64,
9105 ///The minimum number of crew members required to maintain the ship.
9106 pub required: i64,
9107 ///The rotation of crew shifts. A stricter shift improves the ship's performance. A more relaxed shift improves the crew's morale.
9108 pub rotation: ShipCrewRotation,
9109 ///The amount of credits per crew member paid per hour. Wages are paid when a ship docks at a civilized waypoint.
9110 pub wages: u64,
9111 }
9112 ///The rotation of crew shifts. A stricter shift improves the ship's performance. A more relaxed shift improves the crew's morale.
9113 ///
9114 /// <details><summary>JSON schema</summary>
9115 ///
9116 /// ```json
9117 ///{
9118 /// "description": "The rotation of crew shifts. A stricter shift improves the ship's performance. A more relaxed shift improves the crew's morale.",
9119 /// "default": "STRICT",
9120 /// "type": "string",
9121 /// "enum": [
9122 /// "STRICT",
9123 /// "RELAXED"
9124 /// ]
9125 ///}
9126 /// ```
9127 /// </details>
9128 #[derive(
9129 ::serde::Deserialize,
9130 ::serde::Serialize,
9131 Clone,
9132 Copy,
9133 Debug,
9134 Eq,
9135 Hash,
9136 Ord,
9137 PartialEq,
9138 PartialOrd
9139 )]
9140 pub enum ShipCrewRotation {
9141 #[serde(rename = "STRICT")]
9142 Strict,
9143 #[serde(rename = "RELAXED")]
9144 Relaxed,
9145 }
9146 impl ::std::fmt::Display for ShipCrewRotation {
9147 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9148 match *self {
9149 Self::Strict => f.write_str("STRICT"),
9150 Self::Relaxed => f.write_str("RELAXED"),
9151 }
9152 }
9153 }
9154 impl ::std::str::FromStr for ShipCrewRotation {
9155 type Err = self::error::ConversionError;
9156 fn from_str(
9157 value: &str,
9158 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9159 match value {
9160 "STRICT" => Ok(Self::Strict),
9161 "RELAXED" => Ok(Self::Relaxed),
9162 _ => Err("invalid value".into()),
9163 }
9164 }
9165 }
9166 impl ::std::convert::TryFrom<&str> for ShipCrewRotation {
9167 type Error = self::error::ConversionError;
9168 fn try_from(
9169 value: &str,
9170 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9171 value.parse()
9172 }
9173 }
9174 impl ::std::convert::TryFrom<&::std::string::String> for ShipCrewRotation {
9175 type Error = self::error::ConversionError;
9176 fn try_from(
9177 value: &::std::string::String,
9178 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9179 value.parse()
9180 }
9181 }
9182 impl ::std::convert::TryFrom<::std::string::String> for ShipCrewRotation {
9183 type Error = self::error::ConversionError;
9184 fn try_from(
9185 value: ::std::string::String,
9186 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9187 value.parse()
9188 }
9189 }
9190 impl ::std::default::Default for ShipCrewRotation {
9191 fn default() -> Self {
9192 ShipCrewRotation::Strict
9193 }
9194 }
9195 ///The engine determines how quickly a ship travels between waypoints.
9196 ///
9197 /// <details><summary>JSON schema</summary>
9198 ///
9199 /// ```json
9200 ///{
9201 /// "description": "The engine determines how quickly a ship travels between waypoints.",
9202 /// "type": "object",
9203 /// "required": [
9204 /// "condition",
9205 /// "description",
9206 /// "integrity",
9207 /// "name",
9208 /// "quality",
9209 /// "requirements",
9210 /// "speed",
9211 /// "symbol"
9212 /// ],
9213 /// "properties": {
9214 /// "condition": {
9215 /// "$ref": "#/components/schemas/ShipComponentCondition"
9216 /// },
9217 /// "description": {
9218 /// "description": "The description of the engine.",
9219 /// "type": "string"
9220 /// },
9221 /// "integrity": {
9222 /// "$ref": "#/components/schemas/ShipComponentIntegrity"
9223 /// },
9224 /// "name": {
9225 /// "description": "The name of the engine.",
9226 /// "type": "string"
9227 /// },
9228 /// "quality": {
9229 /// "$ref": "#/components/schemas/ShipComponentQuality"
9230 /// },
9231 /// "requirements": {
9232 /// "$ref": "#/components/schemas/ShipRequirements"
9233 /// },
9234 /// "speed": {
9235 /// "description": "The speed stat of this engine. The higher the speed, the faster a ship can travel from one point to another. Reduces the time of arrival when navigating the ship.",
9236 /// "type": "integer",
9237 /// "minimum": 1.0
9238 /// },
9239 /// "symbol": {
9240 /// "description": "The symbol of the engine.",
9241 /// "type": "string",
9242 /// "enum": [
9243 /// "ENGINE_IMPULSE_DRIVE_I",
9244 /// "ENGINE_ION_DRIVE_I",
9245 /// "ENGINE_ION_DRIVE_II",
9246 /// "ENGINE_HYPER_DRIVE_I"
9247 /// ]
9248 /// }
9249 /// }
9250 ///}
9251 /// ```
9252 /// </details>
9253 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9254 pub struct ShipEngine {
9255 pub condition: ShipComponentCondition,
9256 ///The description of the engine.
9257 pub description: ::std::string::String,
9258 pub integrity: ShipComponentIntegrity,
9259 ///The name of the engine.
9260 pub name: ::std::string::String,
9261 pub quality: ShipComponentQuality,
9262 pub requirements: ShipRequirements,
9263 ///The speed stat of this engine. The higher the speed, the faster a ship can travel from one point to another. Reduces the time of arrival when navigating the ship.
9264 pub speed: ::std::num::NonZeroU64,
9265 ///The symbol of the engine.
9266 pub symbol: ShipEngineSymbol,
9267 }
9268 ///The symbol of the engine.
9269 ///
9270 /// <details><summary>JSON schema</summary>
9271 ///
9272 /// ```json
9273 ///{
9274 /// "description": "The symbol of the engine.",
9275 /// "type": "string",
9276 /// "enum": [
9277 /// "ENGINE_IMPULSE_DRIVE_I",
9278 /// "ENGINE_ION_DRIVE_I",
9279 /// "ENGINE_ION_DRIVE_II",
9280 /// "ENGINE_HYPER_DRIVE_I"
9281 /// ]
9282 ///}
9283 /// ```
9284 /// </details>
9285 #[derive(
9286 ::serde::Deserialize,
9287 ::serde::Serialize,
9288 Clone,
9289 Copy,
9290 Debug,
9291 Eq,
9292 Hash,
9293 Ord,
9294 PartialEq,
9295 PartialOrd
9296 )]
9297 pub enum ShipEngineSymbol {
9298 #[serde(rename = "ENGINE_IMPULSE_DRIVE_I")]
9299 EngineImpulseDriveI,
9300 #[serde(rename = "ENGINE_ION_DRIVE_I")]
9301 EngineIonDriveI,
9302 #[serde(rename = "ENGINE_ION_DRIVE_II")]
9303 EngineIonDriveIi,
9304 #[serde(rename = "ENGINE_HYPER_DRIVE_I")]
9305 EngineHyperDriveI,
9306 }
9307 impl ::std::fmt::Display for ShipEngineSymbol {
9308 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9309 match *self {
9310 Self::EngineImpulseDriveI => f.write_str("ENGINE_IMPULSE_DRIVE_I"),
9311 Self::EngineIonDriveI => f.write_str("ENGINE_ION_DRIVE_I"),
9312 Self::EngineIonDriveIi => f.write_str("ENGINE_ION_DRIVE_II"),
9313 Self::EngineHyperDriveI => f.write_str("ENGINE_HYPER_DRIVE_I"),
9314 }
9315 }
9316 }
9317 impl ::std::str::FromStr for ShipEngineSymbol {
9318 type Err = self::error::ConversionError;
9319 fn from_str(
9320 value: &str,
9321 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9322 match value {
9323 "ENGINE_IMPULSE_DRIVE_I" => Ok(Self::EngineImpulseDriveI),
9324 "ENGINE_ION_DRIVE_I" => Ok(Self::EngineIonDriveI),
9325 "ENGINE_ION_DRIVE_II" => Ok(Self::EngineIonDriveIi),
9326 "ENGINE_HYPER_DRIVE_I" => Ok(Self::EngineHyperDriveI),
9327 _ => Err("invalid value".into()),
9328 }
9329 }
9330 }
9331 impl ::std::convert::TryFrom<&str> for ShipEngineSymbol {
9332 type Error = self::error::ConversionError;
9333 fn try_from(
9334 value: &str,
9335 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9336 value.parse()
9337 }
9338 }
9339 impl ::std::convert::TryFrom<&::std::string::String> for ShipEngineSymbol {
9340 type Error = self::error::ConversionError;
9341 fn try_from(
9342 value: &::std::string::String,
9343 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9344 value.parse()
9345 }
9346 }
9347 impl ::std::convert::TryFrom<::std::string::String> for ShipEngineSymbol {
9348 type Error = self::error::ConversionError;
9349 fn try_from(
9350 value: ::std::string::String,
9351 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9352 value.parse()
9353 }
9354 }
9355 ///The frame of the ship. The frame determines the number of modules and mounting points of the ship, as well as base fuel capacity. As the condition of the frame takes more wear, the ship will become more sluggish and less maneuverable.
9356 ///
9357 /// <details><summary>JSON schema</summary>
9358 ///
9359 /// ```json
9360 ///{
9361 /// "description": "The frame of the ship. The frame determines the number of modules and mounting points of the ship, as well as base fuel capacity. As the condition of the frame takes more wear, the ship will become more sluggish and less maneuverable.",
9362 /// "type": "object",
9363 /// "required": [
9364 /// "condition",
9365 /// "description",
9366 /// "fuelCapacity",
9367 /// "integrity",
9368 /// "moduleSlots",
9369 /// "mountingPoints",
9370 /// "name",
9371 /// "quality",
9372 /// "requirements",
9373 /// "symbol"
9374 /// ],
9375 /// "properties": {
9376 /// "condition": {
9377 /// "$ref": "#/components/schemas/ShipComponentCondition"
9378 /// },
9379 /// "description": {
9380 /// "description": "Description of the frame.",
9381 /// "type": "string"
9382 /// },
9383 /// "fuelCapacity": {
9384 /// "description": "The maximum amount of fuel that can be stored in this ship. When refueling, the ship will be refueled to this amount.",
9385 /// "type": "integer",
9386 /// "minimum": 0.0
9387 /// },
9388 /// "integrity": {
9389 /// "$ref": "#/components/schemas/ShipComponentIntegrity"
9390 /// },
9391 /// "moduleSlots": {
9392 /// "description": "The amount of slots that can be dedicated to modules installed in the ship. Each installed module take up a number of slots, and once there are no more slots, no new modules can be installed.",
9393 /// "type": "integer",
9394 /// "minimum": 0.0
9395 /// },
9396 /// "mountingPoints": {
9397 /// "description": "The amount of slots that can be dedicated to mounts installed in the ship. Each installed mount takes up a number of points, and once there are no more points remaining, no new mounts can be installed.",
9398 /// "type": "integer",
9399 /// "minimum": 0.0
9400 /// },
9401 /// "name": {
9402 /// "description": "Name of the frame.",
9403 /// "type": "string"
9404 /// },
9405 /// "quality": {
9406 /// "$ref": "#/components/schemas/ShipComponentQuality"
9407 /// },
9408 /// "requirements": {
9409 /// "$ref": "#/components/schemas/ShipRequirements"
9410 /// },
9411 /// "symbol": {
9412 /// "description": "Symbol of the frame.",
9413 /// "type": "string",
9414 /// "enum": [
9415 /// "FRAME_PROBE",
9416 /// "FRAME_DRONE",
9417 /// "FRAME_INTERCEPTOR",
9418 /// "FRAME_RACER",
9419 /// "FRAME_FIGHTER",
9420 /// "FRAME_FRIGATE",
9421 /// "FRAME_SHUTTLE",
9422 /// "FRAME_EXPLORER",
9423 /// "FRAME_MINER",
9424 /// "FRAME_LIGHT_FREIGHTER",
9425 /// "FRAME_HEAVY_FREIGHTER",
9426 /// "FRAME_TRANSPORT",
9427 /// "FRAME_DESTROYER",
9428 /// "FRAME_CRUISER",
9429 /// "FRAME_CARRIER",
9430 /// "FRAME_BULK_FREIGHTER"
9431 /// ]
9432 /// }
9433 /// }
9434 ///}
9435 /// ```
9436 /// </details>
9437 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9438 pub struct ShipFrame {
9439 pub condition: ShipComponentCondition,
9440 ///Description of the frame.
9441 pub description: ::std::string::String,
9442 ///The maximum amount of fuel that can be stored in this ship. When refueling, the ship will be refueled to this amount.
9443 #[serde(rename = "fuelCapacity")]
9444 pub fuel_capacity: u64,
9445 pub integrity: ShipComponentIntegrity,
9446 ///The amount of slots that can be dedicated to modules installed in the ship. Each installed module take up a number of slots, and once there are no more slots, no new modules can be installed.
9447 #[serde(rename = "moduleSlots")]
9448 pub module_slots: u64,
9449 ///The amount of slots that can be dedicated to mounts installed in the ship. Each installed mount takes up a number of points, and once there are no more points remaining, no new mounts can be installed.
9450 #[serde(rename = "mountingPoints")]
9451 pub mounting_points: u64,
9452 ///Name of the frame.
9453 pub name: ::std::string::String,
9454 pub quality: ShipComponentQuality,
9455 pub requirements: ShipRequirements,
9456 ///Symbol of the frame.
9457 pub symbol: ShipFrameSymbol,
9458 }
9459 ///Symbol of the frame.
9460 ///
9461 /// <details><summary>JSON schema</summary>
9462 ///
9463 /// ```json
9464 ///{
9465 /// "description": "Symbol of the frame.",
9466 /// "type": "string",
9467 /// "enum": [
9468 /// "FRAME_PROBE",
9469 /// "FRAME_DRONE",
9470 /// "FRAME_INTERCEPTOR",
9471 /// "FRAME_RACER",
9472 /// "FRAME_FIGHTER",
9473 /// "FRAME_FRIGATE",
9474 /// "FRAME_SHUTTLE",
9475 /// "FRAME_EXPLORER",
9476 /// "FRAME_MINER",
9477 /// "FRAME_LIGHT_FREIGHTER",
9478 /// "FRAME_HEAVY_FREIGHTER",
9479 /// "FRAME_TRANSPORT",
9480 /// "FRAME_DESTROYER",
9481 /// "FRAME_CRUISER",
9482 /// "FRAME_CARRIER",
9483 /// "FRAME_BULK_FREIGHTER"
9484 /// ]
9485 ///}
9486 /// ```
9487 /// </details>
9488 #[derive(
9489 ::serde::Deserialize,
9490 ::serde::Serialize,
9491 Clone,
9492 Copy,
9493 Debug,
9494 Eq,
9495 Hash,
9496 Ord,
9497 PartialEq,
9498 PartialOrd
9499 )]
9500 pub enum ShipFrameSymbol {
9501 #[serde(rename = "FRAME_PROBE")]
9502 FrameProbe,
9503 #[serde(rename = "FRAME_DRONE")]
9504 FrameDrone,
9505 #[serde(rename = "FRAME_INTERCEPTOR")]
9506 FrameInterceptor,
9507 #[serde(rename = "FRAME_RACER")]
9508 FrameRacer,
9509 #[serde(rename = "FRAME_FIGHTER")]
9510 FrameFighter,
9511 #[serde(rename = "FRAME_FRIGATE")]
9512 FrameFrigate,
9513 #[serde(rename = "FRAME_SHUTTLE")]
9514 FrameShuttle,
9515 #[serde(rename = "FRAME_EXPLORER")]
9516 FrameExplorer,
9517 #[serde(rename = "FRAME_MINER")]
9518 FrameMiner,
9519 #[serde(rename = "FRAME_LIGHT_FREIGHTER")]
9520 FrameLightFreighter,
9521 #[serde(rename = "FRAME_HEAVY_FREIGHTER")]
9522 FrameHeavyFreighter,
9523 #[serde(rename = "FRAME_TRANSPORT")]
9524 FrameTransport,
9525 #[serde(rename = "FRAME_DESTROYER")]
9526 FrameDestroyer,
9527 #[serde(rename = "FRAME_CRUISER")]
9528 FrameCruiser,
9529 #[serde(rename = "FRAME_CARRIER")]
9530 FrameCarrier,
9531 #[serde(rename = "FRAME_BULK_FREIGHTER")]
9532 FrameBulkFreighter,
9533 }
9534 impl ::std::fmt::Display for ShipFrameSymbol {
9535 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9536 match *self {
9537 Self::FrameProbe => f.write_str("FRAME_PROBE"),
9538 Self::FrameDrone => f.write_str("FRAME_DRONE"),
9539 Self::FrameInterceptor => f.write_str("FRAME_INTERCEPTOR"),
9540 Self::FrameRacer => f.write_str("FRAME_RACER"),
9541 Self::FrameFighter => f.write_str("FRAME_FIGHTER"),
9542 Self::FrameFrigate => f.write_str("FRAME_FRIGATE"),
9543 Self::FrameShuttle => f.write_str("FRAME_SHUTTLE"),
9544 Self::FrameExplorer => f.write_str("FRAME_EXPLORER"),
9545 Self::FrameMiner => f.write_str("FRAME_MINER"),
9546 Self::FrameLightFreighter => f.write_str("FRAME_LIGHT_FREIGHTER"),
9547 Self::FrameHeavyFreighter => f.write_str("FRAME_HEAVY_FREIGHTER"),
9548 Self::FrameTransport => f.write_str("FRAME_TRANSPORT"),
9549 Self::FrameDestroyer => f.write_str("FRAME_DESTROYER"),
9550 Self::FrameCruiser => f.write_str("FRAME_CRUISER"),
9551 Self::FrameCarrier => f.write_str("FRAME_CARRIER"),
9552 Self::FrameBulkFreighter => f.write_str("FRAME_BULK_FREIGHTER"),
9553 }
9554 }
9555 }
9556 impl ::std::str::FromStr for ShipFrameSymbol {
9557 type Err = self::error::ConversionError;
9558 fn from_str(
9559 value: &str,
9560 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9561 match value {
9562 "FRAME_PROBE" => Ok(Self::FrameProbe),
9563 "FRAME_DRONE" => Ok(Self::FrameDrone),
9564 "FRAME_INTERCEPTOR" => Ok(Self::FrameInterceptor),
9565 "FRAME_RACER" => Ok(Self::FrameRacer),
9566 "FRAME_FIGHTER" => Ok(Self::FrameFighter),
9567 "FRAME_FRIGATE" => Ok(Self::FrameFrigate),
9568 "FRAME_SHUTTLE" => Ok(Self::FrameShuttle),
9569 "FRAME_EXPLORER" => Ok(Self::FrameExplorer),
9570 "FRAME_MINER" => Ok(Self::FrameMiner),
9571 "FRAME_LIGHT_FREIGHTER" => Ok(Self::FrameLightFreighter),
9572 "FRAME_HEAVY_FREIGHTER" => Ok(Self::FrameHeavyFreighter),
9573 "FRAME_TRANSPORT" => Ok(Self::FrameTransport),
9574 "FRAME_DESTROYER" => Ok(Self::FrameDestroyer),
9575 "FRAME_CRUISER" => Ok(Self::FrameCruiser),
9576 "FRAME_CARRIER" => Ok(Self::FrameCarrier),
9577 "FRAME_BULK_FREIGHTER" => Ok(Self::FrameBulkFreighter),
9578 _ => Err("invalid value".into()),
9579 }
9580 }
9581 }
9582 impl ::std::convert::TryFrom<&str> for ShipFrameSymbol {
9583 type Error = self::error::ConversionError;
9584 fn try_from(
9585 value: &str,
9586 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9587 value.parse()
9588 }
9589 }
9590 impl ::std::convert::TryFrom<&::std::string::String> for ShipFrameSymbol {
9591 type Error = self::error::ConversionError;
9592 fn try_from(
9593 value: &::std::string::String,
9594 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9595 value.parse()
9596 }
9597 }
9598 impl ::std::convert::TryFrom<::std::string::String> for ShipFrameSymbol {
9599 type Error = self::error::ConversionError;
9600 fn try_from(
9601 value: ::std::string::String,
9602 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9603 value.parse()
9604 }
9605 }
9606 ///Details of the ship's fuel tanks including how much fuel was consumed during the last transit or action.
9607 ///
9608 /// <details><summary>JSON schema</summary>
9609 ///
9610 /// ```json
9611 ///{
9612 /// "description": "Details of the ship's fuel tanks including how much fuel was consumed during the last transit or action.",
9613 /// "type": "object",
9614 /// "required": [
9615 /// "capacity",
9616 /// "current"
9617 /// ],
9618 /// "properties": {
9619 /// "capacity": {
9620 /// "description": "The maximum amount of fuel the ship's tanks can hold.",
9621 /// "type": "integer",
9622 /// "minimum": 0.0
9623 /// },
9624 /// "consumed": {
9625 /// "description": "An object that only shows up when an action has consumed fuel in the process. Shows the fuel consumption data.",
9626 /// "type": "object",
9627 /// "required": [
9628 /// "amount",
9629 /// "timestamp"
9630 /// ],
9631 /// "properties": {
9632 /// "amount": {
9633 /// "description": "The amount of fuel consumed by the most recent transit or action.",
9634 /// "type": "integer",
9635 /// "minimum": 0.0
9636 /// },
9637 /// "timestamp": {
9638 /// "description": "The time at which the fuel was consumed.",
9639 /// "type": "string",
9640 /// "format": "date-time"
9641 /// }
9642 /// }
9643 /// },
9644 /// "current": {
9645 /// "description": "The current amount of fuel in the ship's tanks.",
9646 /// "type": "integer",
9647 /// "minimum": 0.0
9648 /// }
9649 /// }
9650 ///}
9651 /// ```
9652 /// </details>
9653 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9654 pub struct ShipFuel {
9655 ///The maximum amount of fuel the ship's tanks can hold.
9656 pub capacity: u64,
9657 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9658 pub consumed: ::std::option::Option<ShipFuelConsumed>,
9659 ///The current amount of fuel in the ship's tanks.
9660 pub current: u64,
9661 }
9662 ///An object that only shows up when an action has consumed fuel in the process. Shows the fuel consumption data.
9663 ///
9664 /// <details><summary>JSON schema</summary>
9665 ///
9666 /// ```json
9667 ///{
9668 /// "description": "An object that only shows up when an action has consumed fuel in the process. Shows the fuel consumption data.",
9669 /// "type": "object",
9670 /// "required": [
9671 /// "amount",
9672 /// "timestamp"
9673 /// ],
9674 /// "properties": {
9675 /// "amount": {
9676 /// "description": "The amount of fuel consumed by the most recent transit or action.",
9677 /// "type": "integer",
9678 /// "minimum": 0.0
9679 /// },
9680 /// "timestamp": {
9681 /// "description": "The time at which the fuel was consumed.",
9682 /// "type": "string",
9683 /// "format": "date-time"
9684 /// }
9685 /// }
9686 ///}
9687 /// ```
9688 /// </details>
9689 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9690 pub struct ShipFuelConsumed {
9691 ///The amount of fuel consumed by the most recent transit or action.
9692 pub amount: u64,
9693 ///The time at which the fuel was consumed.
9694 pub timestamp: ::chrono::DateTime<::chrono::offset::Utc>,
9695 }
9696 ///Result of a transaction for a ship modification, such as installing a mount or a module.
9697 ///
9698 /// <details><summary>JSON schema</summary>
9699 ///
9700 /// ```json
9701 ///{
9702 /// "description": "Result of a transaction for a ship modification, such as installing a mount or a module.",
9703 /// "type": "object",
9704 /// "required": [
9705 /// "shipSymbol",
9706 /// "timestamp",
9707 /// "totalPrice",
9708 /// "tradeSymbol",
9709 /// "waypointSymbol"
9710 /// ],
9711 /// "properties": {
9712 /// "shipSymbol": {
9713 /// "description": "The symbol of the ship that made the transaction.",
9714 /// "type": "string"
9715 /// },
9716 /// "timestamp": {
9717 /// "description": "The timestamp of the transaction.",
9718 /// "type": "string",
9719 /// "format": "date-time"
9720 /// },
9721 /// "totalPrice": {
9722 /// "description": "The total price of the transaction.",
9723 /// "type": "integer",
9724 /// "minimum": 0.0
9725 /// },
9726 /// "tradeSymbol": {
9727 /// "description": "The symbol of the trade good.",
9728 /// "type": "string"
9729 /// },
9730 /// "waypointSymbol": {
9731 /// "description": "The symbol of the waypoint where the transaction took place.",
9732 /// "type": "string"
9733 /// }
9734 /// }
9735 ///}
9736 /// ```
9737 /// </details>
9738 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9739 pub struct ShipModificationTransaction {
9740 ///The symbol of the ship that made the transaction.
9741 #[serde(rename = "shipSymbol")]
9742 pub ship_symbol: ::std::string::String,
9743 ///The timestamp of the transaction.
9744 pub timestamp: ::chrono::DateTime<::chrono::offset::Utc>,
9745 ///The total price of the transaction.
9746 #[serde(rename = "totalPrice")]
9747 pub total_price: u64,
9748 ///The symbol of the trade good.
9749 #[serde(rename = "tradeSymbol")]
9750 pub trade_symbol: ::std::string::String,
9751 ///The symbol of the waypoint where the transaction took place.
9752 #[serde(rename = "waypointSymbol")]
9753 pub waypoint_symbol: ::std::string::String,
9754 }
9755 ///A module can be installed in a ship and provides a set of capabilities such as storage space or quarters for crew. Module installations are permanent.
9756 ///
9757 /// <details><summary>JSON schema</summary>
9758 ///
9759 /// ```json
9760 ///{
9761 /// "description": "A module can be installed in a ship and provides a set of capabilities such as storage space or quarters for crew. Module installations are permanent.",
9762 /// "type": "object",
9763 /// "required": [
9764 /// "description",
9765 /// "name",
9766 /// "requirements",
9767 /// "symbol"
9768 /// ],
9769 /// "properties": {
9770 /// "capacity": {
9771 /// "description": "Modules that provide capacity, such as cargo hold or crew quarters will show this value to denote how much of a bonus the module grants.",
9772 /// "type": "integer",
9773 /// "minimum": 0.0
9774 /// },
9775 /// "description": {
9776 /// "description": "Description of this module.",
9777 /// "type": "string"
9778 /// },
9779 /// "name": {
9780 /// "description": "Name of this module.",
9781 /// "type": "string"
9782 /// },
9783 /// "range": {
9784 /// "description": "Modules that have a range will such as a sensor array show this value to denote how far can the module reach with its capabilities.",
9785 /// "type": "integer",
9786 /// "minimum": 0.0
9787 /// },
9788 /// "requirements": {
9789 /// "$ref": "#/components/schemas/ShipRequirements"
9790 /// },
9791 /// "symbol": {
9792 /// "description": "The symbol of the module.",
9793 /// "type": "string",
9794 /// "enum": [
9795 /// "MODULE_MINERAL_PROCESSOR_I",
9796 /// "MODULE_GAS_PROCESSOR_I",
9797 /// "MODULE_CARGO_HOLD_I",
9798 /// "MODULE_CARGO_HOLD_II",
9799 /// "MODULE_CARGO_HOLD_III",
9800 /// "MODULE_CREW_QUARTERS_I",
9801 /// "MODULE_ENVOY_QUARTERS_I",
9802 /// "MODULE_PASSENGER_CABIN_I",
9803 /// "MODULE_MICRO_REFINERY_I",
9804 /// "MODULE_ORE_REFINERY_I",
9805 /// "MODULE_FUEL_REFINERY_I",
9806 /// "MODULE_SCIENCE_LAB_I",
9807 /// "MODULE_JUMP_DRIVE_I",
9808 /// "MODULE_JUMP_DRIVE_II",
9809 /// "MODULE_JUMP_DRIVE_III",
9810 /// "MODULE_WARP_DRIVE_I",
9811 /// "MODULE_WARP_DRIVE_II",
9812 /// "MODULE_WARP_DRIVE_III",
9813 /// "MODULE_SHIELD_GENERATOR_I",
9814 /// "MODULE_SHIELD_GENERATOR_II"
9815 /// ]
9816 /// }
9817 /// }
9818 ///}
9819 /// ```
9820 /// </details>
9821 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9822 pub struct ShipModule {
9823 ///Modules that provide capacity, such as cargo hold or crew quarters will show this value to denote how much of a bonus the module grants.
9824 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9825 pub capacity: ::std::option::Option<u64>,
9826 ///Description of this module.
9827 pub description: ::std::string::String,
9828 ///Name of this module.
9829 pub name: ::std::string::String,
9830 ///Modules that have a range will such as a sensor array show this value to denote how far can the module reach with its capabilities.
9831 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9832 pub range: ::std::option::Option<u64>,
9833 pub requirements: ShipRequirements,
9834 ///The symbol of the module.
9835 pub symbol: ShipModuleSymbol,
9836 }
9837 ///The symbol of the module.
9838 ///
9839 /// <details><summary>JSON schema</summary>
9840 ///
9841 /// ```json
9842 ///{
9843 /// "description": "The symbol of the module.",
9844 /// "type": "string",
9845 /// "enum": [
9846 /// "MODULE_MINERAL_PROCESSOR_I",
9847 /// "MODULE_GAS_PROCESSOR_I",
9848 /// "MODULE_CARGO_HOLD_I",
9849 /// "MODULE_CARGO_HOLD_II",
9850 /// "MODULE_CARGO_HOLD_III",
9851 /// "MODULE_CREW_QUARTERS_I",
9852 /// "MODULE_ENVOY_QUARTERS_I",
9853 /// "MODULE_PASSENGER_CABIN_I",
9854 /// "MODULE_MICRO_REFINERY_I",
9855 /// "MODULE_ORE_REFINERY_I",
9856 /// "MODULE_FUEL_REFINERY_I",
9857 /// "MODULE_SCIENCE_LAB_I",
9858 /// "MODULE_JUMP_DRIVE_I",
9859 /// "MODULE_JUMP_DRIVE_II",
9860 /// "MODULE_JUMP_DRIVE_III",
9861 /// "MODULE_WARP_DRIVE_I",
9862 /// "MODULE_WARP_DRIVE_II",
9863 /// "MODULE_WARP_DRIVE_III",
9864 /// "MODULE_SHIELD_GENERATOR_I",
9865 /// "MODULE_SHIELD_GENERATOR_II"
9866 /// ]
9867 ///}
9868 /// ```
9869 /// </details>
9870 #[derive(
9871 ::serde::Deserialize,
9872 ::serde::Serialize,
9873 Clone,
9874 Copy,
9875 Debug,
9876 Eq,
9877 Hash,
9878 Ord,
9879 PartialEq,
9880 PartialOrd
9881 )]
9882 pub enum ShipModuleSymbol {
9883 #[serde(rename = "MODULE_MINERAL_PROCESSOR_I")]
9884 ModuleMineralProcessorI,
9885 #[serde(rename = "MODULE_GAS_PROCESSOR_I")]
9886 ModuleGasProcessorI,
9887 #[serde(rename = "MODULE_CARGO_HOLD_I")]
9888 ModuleCargoHoldI,
9889 #[serde(rename = "MODULE_CARGO_HOLD_II")]
9890 ModuleCargoHoldIi,
9891 #[serde(rename = "MODULE_CARGO_HOLD_III")]
9892 ModuleCargoHoldIii,
9893 #[serde(rename = "MODULE_CREW_QUARTERS_I")]
9894 ModuleCrewQuartersI,
9895 #[serde(rename = "MODULE_ENVOY_QUARTERS_I")]
9896 ModuleEnvoyQuartersI,
9897 #[serde(rename = "MODULE_PASSENGER_CABIN_I")]
9898 ModulePassengerCabinI,
9899 #[serde(rename = "MODULE_MICRO_REFINERY_I")]
9900 ModuleMicroRefineryI,
9901 #[serde(rename = "MODULE_ORE_REFINERY_I")]
9902 ModuleOreRefineryI,
9903 #[serde(rename = "MODULE_FUEL_REFINERY_I")]
9904 ModuleFuelRefineryI,
9905 #[serde(rename = "MODULE_SCIENCE_LAB_I")]
9906 ModuleScienceLabI,
9907 #[serde(rename = "MODULE_JUMP_DRIVE_I")]
9908 ModuleJumpDriveI,
9909 #[serde(rename = "MODULE_JUMP_DRIVE_II")]
9910 ModuleJumpDriveIi,
9911 #[serde(rename = "MODULE_JUMP_DRIVE_III")]
9912 ModuleJumpDriveIii,
9913 #[serde(rename = "MODULE_WARP_DRIVE_I")]
9914 ModuleWarpDriveI,
9915 #[serde(rename = "MODULE_WARP_DRIVE_II")]
9916 ModuleWarpDriveIi,
9917 #[serde(rename = "MODULE_WARP_DRIVE_III")]
9918 ModuleWarpDriveIii,
9919 #[serde(rename = "MODULE_SHIELD_GENERATOR_I")]
9920 ModuleShieldGeneratorI,
9921 #[serde(rename = "MODULE_SHIELD_GENERATOR_II")]
9922 ModuleShieldGeneratorIi,
9923 }
9924 impl ::std::fmt::Display for ShipModuleSymbol {
9925 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9926 match *self {
9927 Self::ModuleMineralProcessorI => {
9928 f.write_str("MODULE_MINERAL_PROCESSOR_I")
9929 }
9930 Self::ModuleGasProcessorI => f.write_str("MODULE_GAS_PROCESSOR_I"),
9931 Self::ModuleCargoHoldI => f.write_str("MODULE_CARGO_HOLD_I"),
9932 Self::ModuleCargoHoldIi => f.write_str("MODULE_CARGO_HOLD_II"),
9933 Self::ModuleCargoHoldIii => f.write_str("MODULE_CARGO_HOLD_III"),
9934 Self::ModuleCrewQuartersI => f.write_str("MODULE_CREW_QUARTERS_I"),
9935 Self::ModuleEnvoyQuartersI => f.write_str("MODULE_ENVOY_QUARTERS_I"),
9936 Self::ModulePassengerCabinI => f.write_str("MODULE_PASSENGER_CABIN_I"),
9937 Self::ModuleMicroRefineryI => f.write_str("MODULE_MICRO_REFINERY_I"),
9938 Self::ModuleOreRefineryI => f.write_str("MODULE_ORE_REFINERY_I"),
9939 Self::ModuleFuelRefineryI => f.write_str("MODULE_FUEL_REFINERY_I"),
9940 Self::ModuleScienceLabI => f.write_str("MODULE_SCIENCE_LAB_I"),
9941 Self::ModuleJumpDriveI => f.write_str("MODULE_JUMP_DRIVE_I"),
9942 Self::ModuleJumpDriveIi => f.write_str("MODULE_JUMP_DRIVE_II"),
9943 Self::ModuleJumpDriveIii => f.write_str("MODULE_JUMP_DRIVE_III"),
9944 Self::ModuleWarpDriveI => f.write_str("MODULE_WARP_DRIVE_I"),
9945 Self::ModuleWarpDriveIi => f.write_str("MODULE_WARP_DRIVE_II"),
9946 Self::ModuleWarpDriveIii => f.write_str("MODULE_WARP_DRIVE_III"),
9947 Self::ModuleShieldGeneratorI => f.write_str("MODULE_SHIELD_GENERATOR_I"),
9948 Self::ModuleShieldGeneratorIi => {
9949 f.write_str("MODULE_SHIELD_GENERATOR_II")
9950 }
9951 }
9952 }
9953 }
9954 impl ::std::str::FromStr for ShipModuleSymbol {
9955 type Err = self::error::ConversionError;
9956 fn from_str(
9957 value: &str,
9958 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9959 match value {
9960 "MODULE_MINERAL_PROCESSOR_I" => Ok(Self::ModuleMineralProcessorI),
9961 "MODULE_GAS_PROCESSOR_I" => Ok(Self::ModuleGasProcessorI),
9962 "MODULE_CARGO_HOLD_I" => Ok(Self::ModuleCargoHoldI),
9963 "MODULE_CARGO_HOLD_II" => Ok(Self::ModuleCargoHoldIi),
9964 "MODULE_CARGO_HOLD_III" => Ok(Self::ModuleCargoHoldIii),
9965 "MODULE_CREW_QUARTERS_I" => Ok(Self::ModuleCrewQuartersI),
9966 "MODULE_ENVOY_QUARTERS_I" => Ok(Self::ModuleEnvoyQuartersI),
9967 "MODULE_PASSENGER_CABIN_I" => Ok(Self::ModulePassengerCabinI),
9968 "MODULE_MICRO_REFINERY_I" => Ok(Self::ModuleMicroRefineryI),
9969 "MODULE_ORE_REFINERY_I" => Ok(Self::ModuleOreRefineryI),
9970 "MODULE_FUEL_REFINERY_I" => Ok(Self::ModuleFuelRefineryI),
9971 "MODULE_SCIENCE_LAB_I" => Ok(Self::ModuleScienceLabI),
9972 "MODULE_JUMP_DRIVE_I" => Ok(Self::ModuleJumpDriveI),
9973 "MODULE_JUMP_DRIVE_II" => Ok(Self::ModuleJumpDriveIi),
9974 "MODULE_JUMP_DRIVE_III" => Ok(Self::ModuleJumpDriveIii),
9975 "MODULE_WARP_DRIVE_I" => Ok(Self::ModuleWarpDriveI),
9976 "MODULE_WARP_DRIVE_II" => Ok(Self::ModuleWarpDriveIi),
9977 "MODULE_WARP_DRIVE_III" => Ok(Self::ModuleWarpDriveIii),
9978 "MODULE_SHIELD_GENERATOR_I" => Ok(Self::ModuleShieldGeneratorI),
9979 "MODULE_SHIELD_GENERATOR_II" => Ok(Self::ModuleShieldGeneratorIi),
9980 _ => Err("invalid value".into()),
9981 }
9982 }
9983 }
9984 impl ::std::convert::TryFrom<&str> for ShipModuleSymbol {
9985 type Error = self::error::ConversionError;
9986 fn try_from(
9987 value: &str,
9988 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9989 value.parse()
9990 }
9991 }
9992 impl ::std::convert::TryFrom<&::std::string::String> for ShipModuleSymbol {
9993 type Error = self::error::ConversionError;
9994 fn try_from(
9995 value: &::std::string::String,
9996 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9997 value.parse()
9998 }
9999 }
10000 impl ::std::convert::TryFrom<::std::string::String> for ShipModuleSymbol {
10001 type Error = self::error::ConversionError;
10002 fn try_from(
10003 value: ::std::string::String,
10004 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10005 value.parse()
10006 }
10007 }
10008 ///A mount is installed on the exterier of a ship.
10009 ///
10010 /// <details><summary>JSON schema</summary>
10011 ///
10012 /// ```json
10013 ///{
10014 /// "description": "A mount is installed on the exterier of a ship.",
10015 /// "type": "object",
10016 /// "required": [
10017 /// "description",
10018 /// "name",
10019 /// "requirements",
10020 /// "symbol"
10021 /// ],
10022 /// "properties": {
10023 /// "deposits": {
10024 /// "description": "Mounts that have this value denote what goods can be produced from using the mount.",
10025 /// "type": "array",
10026 /// "items": {
10027 /// "type": "string",
10028 /// "enum": [
10029 /// "QUARTZ_SAND",
10030 /// "SILICON_CRYSTALS",
10031 /// "PRECIOUS_STONES",
10032 /// "ICE_WATER",
10033 /// "AMMONIA_ICE",
10034 /// "IRON_ORE",
10035 /// "COPPER_ORE",
10036 /// "SILVER_ORE",
10037 /// "ALUMINUM_ORE",
10038 /// "GOLD_ORE",
10039 /// "PLATINUM_ORE",
10040 /// "DIAMONDS",
10041 /// "URANITE_ORE",
10042 /// "MERITIUM_ORE"
10043 /// ]
10044 /// }
10045 /// },
10046 /// "description": {
10047 /// "description": "Description of this mount.",
10048 /// "type": "string"
10049 /// },
10050 /// "name": {
10051 /// "description": "Name of this mount.",
10052 /// "type": "string"
10053 /// },
10054 /// "requirements": {
10055 /// "$ref": "#/components/schemas/ShipRequirements"
10056 /// },
10057 /// "strength": {
10058 /// "description": "Mounts that have this value, such as mining lasers, denote how powerful this mount's capabilities are.",
10059 /// "type": "integer",
10060 /// "minimum": 0.0
10061 /// },
10062 /// "symbol": {
10063 /// "description": "Symbol of this mount.",
10064 /// "type": "string",
10065 /// "enum": [
10066 /// "MOUNT_GAS_SIPHON_I",
10067 /// "MOUNT_GAS_SIPHON_II",
10068 /// "MOUNT_GAS_SIPHON_III",
10069 /// "MOUNT_SURVEYOR_I",
10070 /// "MOUNT_SURVEYOR_II",
10071 /// "MOUNT_SURVEYOR_III",
10072 /// "MOUNT_SENSOR_ARRAY_I",
10073 /// "MOUNT_SENSOR_ARRAY_II",
10074 /// "MOUNT_SENSOR_ARRAY_III",
10075 /// "MOUNT_MINING_LASER_I",
10076 /// "MOUNT_MINING_LASER_II",
10077 /// "MOUNT_MINING_LASER_III",
10078 /// "MOUNT_LASER_CANNON_I",
10079 /// "MOUNT_MISSILE_LAUNCHER_I",
10080 /// "MOUNT_TURRET_I"
10081 /// ]
10082 /// }
10083 /// }
10084 ///}
10085 /// ```
10086 /// </details>
10087 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10088 pub struct ShipMount {
10089 ///Mounts that have this value denote what goods can be produced from using the mount.
10090 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
10091 pub deposits: ::std::vec::Vec<ShipMountDepositsItem>,
10092 ///Description of this mount.
10093 pub description: ::std::string::String,
10094 ///Name of this mount.
10095 pub name: ::std::string::String,
10096 pub requirements: ShipRequirements,
10097 ///Mounts that have this value, such as mining lasers, denote how powerful this mount's capabilities are.
10098 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10099 pub strength: ::std::option::Option<u64>,
10100 ///Symbol of this mount.
10101 pub symbol: ShipMountSymbol,
10102 }
10103 ///`ShipMountDepositsItem`
10104 ///
10105 /// <details><summary>JSON schema</summary>
10106 ///
10107 /// ```json
10108 ///{
10109 /// "type": "string",
10110 /// "enum": [
10111 /// "QUARTZ_SAND",
10112 /// "SILICON_CRYSTALS",
10113 /// "PRECIOUS_STONES",
10114 /// "ICE_WATER",
10115 /// "AMMONIA_ICE",
10116 /// "IRON_ORE",
10117 /// "COPPER_ORE",
10118 /// "SILVER_ORE",
10119 /// "ALUMINUM_ORE",
10120 /// "GOLD_ORE",
10121 /// "PLATINUM_ORE",
10122 /// "DIAMONDS",
10123 /// "URANITE_ORE",
10124 /// "MERITIUM_ORE"
10125 /// ]
10126 ///}
10127 /// ```
10128 /// </details>
10129 #[derive(
10130 ::serde::Deserialize,
10131 ::serde::Serialize,
10132 Clone,
10133 Copy,
10134 Debug,
10135 Eq,
10136 Hash,
10137 Ord,
10138 PartialEq,
10139 PartialOrd
10140 )]
10141 pub enum ShipMountDepositsItem {
10142 #[serde(rename = "QUARTZ_SAND")]
10143 QuartzSand,
10144 #[serde(rename = "SILICON_CRYSTALS")]
10145 SiliconCrystals,
10146 #[serde(rename = "PRECIOUS_STONES")]
10147 PreciousStones,
10148 #[serde(rename = "ICE_WATER")]
10149 IceWater,
10150 #[serde(rename = "AMMONIA_ICE")]
10151 AmmoniaIce,
10152 #[serde(rename = "IRON_ORE")]
10153 IronOre,
10154 #[serde(rename = "COPPER_ORE")]
10155 CopperOre,
10156 #[serde(rename = "SILVER_ORE")]
10157 SilverOre,
10158 #[serde(rename = "ALUMINUM_ORE")]
10159 AluminumOre,
10160 #[serde(rename = "GOLD_ORE")]
10161 GoldOre,
10162 #[serde(rename = "PLATINUM_ORE")]
10163 PlatinumOre,
10164 #[serde(rename = "DIAMONDS")]
10165 Diamonds,
10166 #[serde(rename = "URANITE_ORE")]
10167 UraniteOre,
10168 #[serde(rename = "MERITIUM_ORE")]
10169 MeritiumOre,
10170 }
10171 impl ::std::fmt::Display for ShipMountDepositsItem {
10172 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10173 match *self {
10174 Self::QuartzSand => f.write_str("QUARTZ_SAND"),
10175 Self::SiliconCrystals => f.write_str("SILICON_CRYSTALS"),
10176 Self::PreciousStones => f.write_str("PRECIOUS_STONES"),
10177 Self::IceWater => f.write_str("ICE_WATER"),
10178 Self::AmmoniaIce => f.write_str("AMMONIA_ICE"),
10179 Self::IronOre => f.write_str("IRON_ORE"),
10180 Self::CopperOre => f.write_str("COPPER_ORE"),
10181 Self::SilverOre => f.write_str("SILVER_ORE"),
10182 Self::AluminumOre => f.write_str("ALUMINUM_ORE"),
10183 Self::GoldOre => f.write_str("GOLD_ORE"),
10184 Self::PlatinumOre => f.write_str("PLATINUM_ORE"),
10185 Self::Diamonds => f.write_str("DIAMONDS"),
10186 Self::UraniteOre => f.write_str("URANITE_ORE"),
10187 Self::MeritiumOre => f.write_str("MERITIUM_ORE"),
10188 }
10189 }
10190 }
10191 impl ::std::str::FromStr for ShipMountDepositsItem {
10192 type Err = self::error::ConversionError;
10193 fn from_str(
10194 value: &str,
10195 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10196 match value {
10197 "QUARTZ_SAND" => Ok(Self::QuartzSand),
10198 "SILICON_CRYSTALS" => Ok(Self::SiliconCrystals),
10199 "PRECIOUS_STONES" => Ok(Self::PreciousStones),
10200 "ICE_WATER" => Ok(Self::IceWater),
10201 "AMMONIA_ICE" => Ok(Self::AmmoniaIce),
10202 "IRON_ORE" => Ok(Self::IronOre),
10203 "COPPER_ORE" => Ok(Self::CopperOre),
10204 "SILVER_ORE" => Ok(Self::SilverOre),
10205 "ALUMINUM_ORE" => Ok(Self::AluminumOre),
10206 "GOLD_ORE" => Ok(Self::GoldOre),
10207 "PLATINUM_ORE" => Ok(Self::PlatinumOre),
10208 "DIAMONDS" => Ok(Self::Diamonds),
10209 "URANITE_ORE" => Ok(Self::UraniteOre),
10210 "MERITIUM_ORE" => Ok(Self::MeritiumOre),
10211 _ => Err("invalid value".into()),
10212 }
10213 }
10214 }
10215 impl ::std::convert::TryFrom<&str> for ShipMountDepositsItem {
10216 type Error = self::error::ConversionError;
10217 fn try_from(
10218 value: &str,
10219 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10220 value.parse()
10221 }
10222 }
10223 impl ::std::convert::TryFrom<&::std::string::String> for ShipMountDepositsItem {
10224 type Error = self::error::ConversionError;
10225 fn try_from(
10226 value: &::std::string::String,
10227 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10228 value.parse()
10229 }
10230 }
10231 impl ::std::convert::TryFrom<::std::string::String> for ShipMountDepositsItem {
10232 type Error = self::error::ConversionError;
10233 fn try_from(
10234 value: ::std::string::String,
10235 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10236 value.parse()
10237 }
10238 }
10239 ///Symbol of this mount.
10240 ///
10241 /// <details><summary>JSON schema</summary>
10242 ///
10243 /// ```json
10244 ///{
10245 /// "description": "Symbol of this mount.",
10246 /// "type": "string",
10247 /// "enum": [
10248 /// "MOUNT_GAS_SIPHON_I",
10249 /// "MOUNT_GAS_SIPHON_II",
10250 /// "MOUNT_GAS_SIPHON_III",
10251 /// "MOUNT_SURVEYOR_I",
10252 /// "MOUNT_SURVEYOR_II",
10253 /// "MOUNT_SURVEYOR_III",
10254 /// "MOUNT_SENSOR_ARRAY_I",
10255 /// "MOUNT_SENSOR_ARRAY_II",
10256 /// "MOUNT_SENSOR_ARRAY_III",
10257 /// "MOUNT_MINING_LASER_I",
10258 /// "MOUNT_MINING_LASER_II",
10259 /// "MOUNT_MINING_LASER_III",
10260 /// "MOUNT_LASER_CANNON_I",
10261 /// "MOUNT_MISSILE_LAUNCHER_I",
10262 /// "MOUNT_TURRET_I"
10263 /// ]
10264 ///}
10265 /// ```
10266 /// </details>
10267 #[derive(
10268 ::serde::Deserialize,
10269 ::serde::Serialize,
10270 Clone,
10271 Copy,
10272 Debug,
10273 Eq,
10274 Hash,
10275 Ord,
10276 PartialEq,
10277 PartialOrd
10278 )]
10279 pub enum ShipMountSymbol {
10280 #[serde(rename = "MOUNT_GAS_SIPHON_I")]
10281 MountGasSiphonI,
10282 #[serde(rename = "MOUNT_GAS_SIPHON_II")]
10283 MountGasSiphonIi,
10284 #[serde(rename = "MOUNT_GAS_SIPHON_III")]
10285 MountGasSiphonIii,
10286 #[serde(rename = "MOUNT_SURVEYOR_I")]
10287 MountSurveyorI,
10288 #[serde(rename = "MOUNT_SURVEYOR_II")]
10289 MountSurveyorIi,
10290 #[serde(rename = "MOUNT_SURVEYOR_III")]
10291 MountSurveyorIii,
10292 #[serde(rename = "MOUNT_SENSOR_ARRAY_I")]
10293 MountSensorArrayI,
10294 #[serde(rename = "MOUNT_SENSOR_ARRAY_II")]
10295 MountSensorArrayIi,
10296 #[serde(rename = "MOUNT_SENSOR_ARRAY_III")]
10297 MountSensorArrayIii,
10298 #[serde(rename = "MOUNT_MINING_LASER_I")]
10299 MountMiningLaserI,
10300 #[serde(rename = "MOUNT_MINING_LASER_II")]
10301 MountMiningLaserIi,
10302 #[serde(rename = "MOUNT_MINING_LASER_III")]
10303 MountMiningLaserIii,
10304 #[serde(rename = "MOUNT_LASER_CANNON_I")]
10305 MountLaserCannonI,
10306 #[serde(rename = "MOUNT_MISSILE_LAUNCHER_I")]
10307 MountMissileLauncherI,
10308 #[serde(rename = "MOUNT_TURRET_I")]
10309 MountTurretI,
10310 }
10311 impl ::std::fmt::Display for ShipMountSymbol {
10312 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10313 match *self {
10314 Self::MountGasSiphonI => f.write_str("MOUNT_GAS_SIPHON_I"),
10315 Self::MountGasSiphonIi => f.write_str("MOUNT_GAS_SIPHON_II"),
10316 Self::MountGasSiphonIii => f.write_str("MOUNT_GAS_SIPHON_III"),
10317 Self::MountSurveyorI => f.write_str("MOUNT_SURVEYOR_I"),
10318 Self::MountSurveyorIi => f.write_str("MOUNT_SURVEYOR_II"),
10319 Self::MountSurveyorIii => f.write_str("MOUNT_SURVEYOR_III"),
10320 Self::MountSensorArrayI => f.write_str("MOUNT_SENSOR_ARRAY_I"),
10321 Self::MountSensorArrayIi => f.write_str("MOUNT_SENSOR_ARRAY_II"),
10322 Self::MountSensorArrayIii => f.write_str("MOUNT_SENSOR_ARRAY_III"),
10323 Self::MountMiningLaserI => f.write_str("MOUNT_MINING_LASER_I"),
10324 Self::MountMiningLaserIi => f.write_str("MOUNT_MINING_LASER_II"),
10325 Self::MountMiningLaserIii => f.write_str("MOUNT_MINING_LASER_III"),
10326 Self::MountLaserCannonI => f.write_str("MOUNT_LASER_CANNON_I"),
10327 Self::MountMissileLauncherI => f.write_str("MOUNT_MISSILE_LAUNCHER_I"),
10328 Self::MountTurretI => f.write_str("MOUNT_TURRET_I"),
10329 }
10330 }
10331 }
10332 impl ::std::str::FromStr for ShipMountSymbol {
10333 type Err = self::error::ConversionError;
10334 fn from_str(
10335 value: &str,
10336 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10337 match value {
10338 "MOUNT_GAS_SIPHON_I" => Ok(Self::MountGasSiphonI),
10339 "MOUNT_GAS_SIPHON_II" => Ok(Self::MountGasSiphonIi),
10340 "MOUNT_GAS_SIPHON_III" => Ok(Self::MountGasSiphonIii),
10341 "MOUNT_SURVEYOR_I" => Ok(Self::MountSurveyorI),
10342 "MOUNT_SURVEYOR_II" => Ok(Self::MountSurveyorIi),
10343 "MOUNT_SURVEYOR_III" => Ok(Self::MountSurveyorIii),
10344 "MOUNT_SENSOR_ARRAY_I" => Ok(Self::MountSensorArrayI),
10345 "MOUNT_SENSOR_ARRAY_II" => Ok(Self::MountSensorArrayIi),
10346 "MOUNT_SENSOR_ARRAY_III" => Ok(Self::MountSensorArrayIii),
10347 "MOUNT_MINING_LASER_I" => Ok(Self::MountMiningLaserI),
10348 "MOUNT_MINING_LASER_II" => Ok(Self::MountMiningLaserIi),
10349 "MOUNT_MINING_LASER_III" => Ok(Self::MountMiningLaserIii),
10350 "MOUNT_LASER_CANNON_I" => Ok(Self::MountLaserCannonI),
10351 "MOUNT_MISSILE_LAUNCHER_I" => Ok(Self::MountMissileLauncherI),
10352 "MOUNT_TURRET_I" => Ok(Self::MountTurretI),
10353 _ => Err("invalid value".into()),
10354 }
10355 }
10356 }
10357 impl ::std::convert::TryFrom<&str> for ShipMountSymbol {
10358 type Error = self::error::ConversionError;
10359 fn try_from(
10360 value: &str,
10361 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10362 value.parse()
10363 }
10364 }
10365 impl ::std::convert::TryFrom<&::std::string::String> for ShipMountSymbol {
10366 type Error = self::error::ConversionError;
10367 fn try_from(
10368 value: &::std::string::String,
10369 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10370 value.parse()
10371 }
10372 }
10373 impl ::std::convert::TryFrom<::std::string::String> for ShipMountSymbol {
10374 type Error = self::error::ConversionError;
10375 fn try_from(
10376 value: ::std::string::String,
10377 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10378 value.parse()
10379 }
10380 }
10381 ///The navigation information of the ship.
10382 ///
10383 /// <details><summary>JSON schema</summary>
10384 ///
10385 /// ```json
10386 ///{
10387 /// "description": "The navigation information of the ship.",
10388 /// "type": "object",
10389 /// "required": [
10390 /// "flightMode",
10391 /// "route",
10392 /// "status",
10393 /// "systemSymbol",
10394 /// "waypointSymbol"
10395 /// ],
10396 /// "properties": {
10397 /// "flightMode": {
10398 /// "$ref": "#/components/schemas/ShipNavFlightMode"
10399 /// },
10400 /// "route": {
10401 /// "$ref": "#/components/schemas/ShipNavRoute"
10402 /// },
10403 /// "status": {
10404 /// "$ref": "#/components/schemas/ShipNavStatus"
10405 /// },
10406 /// "systemSymbol": {
10407 /// "$ref": "#/components/schemas/SystemSymbol"
10408 /// },
10409 /// "waypointSymbol": {
10410 /// "$ref": "#/components/schemas/WaypointSymbol"
10411 /// }
10412 /// }
10413 ///}
10414 /// ```
10415 /// </details>
10416 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10417 pub struct ShipNav {
10418 #[serde(rename = "flightMode")]
10419 pub flight_mode: ShipNavFlightMode,
10420 pub route: ShipNavRoute,
10421 pub status: ShipNavStatus,
10422 #[serde(rename = "systemSymbol")]
10423 pub system_symbol: SystemSymbol,
10424 #[serde(rename = "waypointSymbol")]
10425 pub waypoint_symbol: WaypointSymbol,
10426 }
10427 ///The ship's set speed when traveling between waypoints or systems.
10428 ///
10429 /// <details><summary>JSON schema</summary>
10430 ///
10431 /// ```json
10432 ///{
10433 /// "description": "The ship's set speed when traveling between waypoints or systems.",
10434 /// "default": "CRUISE",
10435 /// "type": "string",
10436 /// "enum": [
10437 /// "DRIFT",
10438 /// "STEALTH",
10439 /// "CRUISE",
10440 /// "BURN"
10441 /// ]
10442 ///}
10443 /// ```
10444 /// </details>
10445 #[derive(
10446 ::serde::Deserialize,
10447 ::serde::Serialize,
10448 Clone,
10449 Copy,
10450 Debug,
10451 Eq,
10452 Hash,
10453 Ord,
10454 PartialEq,
10455 PartialOrd
10456 )]
10457 pub enum ShipNavFlightMode {
10458 #[serde(rename = "DRIFT")]
10459 Drift,
10460 #[serde(rename = "STEALTH")]
10461 Stealth,
10462 #[serde(rename = "CRUISE")]
10463 Cruise,
10464 #[serde(rename = "BURN")]
10465 Burn,
10466 }
10467 impl ::std::fmt::Display for ShipNavFlightMode {
10468 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10469 match *self {
10470 Self::Drift => f.write_str("DRIFT"),
10471 Self::Stealth => f.write_str("STEALTH"),
10472 Self::Cruise => f.write_str("CRUISE"),
10473 Self::Burn => f.write_str("BURN"),
10474 }
10475 }
10476 }
10477 impl ::std::str::FromStr for ShipNavFlightMode {
10478 type Err = self::error::ConversionError;
10479 fn from_str(
10480 value: &str,
10481 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10482 match value {
10483 "DRIFT" => Ok(Self::Drift),
10484 "STEALTH" => Ok(Self::Stealth),
10485 "CRUISE" => Ok(Self::Cruise),
10486 "BURN" => Ok(Self::Burn),
10487 _ => Err("invalid value".into()),
10488 }
10489 }
10490 }
10491 impl ::std::convert::TryFrom<&str> for ShipNavFlightMode {
10492 type Error = self::error::ConversionError;
10493 fn try_from(
10494 value: &str,
10495 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10496 value.parse()
10497 }
10498 }
10499 impl ::std::convert::TryFrom<&::std::string::String> for ShipNavFlightMode {
10500 type Error = self::error::ConversionError;
10501 fn try_from(
10502 value: &::std::string::String,
10503 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10504 value.parse()
10505 }
10506 }
10507 impl ::std::convert::TryFrom<::std::string::String> for ShipNavFlightMode {
10508 type Error = self::error::ConversionError;
10509 fn try_from(
10510 value: ::std::string::String,
10511 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10512 value.parse()
10513 }
10514 }
10515 impl ::std::default::Default for ShipNavFlightMode {
10516 fn default() -> Self {
10517 ShipNavFlightMode::Cruise
10518 }
10519 }
10520 ///The routing information for the ship's most recent transit or current location.
10521 ///
10522 /// <details><summary>JSON schema</summary>
10523 ///
10524 /// ```json
10525 ///{
10526 /// "description": "The routing information for the ship's most recent transit or current location.",
10527 /// "type": "object",
10528 /// "required": [
10529 /// "arrival",
10530 /// "departureTime",
10531 /// "destination",
10532 /// "origin"
10533 /// ],
10534 /// "properties": {
10535 /// "arrival": {
10536 /// "description": "The date time of the ship's arrival. If the ship is in-transit, this is the expected time of arrival.",
10537 /// "type": "string",
10538 /// "format": "date-time"
10539 /// },
10540 /// "departureTime": {
10541 /// "description": "The date time of the ship's departure.",
10542 /// "type": "string",
10543 /// "format": "date-time"
10544 /// },
10545 /// "destination": {
10546 /// "$ref": "#/components/schemas/ShipNavRouteWaypoint"
10547 /// },
10548 /// "origin": {
10549 /// "$ref": "#/components/schemas/ShipNavRouteWaypoint"
10550 /// }
10551 /// }
10552 ///}
10553 /// ```
10554 /// </details>
10555 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10556 pub struct ShipNavRoute {
10557 ///The date time of the ship's arrival. If the ship is in-transit, this is the expected time of arrival.
10558 pub arrival: ::chrono::DateTime<::chrono::offset::Utc>,
10559 ///The date time of the ship's departure.
10560 #[serde(rename = "departureTime")]
10561 pub departure_time: ::chrono::DateTime<::chrono::offset::Utc>,
10562 pub destination: ShipNavRouteWaypoint,
10563 pub origin: ShipNavRouteWaypoint,
10564 }
10565 ///The destination or departure of a ships nav route.
10566 ///
10567 /// <details><summary>JSON schema</summary>
10568 ///
10569 /// ```json
10570 ///{
10571 /// "description": "The destination or departure of a ships nav route.",
10572 /// "type": "object",
10573 /// "required": [
10574 /// "symbol",
10575 /// "systemSymbol",
10576 /// "type",
10577 /// "x",
10578 /// "y"
10579 /// ],
10580 /// "properties": {
10581 /// "symbol": {
10582 /// "$ref": "#/components/schemas/WaypointSymbol"
10583 /// },
10584 /// "systemSymbol": {
10585 /// "$ref": "#/components/schemas/SystemSymbol"
10586 /// },
10587 /// "type": {
10588 /// "$ref": "#/components/schemas/WaypointType"
10589 /// },
10590 /// "x": {
10591 /// "description": "Position in the universe in the x axis.",
10592 /// "type": "integer"
10593 /// },
10594 /// "y": {
10595 /// "description": "Position in the universe in the y axis.",
10596 /// "type": "integer"
10597 /// }
10598 /// }
10599 ///}
10600 /// ```
10601 /// </details>
10602 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10603 pub struct ShipNavRouteWaypoint {
10604 pub symbol: WaypointSymbol,
10605 #[serde(rename = "systemSymbol")]
10606 pub system_symbol: SystemSymbol,
10607 #[serde(rename = "type")]
10608 pub type_: WaypointType,
10609 ///Position in the universe in the x axis.
10610 pub x: i64,
10611 ///Position in the universe in the y axis.
10612 pub y: i64,
10613 }
10614 ///The current status of the ship
10615 ///
10616 /// <details><summary>JSON schema</summary>
10617 ///
10618 /// ```json
10619 ///{
10620 /// "description": "The current status of the ship",
10621 /// "type": "string",
10622 /// "enum": [
10623 /// "IN_TRANSIT",
10624 /// "IN_ORBIT",
10625 /// "DOCKED"
10626 /// ]
10627 ///}
10628 /// ```
10629 /// </details>
10630 #[derive(
10631 ::serde::Deserialize,
10632 ::serde::Serialize,
10633 Clone,
10634 Copy,
10635 Debug,
10636 Eq,
10637 Hash,
10638 Ord,
10639 PartialEq,
10640 PartialOrd
10641 )]
10642 pub enum ShipNavStatus {
10643 #[serde(rename = "IN_TRANSIT")]
10644 InTransit,
10645 #[serde(rename = "IN_ORBIT")]
10646 InOrbit,
10647 #[serde(rename = "DOCKED")]
10648 Docked,
10649 }
10650 impl ::std::fmt::Display for ShipNavStatus {
10651 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10652 match *self {
10653 Self::InTransit => f.write_str("IN_TRANSIT"),
10654 Self::InOrbit => f.write_str("IN_ORBIT"),
10655 Self::Docked => f.write_str("DOCKED"),
10656 }
10657 }
10658 }
10659 impl ::std::str::FromStr for ShipNavStatus {
10660 type Err = self::error::ConversionError;
10661 fn from_str(
10662 value: &str,
10663 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10664 match value {
10665 "IN_TRANSIT" => Ok(Self::InTransit),
10666 "IN_ORBIT" => Ok(Self::InOrbit),
10667 "DOCKED" => Ok(Self::Docked),
10668 _ => Err("invalid value".into()),
10669 }
10670 }
10671 }
10672 impl ::std::convert::TryFrom<&str> for ShipNavStatus {
10673 type Error = self::error::ConversionError;
10674 fn try_from(
10675 value: &str,
10676 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10677 value.parse()
10678 }
10679 }
10680 impl ::std::convert::TryFrom<&::std::string::String> for ShipNavStatus {
10681 type Error = self::error::ConversionError;
10682 fn try_from(
10683 value: &::std::string::String,
10684 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10685 value.parse()
10686 }
10687 }
10688 impl ::std::convert::TryFrom<::std::string::String> for ShipNavStatus {
10689 type Error = self::error::ConversionError;
10690 fn try_from(
10691 value: ::std::string::String,
10692 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10693 value.parse()
10694 }
10695 }
10696 ///The reactor of the ship. The reactor is responsible for powering the ship's systems and weapons.
10697 ///
10698 /// <details><summary>JSON schema</summary>
10699 ///
10700 /// ```json
10701 ///{
10702 /// "description": "The reactor of the ship. The reactor is responsible for powering the ship's systems and weapons.",
10703 /// "type": "object",
10704 /// "required": [
10705 /// "condition",
10706 /// "description",
10707 /// "integrity",
10708 /// "name",
10709 /// "powerOutput",
10710 /// "quality",
10711 /// "requirements",
10712 /// "symbol"
10713 /// ],
10714 /// "properties": {
10715 /// "condition": {
10716 /// "$ref": "#/components/schemas/ShipComponentCondition"
10717 /// },
10718 /// "description": {
10719 /// "description": "Description of the reactor.",
10720 /// "type": "string"
10721 /// },
10722 /// "integrity": {
10723 /// "$ref": "#/components/schemas/ShipComponentIntegrity"
10724 /// },
10725 /// "name": {
10726 /// "description": "Name of the reactor.",
10727 /// "type": "string"
10728 /// },
10729 /// "powerOutput": {
10730 /// "description": "The amount of power provided by this reactor. The more power a reactor provides to the ship, the lower the cooldown it gets when using a module or mount that taxes the ship's power.",
10731 /// "type": "integer",
10732 /// "minimum": 1.0
10733 /// },
10734 /// "quality": {
10735 /// "$ref": "#/components/schemas/ShipComponentQuality"
10736 /// },
10737 /// "requirements": {
10738 /// "$ref": "#/components/schemas/ShipRequirements"
10739 /// },
10740 /// "symbol": {
10741 /// "description": "Symbol of the reactor.",
10742 /// "type": "string",
10743 /// "enum": [
10744 /// "REACTOR_SOLAR_I",
10745 /// "REACTOR_FUSION_I",
10746 /// "REACTOR_FISSION_I",
10747 /// "REACTOR_CHEMICAL_I",
10748 /// "REACTOR_ANTIMATTER_I"
10749 /// ]
10750 /// }
10751 /// }
10752 ///}
10753 /// ```
10754 /// </details>
10755 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10756 pub struct ShipReactor {
10757 pub condition: ShipComponentCondition,
10758 ///Description of the reactor.
10759 pub description: ::std::string::String,
10760 pub integrity: ShipComponentIntegrity,
10761 ///Name of the reactor.
10762 pub name: ::std::string::String,
10763 ///The amount of power provided by this reactor. The more power a reactor provides to the ship, the lower the cooldown it gets when using a module or mount that taxes the ship's power.
10764 #[serde(rename = "powerOutput")]
10765 pub power_output: ::std::num::NonZeroU64,
10766 pub quality: ShipComponentQuality,
10767 pub requirements: ShipRequirements,
10768 ///Symbol of the reactor.
10769 pub symbol: ShipReactorSymbol,
10770 }
10771 ///Symbol of the reactor.
10772 ///
10773 /// <details><summary>JSON schema</summary>
10774 ///
10775 /// ```json
10776 ///{
10777 /// "description": "Symbol of the reactor.",
10778 /// "type": "string",
10779 /// "enum": [
10780 /// "REACTOR_SOLAR_I",
10781 /// "REACTOR_FUSION_I",
10782 /// "REACTOR_FISSION_I",
10783 /// "REACTOR_CHEMICAL_I",
10784 /// "REACTOR_ANTIMATTER_I"
10785 /// ]
10786 ///}
10787 /// ```
10788 /// </details>
10789 #[derive(
10790 ::serde::Deserialize,
10791 ::serde::Serialize,
10792 Clone,
10793 Copy,
10794 Debug,
10795 Eq,
10796 Hash,
10797 Ord,
10798 PartialEq,
10799 PartialOrd
10800 )]
10801 pub enum ShipReactorSymbol {
10802 #[serde(rename = "REACTOR_SOLAR_I")]
10803 ReactorSolarI,
10804 #[serde(rename = "REACTOR_FUSION_I")]
10805 ReactorFusionI,
10806 #[serde(rename = "REACTOR_FISSION_I")]
10807 ReactorFissionI,
10808 #[serde(rename = "REACTOR_CHEMICAL_I")]
10809 ReactorChemicalI,
10810 #[serde(rename = "REACTOR_ANTIMATTER_I")]
10811 ReactorAntimatterI,
10812 }
10813 impl ::std::fmt::Display for ShipReactorSymbol {
10814 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10815 match *self {
10816 Self::ReactorSolarI => f.write_str("REACTOR_SOLAR_I"),
10817 Self::ReactorFusionI => f.write_str("REACTOR_FUSION_I"),
10818 Self::ReactorFissionI => f.write_str("REACTOR_FISSION_I"),
10819 Self::ReactorChemicalI => f.write_str("REACTOR_CHEMICAL_I"),
10820 Self::ReactorAntimatterI => f.write_str("REACTOR_ANTIMATTER_I"),
10821 }
10822 }
10823 }
10824 impl ::std::str::FromStr for ShipReactorSymbol {
10825 type Err = self::error::ConversionError;
10826 fn from_str(
10827 value: &str,
10828 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10829 match value {
10830 "REACTOR_SOLAR_I" => Ok(Self::ReactorSolarI),
10831 "REACTOR_FUSION_I" => Ok(Self::ReactorFusionI),
10832 "REACTOR_FISSION_I" => Ok(Self::ReactorFissionI),
10833 "REACTOR_CHEMICAL_I" => Ok(Self::ReactorChemicalI),
10834 "REACTOR_ANTIMATTER_I" => Ok(Self::ReactorAntimatterI),
10835 _ => Err("invalid value".into()),
10836 }
10837 }
10838 }
10839 impl ::std::convert::TryFrom<&str> for ShipReactorSymbol {
10840 type Error = self::error::ConversionError;
10841 fn try_from(
10842 value: &str,
10843 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10844 value.parse()
10845 }
10846 }
10847 impl ::std::convert::TryFrom<&::std::string::String> for ShipReactorSymbol {
10848 type Error = self::error::ConversionError;
10849 fn try_from(
10850 value: &::std::string::String,
10851 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10852 value.parse()
10853 }
10854 }
10855 impl ::std::convert::TryFrom<::std::string::String> for ShipReactorSymbol {
10856 type Error = self::error::ConversionError;
10857 fn try_from(
10858 value: ::std::string::String,
10859 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10860 value.parse()
10861 }
10862 }
10863 ///The ship has successfully refined goods.
10864 ///
10865 /// <details><summary>JSON schema</summary>
10866 ///
10867 /// ```json
10868 ///{
10869 /// "title": "Ship Refine 201 Response",
10870 /// "description": "The ship has successfully refined goods.",
10871 /// "type": "object",
10872 /// "required": [
10873 /// "data"
10874 /// ],
10875 /// "properties": {
10876 /// "data": {
10877 /// "type": "object",
10878 /// "required": [
10879 /// "cargo",
10880 /// "consumed",
10881 /// "cooldown",
10882 /// "produced"
10883 /// ],
10884 /// "properties": {
10885 /// "cargo": {
10886 /// "$ref": "#/components/schemas/ShipCargo"
10887 /// },
10888 /// "consumed": {
10889 /// "description": "Goods that were consumed during this refining process.",
10890 /// "type": "array",
10891 /// "items": {
10892 /// "type": "object",
10893 /// "required": [
10894 /// "tradeSymbol",
10895 /// "units"
10896 /// ],
10897 /// "properties": {
10898 /// "tradeSymbol": {
10899 /// "description": "Symbol of the good.",
10900 /// "allOf": [
10901 /// {
10902 /// "$ref": "#/components/schemas/TradeSymbol"
10903 /// }
10904 /// ]
10905 /// },
10906 /// "units": {
10907 /// "description": "Amount of units of the good.",
10908 /// "type": "integer"
10909 /// }
10910 /// }
10911 /// }
10912 /// },
10913 /// "cooldown": {
10914 /// "$ref": "#/components/schemas/Cooldown"
10915 /// },
10916 /// "produced": {
10917 /// "description": "Goods that were produced by this refining process.",
10918 /// "type": "array",
10919 /// "items": {
10920 /// "type": "object",
10921 /// "required": [
10922 /// "tradeSymbol",
10923 /// "units"
10924 /// ],
10925 /// "properties": {
10926 /// "tradeSymbol": {
10927 /// "description": "Symbol of the good.",
10928 /// "allOf": [
10929 /// {
10930 /// "$ref": "#/components/schemas/TradeSymbol"
10931 /// }
10932 /// ]
10933 /// },
10934 /// "units": {
10935 /// "description": "Amount of units of the good.",
10936 /// "type": "integer"
10937 /// }
10938 /// }
10939 /// }
10940 /// }
10941 /// }
10942 /// }
10943 /// }
10944 ///}
10945 /// ```
10946 /// </details>
10947 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10948 pub struct ShipRefine201Response {
10949 pub data: ShipRefine201ResponseData,
10950 }
10951 ///`ShipRefine201ResponseData`
10952 ///
10953 /// <details><summary>JSON schema</summary>
10954 ///
10955 /// ```json
10956 ///{
10957 /// "type": "object",
10958 /// "required": [
10959 /// "cargo",
10960 /// "consumed",
10961 /// "cooldown",
10962 /// "produced"
10963 /// ],
10964 /// "properties": {
10965 /// "cargo": {
10966 /// "$ref": "#/components/schemas/ShipCargo"
10967 /// },
10968 /// "consumed": {
10969 /// "description": "Goods that were consumed during this refining process.",
10970 /// "type": "array",
10971 /// "items": {
10972 /// "type": "object",
10973 /// "required": [
10974 /// "tradeSymbol",
10975 /// "units"
10976 /// ],
10977 /// "properties": {
10978 /// "tradeSymbol": {
10979 /// "description": "Symbol of the good.",
10980 /// "allOf": [
10981 /// {
10982 /// "$ref": "#/components/schemas/TradeSymbol"
10983 /// }
10984 /// ]
10985 /// },
10986 /// "units": {
10987 /// "description": "Amount of units of the good.",
10988 /// "type": "integer"
10989 /// }
10990 /// }
10991 /// }
10992 /// },
10993 /// "cooldown": {
10994 /// "$ref": "#/components/schemas/Cooldown"
10995 /// },
10996 /// "produced": {
10997 /// "description": "Goods that were produced by this refining process.",
10998 /// "type": "array",
10999 /// "items": {
11000 /// "type": "object",
11001 /// "required": [
11002 /// "tradeSymbol",
11003 /// "units"
11004 /// ],
11005 /// "properties": {
11006 /// "tradeSymbol": {
11007 /// "description": "Symbol of the good.",
11008 /// "allOf": [
11009 /// {
11010 /// "$ref": "#/components/schemas/TradeSymbol"
11011 /// }
11012 /// ]
11013 /// },
11014 /// "units": {
11015 /// "description": "Amount of units of the good.",
11016 /// "type": "integer"
11017 /// }
11018 /// }
11019 /// }
11020 /// }
11021 /// }
11022 ///}
11023 /// ```
11024 /// </details>
11025 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11026 pub struct ShipRefine201ResponseData {
11027 pub cargo: ShipCargo,
11028 ///Goods that were consumed during this refining process.
11029 pub consumed: ::std::vec::Vec<ShipRefine201ResponseDataConsumedItem>,
11030 pub cooldown: Cooldown,
11031 ///Goods that were produced by this refining process.
11032 pub produced: ::std::vec::Vec<ShipRefine201ResponseDataProducedItem>,
11033 }
11034 ///`ShipRefine201ResponseDataConsumedItem`
11035 ///
11036 /// <details><summary>JSON schema</summary>
11037 ///
11038 /// ```json
11039 ///{
11040 /// "type": "object",
11041 /// "required": [
11042 /// "tradeSymbol",
11043 /// "units"
11044 /// ],
11045 /// "properties": {
11046 /// "tradeSymbol": {
11047 /// "description": "Symbol of the good.",
11048 /// "allOf": [
11049 /// {
11050 /// "$ref": "#/components/schemas/TradeSymbol"
11051 /// }
11052 /// ]
11053 /// },
11054 /// "units": {
11055 /// "description": "Amount of units of the good.",
11056 /// "type": "integer"
11057 /// }
11058 /// }
11059 ///}
11060 /// ```
11061 /// </details>
11062 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11063 pub struct ShipRefine201ResponseDataConsumedItem {
11064 ///Symbol of the good.
11065 #[serde(rename = "tradeSymbol")]
11066 pub trade_symbol: TradeSymbol,
11067 ///Amount of units of the good.
11068 pub units: i64,
11069 }
11070 ///`ShipRefine201ResponseDataProducedItem`
11071 ///
11072 /// <details><summary>JSON schema</summary>
11073 ///
11074 /// ```json
11075 ///{
11076 /// "type": "object",
11077 /// "required": [
11078 /// "tradeSymbol",
11079 /// "units"
11080 /// ],
11081 /// "properties": {
11082 /// "tradeSymbol": {
11083 /// "description": "Symbol of the good.",
11084 /// "allOf": [
11085 /// {
11086 /// "$ref": "#/components/schemas/TradeSymbol"
11087 /// }
11088 /// ]
11089 /// },
11090 /// "units": {
11091 /// "description": "Amount of units of the good.",
11092 /// "type": "integer"
11093 /// }
11094 /// }
11095 ///}
11096 /// ```
11097 /// </details>
11098 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11099 pub struct ShipRefine201ResponseDataProducedItem {
11100 ///Symbol of the good.
11101 #[serde(rename = "tradeSymbol")]
11102 pub trade_symbol: TradeSymbol,
11103 ///Amount of units of the good.
11104 pub units: i64,
11105 }
11106 ///`ShipRefineBody`
11107 ///
11108 /// <details><summary>JSON schema</summary>
11109 ///
11110 /// ```json
11111 ///{
11112 /// "type": "object",
11113 /// "required": [
11114 /// "produce"
11115 /// ],
11116 /// "properties": {
11117 /// "produce": {
11118 /// "description": "The type of good to produce out of the refining process.",
11119 /// "type": "string",
11120 /// "enum": [
11121 /// "IRON",
11122 /// "COPPER",
11123 /// "SILVER",
11124 /// "GOLD",
11125 /// "ALUMINUM",
11126 /// "PLATINUM",
11127 /// "URANITE",
11128 /// "MERITIUM",
11129 /// "FUEL"
11130 /// ]
11131 /// }
11132 /// }
11133 ///}
11134 /// ```
11135 /// </details>
11136 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11137 pub struct ShipRefineBody {
11138 ///The type of good to produce out of the refining process.
11139 pub produce: ShipRefineBodyProduce,
11140 }
11141 ///The type of good to produce out of the refining process.
11142 ///
11143 /// <details><summary>JSON schema</summary>
11144 ///
11145 /// ```json
11146 ///{
11147 /// "description": "The type of good to produce out of the refining process.",
11148 /// "type": "string",
11149 /// "enum": [
11150 /// "IRON",
11151 /// "COPPER",
11152 /// "SILVER",
11153 /// "GOLD",
11154 /// "ALUMINUM",
11155 /// "PLATINUM",
11156 /// "URANITE",
11157 /// "MERITIUM",
11158 /// "FUEL"
11159 /// ]
11160 ///}
11161 /// ```
11162 /// </details>
11163 #[derive(
11164 ::serde::Deserialize,
11165 ::serde::Serialize,
11166 Clone,
11167 Copy,
11168 Debug,
11169 Eq,
11170 Hash,
11171 Ord,
11172 PartialEq,
11173 PartialOrd
11174 )]
11175 pub enum ShipRefineBodyProduce {
11176 #[serde(rename = "IRON")]
11177 Iron,
11178 #[serde(rename = "COPPER")]
11179 Copper,
11180 #[serde(rename = "SILVER")]
11181 Silver,
11182 #[serde(rename = "GOLD")]
11183 Gold,
11184 #[serde(rename = "ALUMINUM")]
11185 Aluminum,
11186 #[serde(rename = "PLATINUM")]
11187 Platinum,
11188 #[serde(rename = "URANITE")]
11189 Uranite,
11190 #[serde(rename = "MERITIUM")]
11191 Meritium,
11192 #[serde(rename = "FUEL")]
11193 Fuel,
11194 }
11195 impl ::std::fmt::Display for ShipRefineBodyProduce {
11196 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11197 match *self {
11198 Self::Iron => f.write_str("IRON"),
11199 Self::Copper => f.write_str("COPPER"),
11200 Self::Silver => f.write_str("SILVER"),
11201 Self::Gold => f.write_str("GOLD"),
11202 Self::Aluminum => f.write_str("ALUMINUM"),
11203 Self::Platinum => f.write_str("PLATINUM"),
11204 Self::Uranite => f.write_str("URANITE"),
11205 Self::Meritium => f.write_str("MERITIUM"),
11206 Self::Fuel => f.write_str("FUEL"),
11207 }
11208 }
11209 }
11210 impl ::std::str::FromStr for ShipRefineBodyProduce {
11211 type Err = self::error::ConversionError;
11212 fn from_str(
11213 value: &str,
11214 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11215 match value {
11216 "IRON" => Ok(Self::Iron),
11217 "COPPER" => Ok(Self::Copper),
11218 "SILVER" => Ok(Self::Silver),
11219 "GOLD" => Ok(Self::Gold),
11220 "ALUMINUM" => Ok(Self::Aluminum),
11221 "PLATINUM" => Ok(Self::Platinum),
11222 "URANITE" => Ok(Self::Uranite),
11223 "MERITIUM" => Ok(Self::Meritium),
11224 "FUEL" => Ok(Self::Fuel),
11225 _ => Err("invalid value".into()),
11226 }
11227 }
11228 }
11229 impl ::std::convert::TryFrom<&str> for ShipRefineBodyProduce {
11230 type Error = self::error::ConversionError;
11231 fn try_from(
11232 value: &str,
11233 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11234 value.parse()
11235 }
11236 }
11237 impl ::std::convert::TryFrom<&::std::string::String> for ShipRefineBodyProduce {
11238 type Error = self::error::ConversionError;
11239 fn try_from(
11240 value: &::std::string::String,
11241 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11242 value.parse()
11243 }
11244 }
11245 impl ::std::convert::TryFrom<::std::string::String> for ShipRefineBodyProduce {
11246 type Error = self::error::ConversionError;
11247 fn try_from(
11248 value: ::std::string::String,
11249 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11250 value.parse()
11251 }
11252 }
11253 ///The public registration information of the ship
11254 ///
11255 /// <details><summary>JSON schema</summary>
11256 ///
11257 /// ```json
11258 ///{
11259 /// "description": "The public registration information of the ship",
11260 /// "type": "object",
11261 /// "required": [
11262 /// "factionSymbol",
11263 /// "name",
11264 /// "role"
11265 /// ],
11266 /// "properties": {
11267 /// "factionSymbol": {
11268 /// "description": "The symbol of the faction the ship is registered with",
11269 /// "type": "string",
11270 /// "minLength": 1
11271 /// },
11272 /// "name": {
11273 /// "description": "The agent's registered name of the ship",
11274 /// "type": "string",
11275 /// "minLength": 1
11276 /// },
11277 /// "role": {
11278 /// "$ref": "#/components/schemas/ShipRole"
11279 /// }
11280 /// }
11281 ///}
11282 /// ```
11283 /// </details>
11284 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11285 pub struct ShipRegistration {
11286 ///The symbol of the faction the ship is registered with
11287 #[serde(rename = "factionSymbol")]
11288 pub faction_symbol: ShipRegistrationFactionSymbol,
11289 ///The agent's registered name of the ship
11290 pub name: ShipRegistrationName,
11291 pub role: ShipRole,
11292 }
11293 ///The symbol of the faction the ship is registered with
11294 ///
11295 /// <details><summary>JSON schema</summary>
11296 ///
11297 /// ```json
11298 ///{
11299 /// "description": "The symbol of the faction the ship is registered with",
11300 /// "type": "string",
11301 /// "minLength": 1
11302 ///}
11303 /// ```
11304 /// </details>
11305 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11306 #[serde(transparent)]
11307 pub struct ShipRegistrationFactionSymbol(::std::string::String);
11308 impl ::std::ops::Deref for ShipRegistrationFactionSymbol {
11309 type Target = ::std::string::String;
11310 fn deref(&self) -> &::std::string::String {
11311 &self.0
11312 }
11313 }
11314 impl ::std::convert::From<ShipRegistrationFactionSymbol> for ::std::string::String {
11315 fn from(value: ShipRegistrationFactionSymbol) -> Self {
11316 value.0
11317 }
11318 }
11319 impl ::std::str::FromStr for ShipRegistrationFactionSymbol {
11320 type Err = self::error::ConversionError;
11321 fn from_str(
11322 value: &str,
11323 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11324 if value.chars().count() < 1usize {
11325 return Err("shorter than 1 characters".into());
11326 }
11327 Ok(Self(value.to_string()))
11328 }
11329 }
11330 impl ::std::convert::TryFrom<&str> for ShipRegistrationFactionSymbol {
11331 type Error = self::error::ConversionError;
11332 fn try_from(
11333 value: &str,
11334 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11335 value.parse()
11336 }
11337 }
11338 impl ::std::convert::TryFrom<&::std::string::String>
11339 for ShipRegistrationFactionSymbol {
11340 type Error = self::error::ConversionError;
11341 fn try_from(
11342 value: &::std::string::String,
11343 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11344 value.parse()
11345 }
11346 }
11347 impl ::std::convert::TryFrom<::std::string::String>
11348 for ShipRegistrationFactionSymbol {
11349 type Error = self::error::ConversionError;
11350 fn try_from(
11351 value: ::std::string::String,
11352 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11353 value.parse()
11354 }
11355 }
11356 impl<'de> ::serde::Deserialize<'de> for ShipRegistrationFactionSymbol {
11357 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
11358 where
11359 D: ::serde::Deserializer<'de>,
11360 {
11361 ::std::string::String::deserialize(deserializer)?
11362 .parse()
11363 .map_err(|e: self::error::ConversionError| {
11364 <D::Error as ::serde::de::Error>::custom(e.to_string())
11365 })
11366 }
11367 }
11368 ///The agent's registered name of the ship
11369 ///
11370 /// <details><summary>JSON schema</summary>
11371 ///
11372 /// ```json
11373 ///{
11374 /// "description": "The agent's registered name of the ship",
11375 /// "type": "string",
11376 /// "minLength": 1
11377 ///}
11378 /// ```
11379 /// </details>
11380 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11381 #[serde(transparent)]
11382 pub struct ShipRegistrationName(::std::string::String);
11383 impl ::std::ops::Deref for ShipRegistrationName {
11384 type Target = ::std::string::String;
11385 fn deref(&self) -> &::std::string::String {
11386 &self.0
11387 }
11388 }
11389 impl ::std::convert::From<ShipRegistrationName> for ::std::string::String {
11390 fn from(value: ShipRegistrationName) -> Self {
11391 value.0
11392 }
11393 }
11394 impl ::std::str::FromStr for ShipRegistrationName {
11395 type Err = self::error::ConversionError;
11396 fn from_str(
11397 value: &str,
11398 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11399 if value.chars().count() < 1usize {
11400 return Err("shorter than 1 characters".into());
11401 }
11402 Ok(Self(value.to_string()))
11403 }
11404 }
11405 impl ::std::convert::TryFrom<&str> for ShipRegistrationName {
11406 type Error = self::error::ConversionError;
11407 fn try_from(
11408 value: &str,
11409 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11410 value.parse()
11411 }
11412 }
11413 impl ::std::convert::TryFrom<&::std::string::String> for ShipRegistrationName {
11414 type Error = self::error::ConversionError;
11415 fn try_from(
11416 value: &::std::string::String,
11417 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11418 value.parse()
11419 }
11420 }
11421 impl ::std::convert::TryFrom<::std::string::String> for ShipRegistrationName {
11422 type Error = self::error::ConversionError;
11423 fn try_from(
11424 value: ::std::string::String,
11425 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11426 value.parse()
11427 }
11428 }
11429 impl<'de> ::serde::Deserialize<'de> for ShipRegistrationName {
11430 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
11431 where
11432 D: ::serde::Deserializer<'de>,
11433 {
11434 ::std::string::String::deserialize(deserializer)?
11435 .parse()
11436 .map_err(|e: self::error::ConversionError| {
11437 <D::Error as ::serde::de::Error>::custom(e.to_string())
11438 })
11439 }
11440 }
11441 ///The requirements for installation on a ship
11442 ///
11443 /// <details><summary>JSON schema</summary>
11444 ///
11445 /// ```json
11446 ///{
11447 /// "description": "The requirements for installation on a ship",
11448 /// "type": "object",
11449 /// "properties": {
11450 /// "crew": {
11451 /// "description": "The number of crew required for operation.",
11452 /// "type": "integer"
11453 /// },
11454 /// "power": {
11455 /// "description": "The amount of power required from the reactor.",
11456 /// "type": "integer"
11457 /// },
11458 /// "slots": {
11459 /// "description": "The number of module slots required for installation.",
11460 /// "type": "integer"
11461 /// }
11462 /// }
11463 ///}
11464 /// ```
11465 /// </details>
11466 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11467 pub struct ShipRequirements {
11468 ///The number of crew required for operation.
11469 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11470 pub crew: ::std::option::Option<i64>,
11471 ///The amount of power required from the reactor.
11472 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11473 pub power: ::std::option::Option<i64>,
11474 ///The number of module slots required for installation.
11475 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11476 pub slots: ::std::option::Option<i64>,
11477 }
11478 impl ::std::default::Default for ShipRequirements {
11479 fn default() -> Self {
11480 Self {
11481 crew: Default::default(),
11482 power: Default::default(),
11483 slots: Default::default(),
11484 }
11485 }
11486 }
11487 ///The registered role of the ship
11488 ///
11489 /// <details><summary>JSON schema</summary>
11490 ///
11491 /// ```json
11492 ///{
11493 /// "description": "The registered role of the ship",
11494 /// "type": "string",
11495 /// "enum": [
11496 /// "FABRICATOR",
11497 /// "HARVESTER",
11498 /// "HAULER",
11499 /// "INTERCEPTOR",
11500 /// "EXCAVATOR",
11501 /// "TRANSPORT",
11502 /// "REPAIR",
11503 /// "SURVEYOR",
11504 /// "COMMAND",
11505 /// "CARRIER",
11506 /// "PATROL",
11507 /// "SATELLITE",
11508 /// "EXPLORER",
11509 /// "REFINERY"
11510 /// ]
11511 ///}
11512 /// ```
11513 /// </details>
11514 #[derive(
11515 ::serde::Deserialize,
11516 ::serde::Serialize,
11517 Clone,
11518 Copy,
11519 Debug,
11520 Eq,
11521 Hash,
11522 Ord,
11523 PartialEq,
11524 PartialOrd
11525 )]
11526 pub enum ShipRole {
11527 #[serde(rename = "FABRICATOR")]
11528 Fabricator,
11529 #[serde(rename = "HARVESTER")]
11530 Harvester,
11531 #[serde(rename = "HAULER")]
11532 Hauler,
11533 #[serde(rename = "INTERCEPTOR")]
11534 Interceptor,
11535 #[serde(rename = "EXCAVATOR")]
11536 Excavator,
11537 #[serde(rename = "TRANSPORT")]
11538 Transport,
11539 #[serde(rename = "REPAIR")]
11540 Repair,
11541 #[serde(rename = "SURVEYOR")]
11542 Surveyor,
11543 #[serde(rename = "COMMAND")]
11544 Command,
11545 #[serde(rename = "CARRIER")]
11546 Carrier,
11547 #[serde(rename = "PATROL")]
11548 Patrol,
11549 #[serde(rename = "SATELLITE")]
11550 Satellite,
11551 #[serde(rename = "EXPLORER")]
11552 Explorer,
11553 #[serde(rename = "REFINERY")]
11554 Refinery,
11555 }
11556 impl ::std::fmt::Display for ShipRole {
11557 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11558 match *self {
11559 Self::Fabricator => f.write_str("FABRICATOR"),
11560 Self::Harvester => f.write_str("HARVESTER"),
11561 Self::Hauler => f.write_str("HAULER"),
11562 Self::Interceptor => f.write_str("INTERCEPTOR"),
11563 Self::Excavator => f.write_str("EXCAVATOR"),
11564 Self::Transport => f.write_str("TRANSPORT"),
11565 Self::Repair => f.write_str("REPAIR"),
11566 Self::Surveyor => f.write_str("SURVEYOR"),
11567 Self::Command => f.write_str("COMMAND"),
11568 Self::Carrier => f.write_str("CARRIER"),
11569 Self::Patrol => f.write_str("PATROL"),
11570 Self::Satellite => f.write_str("SATELLITE"),
11571 Self::Explorer => f.write_str("EXPLORER"),
11572 Self::Refinery => f.write_str("REFINERY"),
11573 }
11574 }
11575 }
11576 impl ::std::str::FromStr for ShipRole {
11577 type Err = self::error::ConversionError;
11578 fn from_str(
11579 value: &str,
11580 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11581 match value {
11582 "FABRICATOR" => Ok(Self::Fabricator),
11583 "HARVESTER" => Ok(Self::Harvester),
11584 "HAULER" => Ok(Self::Hauler),
11585 "INTERCEPTOR" => Ok(Self::Interceptor),
11586 "EXCAVATOR" => Ok(Self::Excavator),
11587 "TRANSPORT" => Ok(Self::Transport),
11588 "REPAIR" => Ok(Self::Repair),
11589 "SURVEYOR" => Ok(Self::Surveyor),
11590 "COMMAND" => Ok(Self::Command),
11591 "CARRIER" => Ok(Self::Carrier),
11592 "PATROL" => Ok(Self::Patrol),
11593 "SATELLITE" => Ok(Self::Satellite),
11594 "EXPLORER" => Ok(Self::Explorer),
11595 "REFINERY" => Ok(Self::Refinery),
11596 _ => Err("invalid value".into()),
11597 }
11598 }
11599 }
11600 impl ::std::convert::TryFrom<&str> for ShipRole {
11601 type Error = self::error::ConversionError;
11602 fn try_from(
11603 value: &str,
11604 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11605 value.parse()
11606 }
11607 }
11608 impl ::std::convert::TryFrom<&::std::string::String> for ShipRole {
11609 type Error = self::error::ConversionError;
11610 fn try_from(
11611 value: &::std::string::String,
11612 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11613 value.parse()
11614 }
11615 }
11616 impl ::std::convert::TryFrom<::std::string::String> for ShipRole {
11617 type Error = self::error::ConversionError;
11618 fn try_from(
11619 value: ::std::string::String,
11620 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11621 value.parse()
11622 }
11623 }
11624 ///Type of ship
11625 ///
11626 /// <details><summary>JSON schema</summary>
11627 ///
11628 /// ```json
11629 ///{
11630 /// "description": "Type of ship",
11631 /// "type": "string",
11632 /// "enum": [
11633 /// "SHIP_PROBE",
11634 /// "SHIP_MINING_DRONE",
11635 /// "SHIP_SIPHON_DRONE",
11636 /// "SHIP_INTERCEPTOR",
11637 /// "SHIP_LIGHT_HAULER",
11638 /// "SHIP_COMMAND_FRIGATE",
11639 /// "SHIP_EXPLORER",
11640 /// "SHIP_HEAVY_FREIGHTER",
11641 /// "SHIP_LIGHT_SHUTTLE",
11642 /// "SHIP_ORE_HOUND",
11643 /// "SHIP_REFINING_FREIGHTER",
11644 /// "SHIP_SURVEYOR",
11645 /// "SHIP_BULK_FREIGHTER"
11646 /// ]
11647 ///}
11648 /// ```
11649 /// </details>
11650 #[derive(
11651 ::serde::Deserialize,
11652 ::serde::Serialize,
11653 Clone,
11654 Copy,
11655 Debug,
11656 Eq,
11657 Hash,
11658 Ord,
11659 PartialEq,
11660 PartialOrd
11661 )]
11662 pub enum ShipType {
11663 #[serde(rename = "SHIP_PROBE")]
11664 ShipProbe,
11665 #[serde(rename = "SHIP_MINING_DRONE")]
11666 ShipMiningDrone,
11667 #[serde(rename = "SHIP_SIPHON_DRONE")]
11668 ShipSiphonDrone,
11669 #[serde(rename = "SHIP_INTERCEPTOR")]
11670 ShipInterceptor,
11671 #[serde(rename = "SHIP_LIGHT_HAULER")]
11672 ShipLightHauler,
11673 #[serde(rename = "SHIP_COMMAND_FRIGATE")]
11674 ShipCommandFrigate,
11675 #[serde(rename = "SHIP_EXPLORER")]
11676 ShipExplorer,
11677 #[serde(rename = "SHIP_HEAVY_FREIGHTER")]
11678 ShipHeavyFreighter,
11679 #[serde(rename = "SHIP_LIGHT_SHUTTLE")]
11680 ShipLightShuttle,
11681 #[serde(rename = "SHIP_ORE_HOUND")]
11682 ShipOreHound,
11683 #[serde(rename = "SHIP_REFINING_FREIGHTER")]
11684 ShipRefiningFreighter,
11685 #[serde(rename = "SHIP_SURVEYOR")]
11686 ShipSurveyor,
11687 #[serde(rename = "SHIP_BULK_FREIGHTER")]
11688 ShipBulkFreighter,
11689 }
11690 impl ::std::fmt::Display for ShipType {
11691 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11692 match *self {
11693 Self::ShipProbe => f.write_str("SHIP_PROBE"),
11694 Self::ShipMiningDrone => f.write_str("SHIP_MINING_DRONE"),
11695 Self::ShipSiphonDrone => f.write_str("SHIP_SIPHON_DRONE"),
11696 Self::ShipInterceptor => f.write_str("SHIP_INTERCEPTOR"),
11697 Self::ShipLightHauler => f.write_str("SHIP_LIGHT_HAULER"),
11698 Self::ShipCommandFrigate => f.write_str("SHIP_COMMAND_FRIGATE"),
11699 Self::ShipExplorer => f.write_str("SHIP_EXPLORER"),
11700 Self::ShipHeavyFreighter => f.write_str("SHIP_HEAVY_FREIGHTER"),
11701 Self::ShipLightShuttle => f.write_str("SHIP_LIGHT_SHUTTLE"),
11702 Self::ShipOreHound => f.write_str("SHIP_ORE_HOUND"),
11703 Self::ShipRefiningFreighter => f.write_str("SHIP_REFINING_FREIGHTER"),
11704 Self::ShipSurveyor => f.write_str("SHIP_SURVEYOR"),
11705 Self::ShipBulkFreighter => f.write_str("SHIP_BULK_FREIGHTER"),
11706 }
11707 }
11708 }
11709 impl ::std::str::FromStr for ShipType {
11710 type Err = self::error::ConversionError;
11711 fn from_str(
11712 value: &str,
11713 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11714 match value {
11715 "SHIP_PROBE" => Ok(Self::ShipProbe),
11716 "SHIP_MINING_DRONE" => Ok(Self::ShipMiningDrone),
11717 "SHIP_SIPHON_DRONE" => Ok(Self::ShipSiphonDrone),
11718 "SHIP_INTERCEPTOR" => Ok(Self::ShipInterceptor),
11719 "SHIP_LIGHT_HAULER" => Ok(Self::ShipLightHauler),
11720 "SHIP_COMMAND_FRIGATE" => Ok(Self::ShipCommandFrigate),
11721 "SHIP_EXPLORER" => Ok(Self::ShipExplorer),
11722 "SHIP_HEAVY_FREIGHTER" => Ok(Self::ShipHeavyFreighter),
11723 "SHIP_LIGHT_SHUTTLE" => Ok(Self::ShipLightShuttle),
11724 "SHIP_ORE_HOUND" => Ok(Self::ShipOreHound),
11725 "SHIP_REFINING_FREIGHTER" => Ok(Self::ShipRefiningFreighter),
11726 "SHIP_SURVEYOR" => Ok(Self::ShipSurveyor),
11727 "SHIP_BULK_FREIGHTER" => Ok(Self::ShipBulkFreighter),
11728 _ => Err("invalid value".into()),
11729 }
11730 }
11731 }
11732 impl ::std::convert::TryFrom<&str> for ShipType {
11733 type Error = self::error::ConversionError;
11734 fn try_from(
11735 value: &str,
11736 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11737 value.parse()
11738 }
11739 }
11740 impl ::std::convert::TryFrom<&::std::string::String> for ShipType {
11741 type Error = self::error::ConversionError;
11742 fn try_from(
11743 value: &::std::string::String,
11744 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11745 value.parse()
11746 }
11747 }
11748 impl ::std::convert::TryFrom<::std::string::String> for ShipType {
11749 type Error = self::error::ConversionError;
11750 fn try_from(
11751 value: ::std::string::String,
11752 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11753 value.parse()
11754 }
11755 }
11756 ///Shipyard details.
11757 ///
11758 /// <details><summary>JSON schema</summary>
11759 ///
11760 /// ```json
11761 ///{
11762 /// "description": "Shipyard details.",
11763 /// "type": "object",
11764 /// "required": [
11765 /// "modificationsFee",
11766 /// "shipTypes",
11767 /// "symbol"
11768 /// ],
11769 /// "properties": {
11770 /// "modificationsFee": {
11771 /// "description": "The fee to modify a ship at this shipyard. This includes installing or removing modules and mounts on a ship. In the case of mounts, the fee is a flat rate per mount. In the case of modules, the fee is per slot the module occupies.",
11772 /// "type": "integer"
11773 /// },
11774 /// "shipTypes": {
11775 /// "description": "The list of ship types available for purchase at this shipyard.",
11776 /// "type": "array",
11777 /// "items": {
11778 /// "type": "object",
11779 /// "required": [
11780 /// "type"
11781 /// ],
11782 /// "properties": {
11783 /// "type": {
11784 /// "$ref": "#/components/schemas/ShipType"
11785 /// }
11786 /// }
11787 /// }
11788 /// },
11789 /// "ships": {
11790 /// "description": "The ships that are currently available for purchase at the shipyard.",
11791 /// "type": "array",
11792 /// "items": {
11793 /// "$ref": "#/components/schemas/ShipyardShip"
11794 /// }
11795 /// },
11796 /// "symbol": {
11797 /// "description": "The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.",
11798 /// "type": "string",
11799 /// "minLength": 1
11800 /// },
11801 /// "transactions": {
11802 /// "description": "The list of recent transactions at this shipyard.",
11803 /// "type": "array",
11804 /// "items": {
11805 /// "$ref": "#/components/schemas/ShipyardTransaction"
11806 /// }
11807 /// }
11808 /// }
11809 ///}
11810 /// ```
11811 /// </details>
11812 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11813 pub struct Shipyard {
11814 ///The fee to modify a ship at this shipyard. This includes installing or removing modules and mounts on a ship. In the case of mounts, the fee is a flat rate per mount. In the case of modules, the fee is per slot the module occupies.
11815 #[serde(rename = "modificationsFee")]
11816 pub modifications_fee: i64,
11817 ///The list of ship types available for purchase at this shipyard.
11818 #[serde(rename = "shipTypes")]
11819 pub ship_types: ::std::vec::Vec<ShipyardShipTypesItem>,
11820 ///The ships that are currently available for purchase at the shipyard.
11821 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11822 pub ships: ::std::vec::Vec<ShipyardShip>,
11823 ///The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.
11824 pub symbol: ShipyardSymbol,
11825 ///The list of recent transactions at this shipyard.
11826 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11827 pub transactions: ::std::vec::Vec<ShipyardTransaction>,
11828 }
11829 ///Ship details available at a shipyard.
11830 ///
11831 /// <details><summary>JSON schema</summary>
11832 ///
11833 /// ```json
11834 ///{
11835 /// "description": "Ship details available at a shipyard.",
11836 /// "type": "object",
11837 /// "required": [
11838 /// "crew",
11839 /// "description",
11840 /// "engine",
11841 /// "frame",
11842 /// "modules",
11843 /// "mounts",
11844 /// "name",
11845 /// "purchasePrice",
11846 /// "reactor",
11847 /// "supply",
11848 /// "type"
11849 /// ],
11850 /// "properties": {
11851 /// "activity": {
11852 /// "$ref": "#/components/schemas/ActivityLevel"
11853 /// },
11854 /// "crew": {
11855 /// "type": "object",
11856 /// "required": [
11857 /// "capacity",
11858 /// "required"
11859 /// ],
11860 /// "properties": {
11861 /// "capacity": {
11862 /// "description": "The maximum number of crew members the ship can support.",
11863 /// "type": "integer"
11864 /// },
11865 /// "required": {
11866 /// "description": "The minimum number of crew members required to maintain the ship.",
11867 /// "type": "integer"
11868 /// }
11869 /// }
11870 /// },
11871 /// "description": {
11872 /// "description": "Description of the ship.",
11873 /// "type": "string"
11874 /// },
11875 /// "engine": {
11876 /// "$ref": "#/components/schemas/ShipEngine"
11877 /// },
11878 /// "frame": {
11879 /// "$ref": "#/components/schemas/ShipFrame"
11880 /// },
11881 /// "modules": {
11882 /// "description": "Modules installed in this ship.",
11883 /// "type": "array",
11884 /// "items": {
11885 /// "$ref": "#/components/schemas/ShipModule"
11886 /// }
11887 /// },
11888 /// "mounts": {
11889 /// "description": "Mounts installed in this ship.",
11890 /// "type": "array",
11891 /// "items": {
11892 /// "$ref": "#/components/schemas/ShipMount"
11893 /// }
11894 /// },
11895 /// "name": {
11896 /// "description": "Name of the ship.",
11897 /// "type": "string"
11898 /// },
11899 /// "purchasePrice": {
11900 /// "description": "The purchase price of the ship.",
11901 /// "type": "integer"
11902 /// },
11903 /// "reactor": {
11904 /// "$ref": "#/components/schemas/ShipReactor"
11905 /// },
11906 /// "supply": {
11907 /// "$ref": "#/components/schemas/SupplyLevel"
11908 /// },
11909 /// "type": {
11910 /// "$ref": "#/components/schemas/ShipType"
11911 /// }
11912 /// }
11913 ///}
11914 /// ```
11915 /// </details>
11916 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11917 pub struct ShipyardShip {
11918 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11919 pub activity: ::std::option::Option<ActivityLevel>,
11920 pub crew: ShipyardShipCrew,
11921 ///Description of the ship.
11922 pub description: ::std::string::String,
11923 pub engine: ShipEngine,
11924 pub frame: ShipFrame,
11925 ///Modules installed in this ship.
11926 pub modules: ::std::vec::Vec<ShipModule>,
11927 ///Mounts installed in this ship.
11928 pub mounts: ::std::vec::Vec<ShipMount>,
11929 ///Name of the ship.
11930 pub name: ::std::string::String,
11931 ///The purchase price of the ship.
11932 #[serde(rename = "purchasePrice")]
11933 pub purchase_price: i64,
11934 pub reactor: ShipReactor,
11935 pub supply: SupplyLevel,
11936 #[serde(rename = "type")]
11937 pub type_: ShipType,
11938 }
11939 ///`ShipyardShipCrew`
11940 ///
11941 /// <details><summary>JSON schema</summary>
11942 ///
11943 /// ```json
11944 ///{
11945 /// "type": "object",
11946 /// "required": [
11947 /// "capacity",
11948 /// "required"
11949 /// ],
11950 /// "properties": {
11951 /// "capacity": {
11952 /// "description": "The maximum number of crew members the ship can support.",
11953 /// "type": "integer"
11954 /// },
11955 /// "required": {
11956 /// "description": "The minimum number of crew members required to maintain the ship.",
11957 /// "type": "integer"
11958 /// }
11959 /// }
11960 ///}
11961 /// ```
11962 /// </details>
11963 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11964 pub struct ShipyardShipCrew {
11965 ///The maximum number of crew members the ship can support.
11966 pub capacity: i64,
11967 ///The minimum number of crew members required to maintain the ship.
11968 pub required: i64,
11969 }
11970 ///`ShipyardShipTypesItem`
11971 ///
11972 /// <details><summary>JSON schema</summary>
11973 ///
11974 /// ```json
11975 ///{
11976 /// "type": "object",
11977 /// "required": [
11978 /// "type"
11979 /// ],
11980 /// "properties": {
11981 /// "type": {
11982 /// "$ref": "#/components/schemas/ShipType"
11983 /// }
11984 /// }
11985 ///}
11986 /// ```
11987 /// </details>
11988 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11989 pub struct ShipyardShipTypesItem {
11990 #[serde(rename = "type")]
11991 pub type_: ShipType,
11992 }
11993 ///The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.
11994 ///
11995 /// <details><summary>JSON schema</summary>
11996 ///
11997 /// ```json
11998 ///{
11999 /// "description": "The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.",
12000 /// "type": "string",
12001 /// "minLength": 1
12002 ///}
12003 /// ```
12004 /// </details>
12005 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12006 #[serde(transparent)]
12007 pub struct ShipyardSymbol(::std::string::String);
12008 impl ::std::ops::Deref for ShipyardSymbol {
12009 type Target = ::std::string::String;
12010 fn deref(&self) -> &::std::string::String {
12011 &self.0
12012 }
12013 }
12014 impl ::std::convert::From<ShipyardSymbol> for ::std::string::String {
12015 fn from(value: ShipyardSymbol) -> Self {
12016 value.0
12017 }
12018 }
12019 impl ::std::str::FromStr for ShipyardSymbol {
12020 type Err = self::error::ConversionError;
12021 fn from_str(
12022 value: &str,
12023 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12024 if value.chars().count() < 1usize {
12025 return Err("shorter than 1 characters".into());
12026 }
12027 Ok(Self(value.to_string()))
12028 }
12029 }
12030 impl ::std::convert::TryFrom<&str> for ShipyardSymbol {
12031 type Error = self::error::ConversionError;
12032 fn try_from(
12033 value: &str,
12034 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12035 value.parse()
12036 }
12037 }
12038 impl ::std::convert::TryFrom<&::std::string::String> for ShipyardSymbol {
12039 type Error = self::error::ConversionError;
12040 fn try_from(
12041 value: &::std::string::String,
12042 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12043 value.parse()
12044 }
12045 }
12046 impl ::std::convert::TryFrom<::std::string::String> for ShipyardSymbol {
12047 type Error = self::error::ConversionError;
12048 fn try_from(
12049 value: ::std::string::String,
12050 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12051 value.parse()
12052 }
12053 }
12054 impl<'de> ::serde::Deserialize<'de> for ShipyardSymbol {
12055 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12056 where
12057 D: ::serde::Deserializer<'de>,
12058 {
12059 ::std::string::String::deserialize(deserializer)?
12060 .parse()
12061 .map_err(|e: self::error::ConversionError| {
12062 <D::Error as ::serde::de::Error>::custom(e.to_string())
12063 })
12064 }
12065 }
12066 ///Results of a transaction with a shipyard.
12067 ///
12068 /// <details><summary>JSON schema</summary>
12069 ///
12070 /// ```json
12071 ///{
12072 /// "description": "Results of a transaction with a shipyard.",
12073 /// "type": "object",
12074 /// "required": [
12075 /// "agentSymbol",
12076 /// "price",
12077 /// "shipSymbol",
12078 /// "shipType",
12079 /// "timestamp",
12080 /// "waypointSymbol"
12081 /// ],
12082 /// "properties": {
12083 /// "agentSymbol": {
12084 /// "description": "The symbol of the agent that made the transaction.",
12085 /// "type": "string"
12086 /// },
12087 /// "price": {
12088 /// "description": "The price of the transaction.",
12089 /// "type": "integer",
12090 /// "minimum": 0.0
12091 /// },
12092 /// "shipSymbol": {
12093 /// "description": "The symbol of the ship type (e.g. SHIP_MINING_DRONE) that was the subject of the transaction. Contrary to what the name implies, this is NOT the symbol of the ship that was purchased.",
12094 /// "deprecated": true,
12095 /// "type": "string"
12096 /// },
12097 /// "shipType": {
12098 /// "description": "The symbol of the ship type (e.g. SHIP_MINING_DRONE) that was the subject of the transaction.",
12099 /// "type": "string"
12100 /// },
12101 /// "timestamp": {
12102 /// "description": "The timestamp of the transaction.",
12103 /// "type": "string",
12104 /// "format": "date-time"
12105 /// },
12106 /// "waypointSymbol": {
12107 /// "$ref": "#/components/schemas/WaypointSymbol"
12108 /// }
12109 /// }
12110 ///}
12111 /// ```
12112 /// </details>
12113 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12114 pub struct ShipyardTransaction {
12115 ///The symbol of the agent that made the transaction.
12116 #[serde(rename = "agentSymbol")]
12117 pub agent_symbol: ::std::string::String,
12118 ///The price of the transaction.
12119 pub price: u64,
12120 ///The symbol of the ship type (e.g. SHIP_MINING_DRONE) that was the subject of the transaction. Contrary to what the name implies, this is NOT the symbol of the ship that was purchased.
12121 #[serde(rename = "shipSymbol")]
12122 pub ship_symbol: ::std::string::String,
12123 ///The symbol of the ship type (e.g. SHIP_MINING_DRONE) that was the subject of the transaction.
12124 #[serde(rename = "shipType")]
12125 pub ship_type: ::std::string::String,
12126 ///The timestamp of the transaction.
12127 pub timestamp: ::chrono::DateTime<::chrono::offset::Utc>,
12128 #[serde(rename = "waypointSymbol")]
12129 pub waypoint_symbol: WaypointSymbol,
12130 }
12131 ///Siphon details.
12132 ///
12133 /// <details><summary>JSON schema</summary>
12134 ///
12135 /// ```json
12136 ///{
12137 /// "description": "Siphon details.",
12138 /// "type": "object",
12139 /// "required": [
12140 /// "shipSymbol",
12141 /// "yield"
12142 /// ],
12143 /// "properties": {
12144 /// "shipSymbol": {
12145 /// "description": "Symbol of the ship that executed the siphon.",
12146 /// "type": "string",
12147 /// "minLength": 1
12148 /// },
12149 /// "yield": {
12150 /// "$ref": "#/components/schemas/SiphonYield"
12151 /// }
12152 /// }
12153 ///}
12154 /// ```
12155 /// </details>
12156 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12157 pub struct Siphon {
12158 ///Symbol of the ship that executed the siphon.
12159 #[serde(rename = "shipSymbol")]
12160 pub ship_symbol: SiphonShipSymbol,
12161 #[serde(rename = "yield")]
12162 pub yield_: SiphonYield,
12163 }
12164 ///Siphon successful.
12165 ///
12166 /// <details><summary>JSON schema</summary>
12167 ///
12168 /// ```json
12169 ///{
12170 /// "description": "Siphon successful.",
12171 /// "type": "object",
12172 /// "required": [
12173 /// "data"
12174 /// ],
12175 /// "properties": {
12176 /// "data": {
12177 /// "type": "object",
12178 /// "required": [
12179 /// "cargo",
12180 /// "cooldown",
12181 /// "events",
12182 /// "siphon"
12183 /// ],
12184 /// "properties": {
12185 /// "cargo": {
12186 /// "$ref": "#/components/schemas/ShipCargo"
12187 /// },
12188 /// "cooldown": {
12189 /// "$ref": "#/components/schemas/Cooldown"
12190 /// },
12191 /// "events": {
12192 /// "type": "array",
12193 /// "items": {
12194 /// "$ref": "#/components/schemas/ShipConditionEvent"
12195 /// }
12196 /// },
12197 /// "siphon": {
12198 /// "$ref": "#/components/schemas/Siphon"
12199 /// }
12200 /// }
12201 /// }
12202 /// }
12203 ///}
12204 /// ```
12205 /// </details>
12206 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12207 pub struct SiphonResourcesResponse {
12208 pub data: SiphonResourcesResponseData,
12209 }
12210 ///`SiphonResourcesResponseData`
12211 ///
12212 /// <details><summary>JSON schema</summary>
12213 ///
12214 /// ```json
12215 ///{
12216 /// "type": "object",
12217 /// "required": [
12218 /// "cargo",
12219 /// "cooldown",
12220 /// "events",
12221 /// "siphon"
12222 /// ],
12223 /// "properties": {
12224 /// "cargo": {
12225 /// "$ref": "#/components/schemas/ShipCargo"
12226 /// },
12227 /// "cooldown": {
12228 /// "$ref": "#/components/schemas/Cooldown"
12229 /// },
12230 /// "events": {
12231 /// "type": "array",
12232 /// "items": {
12233 /// "$ref": "#/components/schemas/ShipConditionEvent"
12234 /// }
12235 /// },
12236 /// "siphon": {
12237 /// "$ref": "#/components/schemas/Siphon"
12238 /// }
12239 /// }
12240 ///}
12241 /// ```
12242 /// </details>
12243 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12244 pub struct SiphonResourcesResponseData {
12245 pub cargo: ShipCargo,
12246 pub cooldown: Cooldown,
12247 pub events: ::std::vec::Vec<ShipConditionEvent>,
12248 pub siphon: Siphon,
12249 }
12250 ///Symbol of the ship that executed the siphon.
12251 ///
12252 /// <details><summary>JSON schema</summary>
12253 ///
12254 /// ```json
12255 ///{
12256 /// "description": "Symbol of the ship that executed the siphon.",
12257 /// "type": "string",
12258 /// "minLength": 1
12259 ///}
12260 /// ```
12261 /// </details>
12262 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12263 #[serde(transparent)]
12264 pub struct SiphonShipSymbol(::std::string::String);
12265 impl ::std::ops::Deref for SiphonShipSymbol {
12266 type Target = ::std::string::String;
12267 fn deref(&self) -> &::std::string::String {
12268 &self.0
12269 }
12270 }
12271 impl ::std::convert::From<SiphonShipSymbol> for ::std::string::String {
12272 fn from(value: SiphonShipSymbol) -> Self {
12273 value.0
12274 }
12275 }
12276 impl ::std::str::FromStr for SiphonShipSymbol {
12277 type Err = self::error::ConversionError;
12278 fn from_str(
12279 value: &str,
12280 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12281 if value.chars().count() < 1usize {
12282 return Err("shorter than 1 characters".into());
12283 }
12284 Ok(Self(value.to_string()))
12285 }
12286 }
12287 impl ::std::convert::TryFrom<&str> for SiphonShipSymbol {
12288 type Error = self::error::ConversionError;
12289 fn try_from(
12290 value: &str,
12291 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12292 value.parse()
12293 }
12294 }
12295 impl ::std::convert::TryFrom<&::std::string::String> for SiphonShipSymbol {
12296 type Error = self::error::ConversionError;
12297 fn try_from(
12298 value: &::std::string::String,
12299 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12300 value.parse()
12301 }
12302 }
12303 impl ::std::convert::TryFrom<::std::string::String> for SiphonShipSymbol {
12304 type Error = self::error::ConversionError;
12305 fn try_from(
12306 value: ::std::string::String,
12307 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12308 value.parse()
12309 }
12310 }
12311 impl<'de> ::serde::Deserialize<'de> for SiphonShipSymbol {
12312 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12313 where
12314 D: ::serde::Deserializer<'de>,
12315 {
12316 ::std::string::String::deserialize(deserializer)?
12317 .parse()
12318 .map_err(|e: self::error::ConversionError| {
12319 <D::Error as ::serde::de::Error>::custom(e.to_string())
12320 })
12321 }
12322 }
12323 ///A yield from the siphon operation.
12324 ///
12325 /// <details><summary>JSON schema</summary>
12326 ///
12327 /// ```json
12328 ///{
12329 /// "description": "A yield from the siphon operation.",
12330 /// "type": "object",
12331 /// "required": [
12332 /// "symbol",
12333 /// "units"
12334 /// ],
12335 /// "properties": {
12336 /// "symbol": {
12337 /// "$ref": "#/components/schemas/TradeSymbol"
12338 /// },
12339 /// "units": {
12340 /// "description": "The number of units siphoned that were placed into the ship's cargo hold.",
12341 /// "type": "integer"
12342 /// }
12343 /// }
12344 ///}
12345 /// ```
12346 /// </details>
12347 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12348 pub struct SiphonYield {
12349 pub symbol: TradeSymbol,
12350 ///The number of units siphoned that were placed into the ship's cargo hold.
12351 pub units: i64,
12352 }
12353 ///`SupplyConstructionBody`
12354 ///
12355 /// <details><summary>JSON schema</summary>
12356 ///
12357 /// ```json
12358 ///{
12359 /// "type": "object",
12360 /// "required": [
12361 /// "shipSymbol",
12362 /// "tradeSymbol",
12363 /// "units"
12364 /// ],
12365 /// "properties": {
12366 /// "shipSymbol": {
12367 /// "description": "The symbol of the ship supplying construction materials.",
12368 /// "examples": [
12369 /// "DODO-1"
12370 /// ],
12371 /// "type": "string"
12372 /// },
12373 /// "tradeSymbol": {
12374 /// "description": "The symbol of the good to supply.",
12375 /// "examples": [
12376 /// "IRON_ORE"
12377 /// ],
12378 /// "allOf": [
12379 /// {
12380 /// "$ref": "#/components/schemas/TradeSymbol"
12381 /// }
12382 /// ]
12383 /// },
12384 /// "units": {
12385 /// "description": "Amount of units to supply.",
12386 /// "examples": [
12387 /// 10
12388 /// ],
12389 /// "type": "integer",
12390 /// "minimum": 1.0
12391 /// }
12392 /// }
12393 ///}
12394 /// ```
12395 /// </details>
12396 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12397 pub struct SupplyConstructionBody {
12398 ///The symbol of the ship supplying construction materials.
12399 #[serde(rename = "shipSymbol")]
12400 pub ship_symbol: ::std::string::String,
12401 ///The symbol of the good to supply.
12402 #[serde(rename = "tradeSymbol")]
12403 pub trade_symbol: TradeSymbol,
12404 ///Amount of units to supply.
12405 pub units: ::std::num::NonZeroU64,
12406 }
12407 ///Successfully supplied construction site.
12408 ///
12409 /// <details><summary>JSON schema</summary>
12410 ///
12411 /// ```json
12412 ///{
12413 /// "description": "Successfully supplied construction site.",
12414 /// "type": "object",
12415 /// "required": [
12416 /// "data"
12417 /// ],
12418 /// "properties": {
12419 /// "data": {
12420 /// "type": "object",
12421 /// "required": [
12422 /// "cargo",
12423 /// "construction"
12424 /// ],
12425 /// "properties": {
12426 /// "cargo": {
12427 /// "$ref": "#/components/schemas/ShipCargo"
12428 /// },
12429 /// "construction": {
12430 /// "$ref": "#/components/schemas/Construction"
12431 /// }
12432 /// }
12433 /// }
12434 /// }
12435 ///}
12436 /// ```
12437 /// </details>
12438 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12439 pub struct SupplyConstructionResponse {
12440 pub data: SupplyConstructionResponseData,
12441 }
12442 ///`SupplyConstructionResponseData`
12443 ///
12444 /// <details><summary>JSON schema</summary>
12445 ///
12446 /// ```json
12447 ///{
12448 /// "type": "object",
12449 /// "required": [
12450 /// "cargo",
12451 /// "construction"
12452 /// ],
12453 /// "properties": {
12454 /// "cargo": {
12455 /// "$ref": "#/components/schemas/ShipCargo"
12456 /// },
12457 /// "construction": {
12458 /// "$ref": "#/components/schemas/Construction"
12459 /// }
12460 /// }
12461 ///}
12462 /// ```
12463 /// </details>
12464 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12465 pub struct SupplyConstructionResponseData {
12466 pub cargo: ShipCargo,
12467 pub construction: Construction,
12468 }
12469 ///The supply level of a trade good.
12470 ///
12471 /// <details><summary>JSON schema</summary>
12472 ///
12473 /// ```json
12474 ///{
12475 /// "description": "The supply level of a trade good.",
12476 /// "type": "string",
12477 /// "enum": [
12478 /// "SCARCE",
12479 /// "LIMITED",
12480 /// "MODERATE",
12481 /// "HIGH",
12482 /// "ABUNDANT"
12483 /// ]
12484 ///}
12485 /// ```
12486 /// </details>
12487 #[derive(
12488 ::serde::Deserialize,
12489 ::serde::Serialize,
12490 Clone,
12491 Copy,
12492 Debug,
12493 Eq,
12494 Hash,
12495 Ord,
12496 PartialEq,
12497 PartialOrd
12498 )]
12499 pub enum SupplyLevel {
12500 #[serde(rename = "SCARCE")]
12501 Scarce,
12502 #[serde(rename = "LIMITED")]
12503 Limited,
12504 #[serde(rename = "MODERATE")]
12505 Moderate,
12506 #[serde(rename = "HIGH")]
12507 High,
12508 #[serde(rename = "ABUNDANT")]
12509 Abundant,
12510 }
12511 impl ::std::fmt::Display for SupplyLevel {
12512 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12513 match *self {
12514 Self::Scarce => f.write_str("SCARCE"),
12515 Self::Limited => f.write_str("LIMITED"),
12516 Self::Moderate => f.write_str("MODERATE"),
12517 Self::High => f.write_str("HIGH"),
12518 Self::Abundant => f.write_str("ABUNDANT"),
12519 }
12520 }
12521 }
12522 impl ::std::str::FromStr for SupplyLevel {
12523 type Err = self::error::ConversionError;
12524 fn from_str(
12525 value: &str,
12526 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12527 match value {
12528 "SCARCE" => Ok(Self::Scarce),
12529 "LIMITED" => Ok(Self::Limited),
12530 "MODERATE" => Ok(Self::Moderate),
12531 "HIGH" => Ok(Self::High),
12532 "ABUNDANT" => Ok(Self::Abundant),
12533 _ => Err("invalid value".into()),
12534 }
12535 }
12536 }
12537 impl ::std::convert::TryFrom<&str> for SupplyLevel {
12538 type Error = self::error::ConversionError;
12539 fn try_from(
12540 value: &str,
12541 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12542 value.parse()
12543 }
12544 }
12545 impl ::std::convert::TryFrom<&::std::string::String> for SupplyLevel {
12546 type Error = self::error::ConversionError;
12547 fn try_from(
12548 value: &::std::string::String,
12549 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12550 value.parse()
12551 }
12552 }
12553 impl ::std::convert::TryFrom<::std::string::String> for SupplyLevel {
12554 type Error = self::error::ConversionError;
12555 fn try_from(
12556 value: ::std::string::String,
12557 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12558 value.parse()
12559 }
12560 }
12561 ///A resource survey of a waypoint, detailing a specific extraction location and the types of resources that can be found there.
12562 ///
12563 /// <details><summary>JSON schema</summary>
12564 ///
12565 /// ```json
12566 ///{
12567 /// "description": "A resource survey of a waypoint, detailing a specific extraction location and the types of resources that can be found there.",
12568 /// "type": "object",
12569 /// "required": [
12570 /// "deposits",
12571 /// "expiration",
12572 /// "signature",
12573 /// "size",
12574 /// "symbol"
12575 /// ],
12576 /// "properties": {
12577 /// "deposits": {
12578 /// "description": "A list of deposits that can be found at this location. A ship will extract one of these deposits when using this survey in an extraction request. If multiple deposits of the same type are present, the chance of extracting that deposit is increased.",
12579 /// "type": "array",
12580 /// "items": {
12581 /// "$ref": "#/components/schemas/SurveyDeposit"
12582 /// }
12583 /// },
12584 /// "expiration": {
12585 /// "description": "The date and time when the survey expires. After this date and time, the survey will no longer be available for extraction.",
12586 /// "type": "string",
12587 /// "format": "date-time"
12588 /// },
12589 /// "signature": {
12590 /// "description": "A unique signature for the location of this survey. This signature is verified when attempting an extraction using this survey.",
12591 /// "type": "string",
12592 /// "minLength": 1
12593 /// },
12594 /// "size": {
12595 /// "$ref": "#/components/schemas/SurveySize"
12596 /// },
12597 /// "symbol": {
12598 /// "description": "The symbol of the waypoint that this survey is for.",
12599 /// "type": "string",
12600 /// "minLength": 1
12601 /// }
12602 /// }
12603 ///}
12604 /// ```
12605 /// </details>
12606 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12607 pub struct Survey {
12608 ///A list of deposits that can be found at this location. A ship will extract one of these deposits when using this survey in an extraction request. If multiple deposits of the same type are present, the chance of extracting that deposit is increased.
12609 pub deposits: ::std::vec::Vec<SurveyDeposit>,
12610 ///The date and time when the survey expires. After this date and time, the survey will no longer be available for extraction.
12611 pub expiration: ::chrono::DateTime<::chrono::offset::Utc>,
12612 ///A unique signature for the location of this survey. This signature is verified when attempting an extraction using this survey.
12613 pub signature: SurveySignature,
12614 pub size: SurveySize,
12615 ///The symbol of the waypoint that this survey is for.
12616 pub symbol: SurveySymbol,
12617 }
12618 ///A surveyed deposit of a mineral or resource available for extraction.
12619 ///
12620 /// <details><summary>JSON schema</summary>
12621 ///
12622 /// ```json
12623 ///{
12624 /// "description": "A surveyed deposit of a mineral or resource available for extraction.",
12625 /// "type": "object",
12626 /// "required": [
12627 /// "symbol"
12628 /// ],
12629 /// "properties": {
12630 /// "symbol": {
12631 /// "description": "The symbol of the deposit.",
12632 /// "allOf": [
12633 /// {
12634 /// "$ref": "#/components/schemas/TradeSymbol"
12635 /// }
12636 /// ]
12637 /// }
12638 /// }
12639 ///}
12640 /// ```
12641 /// </details>
12642 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12643 pub struct SurveyDeposit {
12644 ///The symbol of the deposit.
12645 pub symbol: TradeSymbol,
12646 }
12647 ///A unique signature for the location of this survey. This signature is verified when attempting an extraction using this survey.
12648 ///
12649 /// <details><summary>JSON schema</summary>
12650 ///
12651 /// ```json
12652 ///{
12653 /// "description": "A unique signature for the location of this survey. This signature is verified when attempting an extraction using this survey.",
12654 /// "type": "string",
12655 /// "minLength": 1
12656 ///}
12657 /// ```
12658 /// </details>
12659 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12660 #[serde(transparent)]
12661 pub struct SurveySignature(::std::string::String);
12662 impl ::std::ops::Deref for SurveySignature {
12663 type Target = ::std::string::String;
12664 fn deref(&self) -> &::std::string::String {
12665 &self.0
12666 }
12667 }
12668 impl ::std::convert::From<SurveySignature> for ::std::string::String {
12669 fn from(value: SurveySignature) -> Self {
12670 value.0
12671 }
12672 }
12673 impl ::std::str::FromStr for SurveySignature {
12674 type Err = self::error::ConversionError;
12675 fn from_str(
12676 value: &str,
12677 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12678 if value.chars().count() < 1usize {
12679 return Err("shorter than 1 characters".into());
12680 }
12681 Ok(Self(value.to_string()))
12682 }
12683 }
12684 impl ::std::convert::TryFrom<&str> for SurveySignature {
12685 type Error = self::error::ConversionError;
12686 fn try_from(
12687 value: &str,
12688 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12689 value.parse()
12690 }
12691 }
12692 impl ::std::convert::TryFrom<&::std::string::String> for SurveySignature {
12693 type Error = self::error::ConversionError;
12694 fn try_from(
12695 value: &::std::string::String,
12696 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12697 value.parse()
12698 }
12699 }
12700 impl ::std::convert::TryFrom<::std::string::String> for SurveySignature {
12701 type Error = self::error::ConversionError;
12702 fn try_from(
12703 value: ::std::string::String,
12704 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12705 value.parse()
12706 }
12707 }
12708 impl<'de> ::serde::Deserialize<'de> for SurveySignature {
12709 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12710 where
12711 D: ::serde::Deserializer<'de>,
12712 {
12713 ::std::string::String::deserialize(deserializer)?
12714 .parse()
12715 .map_err(|e: self::error::ConversionError| {
12716 <D::Error as ::serde::de::Error>::custom(e.to_string())
12717 })
12718 }
12719 }
12720 ///The size of the deposit. This value indicates how much can be extracted from the survey before it is exhausted.
12721 ///
12722 /// <details><summary>JSON schema</summary>
12723 ///
12724 /// ```json
12725 ///{
12726 /// "description": "The size of the deposit. This value indicates how much can be extracted from the survey before it is exhausted.",
12727 /// "type": "string",
12728 /// "enum": [
12729 /// "SMALL",
12730 /// "MODERATE",
12731 /// "LARGE"
12732 /// ]
12733 ///}
12734 /// ```
12735 /// </details>
12736 #[derive(
12737 ::serde::Deserialize,
12738 ::serde::Serialize,
12739 Clone,
12740 Copy,
12741 Debug,
12742 Eq,
12743 Hash,
12744 Ord,
12745 PartialEq,
12746 PartialOrd
12747 )]
12748 pub enum SurveySize {
12749 #[serde(rename = "SMALL")]
12750 Small,
12751 #[serde(rename = "MODERATE")]
12752 Moderate,
12753 #[serde(rename = "LARGE")]
12754 Large,
12755 }
12756 impl ::std::fmt::Display for SurveySize {
12757 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12758 match *self {
12759 Self::Small => f.write_str("SMALL"),
12760 Self::Moderate => f.write_str("MODERATE"),
12761 Self::Large => f.write_str("LARGE"),
12762 }
12763 }
12764 }
12765 impl ::std::str::FromStr for SurveySize {
12766 type Err = self::error::ConversionError;
12767 fn from_str(
12768 value: &str,
12769 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12770 match value {
12771 "SMALL" => Ok(Self::Small),
12772 "MODERATE" => Ok(Self::Moderate),
12773 "LARGE" => Ok(Self::Large),
12774 _ => Err("invalid value".into()),
12775 }
12776 }
12777 }
12778 impl ::std::convert::TryFrom<&str> for SurveySize {
12779 type Error = self::error::ConversionError;
12780 fn try_from(
12781 value: &str,
12782 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12783 value.parse()
12784 }
12785 }
12786 impl ::std::convert::TryFrom<&::std::string::String> for SurveySize {
12787 type Error = self::error::ConversionError;
12788 fn try_from(
12789 value: &::std::string::String,
12790 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12791 value.parse()
12792 }
12793 }
12794 impl ::std::convert::TryFrom<::std::string::String> for SurveySize {
12795 type Error = self::error::ConversionError;
12796 fn try_from(
12797 value: ::std::string::String,
12798 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12799 value.parse()
12800 }
12801 }
12802 ///The symbol of the waypoint that this survey is for.
12803 ///
12804 /// <details><summary>JSON schema</summary>
12805 ///
12806 /// ```json
12807 ///{
12808 /// "description": "The symbol of the waypoint that this survey is for.",
12809 /// "type": "string",
12810 /// "minLength": 1
12811 ///}
12812 /// ```
12813 /// </details>
12814 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12815 #[serde(transparent)]
12816 pub struct SurveySymbol(::std::string::String);
12817 impl ::std::ops::Deref for SurveySymbol {
12818 type Target = ::std::string::String;
12819 fn deref(&self) -> &::std::string::String {
12820 &self.0
12821 }
12822 }
12823 impl ::std::convert::From<SurveySymbol> for ::std::string::String {
12824 fn from(value: SurveySymbol) -> Self {
12825 value.0
12826 }
12827 }
12828 impl ::std::str::FromStr for SurveySymbol {
12829 type Err = self::error::ConversionError;
12830 fn from_str(
12831 value: &str,
12832 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12833 if value.chars().count() < 1usize {
12834 return Err("shorter than 1 characters".into());
12835 }
12836 Ok(Self(value.to_string()))
12837 }
12838 }
12839 impl ::std::convert::TryFrom<&str> for SurveySymbol {
12840 type Error = self::error::ConversionError;
12841 fn try_from(
12842 value: &str,
12843 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12844 value.parse()
12845 }
12846 }
12847 impl ::std::convert::TryFrom<&::std::string::String> for SurveySymbol {
12848 type Error = self::error::ConversionError;
12849 fn try_from(
12850 value: &::std::string::String,
12851 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12852 value.parse()
12853 }
12854 }
12855 impl ::std::convert::TryFrom<::std::string::String> for SurveySymbol {
12856 type Error = self::error::ConversionError;
12857 fn try_from(
12858 value: ::std::string::String,
12859 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12860 value.parse()
12861 }
12862 }
12863 impl<'de> ::serde::Deserialize<'de> for SurveySymbol {
12864 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12865 where
12866 D: ::serde::Deserializer<'de>,
12867 {
12868 ::std::string::String::deserialize(deserializer)?
12869 .parse()
12870 .map_err(|e: self::error::ConversionError| {
12871 <D::Error as ::serde::de::Error>::custom(e.to_string())
12872 })
12873 }
12874 }
12875 ///System details.
12876 ///
12877 /// <details><summary>JSON schema</summary>
12878 ///
12879 /// ```json
12880 ///{
12881 /// "description": "System details.",
12882 /// "type": "object",
12883 /// "required": [
12884 /// "factions",
12885 /// "sectorSymbol",
12886 /// "symbol",
12887 /// "type",
12888 /// "waypoints",
12889 /// "x",
12890 /// "y"
12891 /// ],
12892 /// "properties": {
12893 /// "constellation": {
12894 /// "description": "The constellation that the system is part of.",
12895 /// "type": "string"
12896 /// },
12897 /// "factions": {
12898 /// "description": "Factions that control this system.",
12899 /// "type": "array",
12900 /// "items": {
12901 /// "$ref": "#/components/schemas/SystemFaction"
12902 /// }
12903 /// },
12904 /// "name": {
12905 /// "description": "The name of the system.",
12906 /// "type": "string"
12907 /// },
12908 /// "sectorSymbol": {
12909 /// "description": "The symbol of the sector.",
12910 /// "type": "string",
12911 /// "minLength": 1
12912 /// },
12913 /// "symbol": {
12914 /// "$ref": "#/components/schemas/SystemSymbol"
12915 /// },
12916 /// "type": {
12917 /// "$ref": "#/components/schemas/SystemType"
12918 /// },
12919 /// "waypoints": {
12920 /// "description": "Waypoints in this system.",
12921 /// "type": "array",
12922 /// "items": {
12923 /// "$ref": "#/components/schemas/SystemWaypoint"
12924 /// }
12925 /// },
12926 /// "x": {
12927 /// "description": "Relative position of the system in the sector in the x axis.",
12928 /// "type": "integer"
12929 /// },
12930 /// "y": {
12931 /// "description": "Relative position of the system in the sector in the y axis.",
12932 /// "type": "integer"
12933 /// }
12934 /// }
12935 ///}
12936 /// ```
12937 /// </details>
12938 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12939 pub struct System {
12940 ///The constellation that the system is part of.
12941 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12942 pub constellation: ::std::option::Option<::std::string::String>,
12943 ///Factions that control this system.
12944 pub factions: ::std::vec::Vec<SystemFaction>,
12945 ///The name of the system.
12946 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12947 pub name: ::std::option::Option<::std::string::String>,
12948 ///The symbol of the sector.
12949 #[serde(rename = "sectorSymbol")]
12950 pub sector_symbol: SystemSectorSymbol,
12951 pub symbol: SystemSymbol,
12952 #[serde(rename = "type")]
12953 pub type_: SystemType,
12954 ///Waypoints in this system.
12955 pub waypoints: ::std::vec::Vec<SystemWaypoint>,
12956 ///Relative position of the system in the sector in the x axis.
12957 pub x: i64,
12958 ///Relative position of the system in the sector in the y axis.
12959 pub y: i64,
12960 }
12961 ///`SystemFaction`
12962 ///
12963 /// <details><summary>JSON schema</summary>
12964 ///
12965 /// ```json
12966 ///{
12967 /// "type": "object",
12968 /// "required": [
12969 /// "symbol"
12970 /// ],
12971 /// "properties": {
12972 /// "symbol": {
12973 /// "$ref": "#/components/schemas/FactionSymbol"
12974 /// }
12975 /// }
12976 ///}
12977 /// ```
12978 /// </details>
12979 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12980 pub struct SystemFaction {
12981 pub symbol: FactionSymbol,
12982 }
12983 ///The symbol of the sector.
12984 ///
12985 /// <details><summary>JSON schema</summary>
12986 ///
12987 /// ```json
12988 ///{
12989 /// "description": "The symbol of the sector.",
12990 /// "type": "string",
12991 /// "minLength": 1
12992 ///}
12993 /// ```
12994 /// </details>
12995 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12996 #[serde(transparent)]
12997 pub struct SystemSectorSymbol(::std::string::String);
12998 impl ::std::ops::Deref for SystemSectorSymbol {
12999 type Target = ::std::string::String;
13000 fn deref(&self) -> &::std::string::String {
13001 &self.0
13002 }
13003 }
13004 impl ::std::convert::From<SystemSectorSymbol> for ::std::string::String {
13005 fn from(value: SystemSectorSymbol) -> Self {
13006 value.0
13007 }
13008 }
13009 impl ::std::str::FromStr for SystemSectorSymbol {
13010 type Err = self::error::ConversionError;
13011 fn from_str(
13012 value: &str,
13013 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13014 if value.chars().count() < 1usize {
13015 return Err("shorter than 1 characters".into());
13016 }
13017 Ok(Self(value.to_string()))
13018 }
13019 }
13020 impl ::std::convert::TryFrom<&str> for SystemSectorSymbol {
13021 type Error = self::error::ConversionError;
13022 fn try_from(
13023 value: &str,
13024 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13025 value.parse()
13026 }
13027 }
13028 impl ::std::convert::TryFrom<&::std::string::String> for SystemSectorSymbol {
13029 type Error = self::error::ConversionError;
13030 fn try_from(
13031 value: &::std::string::String,
13032 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13033 value.parse()
13034 }
13035 }
13036 impl ::std::convert::TryFrom<::std::string::String> for SystemSectorSymbol {
13037 type Error = self::error::ConversionError;
13038 fn try_from(
13039 value: ::std::string::String,
13040 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13041 value.parse()
13042 }
13043 }
13044 impl<'de> ::serde::Deserialize<'de> for SystemSectorSymbol {
13045 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
13046 where
13047 D: ::serde::Deserializer<'de>,
13048 {
13049 ::std::string::String::deserialize(deserializer)?
13050 .parse()
13051 .map_err(|e: self::error::ConversionError| {
13052 <D::Error as ::serde::de::Error>::custom(e.to_string())
13053 })
13054 }
13055 }
13056 ///The symbol of the system.
13057 ///
13058 /// <details><summary>JSON schema</summary>
13059 ///
13060 /// ```json
13061 ///{
13062 /// "description": "The symbol of the system.",
13063 /// "type": "string",
13064 /// "minLength": 1
13065 ///}
13066 /// ```
13067 /// </details>
13068 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13069 #[serde(transparent)]
13070 pub struct SystemSymbol(::std::string::String);
13071 impl ::std::ops::Deref for SystemSymbol {
13072 type Target = ::std::string::String;
13073 fn deref(&self) -> &::std::string::String {
13074 &self.0
13075 }
13076 }
13077 impl ::std::convert::From<SystemSymbol> for ::std::string::String {
13078 fn from(value: SystemSymbol) -> Self {
13079 value.0
13080 }
13081 }
13082 impl ::std::str::FromStr for SystemSymbol {
13083 type Err = self::error::ConversionError;
13084 fn from_str(
13085 value: &str,
13086 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13087 if value.chars().count() < 1usize {
13088 return Err("shorter than 1 characters".into());
13089 }
13090 Ok(Self(value.to_string()))
13091 }
13092 }
13093 impl ::std::convert::TryFrom<&str> for SystemSymbol {
13094 type Error = self::error::ConversionError;
13095 fn try_from(
13096 value: &str,
13097 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13098 value.parse()
13099 }
13100 }
13101 impl ::std::convert::TryFrom<&::std::string::String> for SystemSymbol {
13102 type Error = self::error::ConversionError;
13103 fn try_from(
13104 value: &::std::string::String,
13105 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13106 value.parse()
13107 }
13108 }
13109 impl ::std::convert::TryFrom<::std::string::String> for SystemSymbol {
13110 type Error = self::error::ConversionError;
13111 fn try_from(
13112 value: ::std::string::String,
13113 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13114 value.parse()
13115 }
13116 }
13117 impl<'de> ::serde::Deserialize<'de> for SystemSymbol {
13118 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
13119 where
13120 D: ::serde::Deserializer<'de>,
13121 {
13122 ::std::string::String::deserialize(deserializer)?
13123 .parse()
13124 .map_err(|e: self::error::ConversionError| {
13125 <D::Error as ::serde::de::Error>::custom(e.to_string())
13126 })
13127 }
13128 }
13129 ///The type of system.
13130 ///
13131 /// <details><summary>JSON schema</summary>
13132 ///
13133 /// ```json
13134 ///{
13135 /// "description": "The type of system.",
13136 /// "type": "string",
13137 /// "enum": [
13138 /// "NEUTRON_STAR",
13139 /// "RED_STAR",
13140 /// "ORANGE_STAR",
13141 /// "BLUE_STAR",
13142 /// "YOUNG_STAR",
13143 /// "WHITE_DWARF",
13144 /// "BLACK_HOLE",
13145 /// "HYPERGIANT",
13146 /// "NEBULA",
13147 /// "UNSTABLE"
13148 /// ]
13149 ///}
13150 /// ```
13151 /// </details>
13152 #[derive(
13153 ::serde::Deserialize,
13154 ::serde::Serialize,
13155 Clone,
13156 Copy,
13157 Debug,
13158 Eq,
13159 Hash,
13160 Ord,
13161 PartialEq,
13162 PartialOrd
13163 )]
13164 pub enum SystemType {
13165 #[serde(rename = "NEUTRON_STAR")]
13166 NeutronStar,
13167 #[serde(rename = "RED_STAR")]
13168 RedStar,
13169 #[serde(rename = "ORANGE_STAR")]
13170 OrangeStar,
13171 #[serde(rename = "BLUE_STAR")]
13172 BlueStar,
13173 #[serde(rename = "YOUNG_STAR")]
13174 YoungStar,
13175 #[serde(rename = "WHITE_DWARF")]
13176 WhiteDwarf,
13177 #[serde(rename = "BLACK_HOLE")]
13178 BlackHole,
13179 #[serde(rename = "HYPERGIANT")]
13180 Hypergiant,
13181 #[serde(rename = "NEBULA")]
13182 Nebula,
13183 #[serde(rename = "UNSTABLE")]
13184 Unstable,
13185 }
13186 impl ::std::fmt::Display for SystemType {
13187 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13188 match *self {
13189 Self::NeutronStar => f.write_str("NEUTRON_STAR"),
13190 Self::RedStar => f.write_str("RED_STAR"),
13191 Self::OrangeStar => f.write_str("ORANGE_STAR"),
13192 Self::BlueStar => f.write_str("BLUE_STAR"),
13193 Self::YoungStar => f.write_str("YOUNG_STAR"),
13194 Self::WhiteDwarf => f.write_str("WHITE_DWARF"),
13195 Self::BlackHole => f.write_str("BLACK_HOLE"),
13196 Self::Hypergiant => f.write_str("HYPERGIANT"),
13197 Self::Nebula => f.write_str("NEBULA"),
13198 Self::Unstable => f.write_str("UNSTABLE"),
13199 }
13200 }
13201 }
13202 impl ::std::str::FromStr for SystemType {
13203 type Err = self::error::ConversionError;
13204 fn from_str(
13205 value: &str,
13206 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13207 match value {
13208 "NEUTRON_STAR" => Ok(Self::NeutronStar),
13209 "RED_STAR" => Ok(Self::RedStar),
13210 "ORANGE_STAR" => Ok(Self::OrangeStar),
13211 "BLUE_STAR" => Ok(Self::BlueStar),
13212 "YOUNG_STAR" => Ok(Self::YoungStar),
13213 "WHITE_DWARF" => Ok(Self::WhiteDwarf),
13214 "BLACK_HOLE" => Ok(Self::BlackHole),
13215 "HYPERGIANT" => Ok(Self::Hypergiant),
13216 "NEBULA" => Ok(Self::Nebula),
13217 "UNSTABLE" => Ok(Self::Unstable),
13218 _ => Err("invalid value".into()),
13219 }
13220 }
13221 }
13222 impl ::std::convert::TryFrom<&str> for SystemType {
13223 type Error = self::error::ConversionError;
13224 fn try_from(
13225 value: &str,
13226 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13227 value.parse()
13228 }
13229 }
13230 impl ::std::convert::TryFrom<&::std::string::String> for SystemType {
13231 type Error = self::error::ConversionError;
13232 fn try_from(
13233 value: &::std::string::String,
13234 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13235 value.parse()
13236 }
13237 }
13238 impl ::std::convert::TryFrom<::std::string::String> for SystemType {
13239 type Error = self::error::ConversionError;
13240 fn try_from(
13241 value: ::std::string::String,
13242 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13243 value.parse()
13244 }
13245 }
13246 ///Waypoint details.
13247 ///
13248 /// <details><summary>JSON schema</summary>
13249 ///
13250 /// ```json
13251 ///{
13252 /// "description": "Waypoint details.",
13253 /// "type": "object",
13254 /// "required": [
13255 /// "orbitals",
13256 /// "symbol",
13257 /// "type",
13258 /// "x",
13259 /// "y"
13260 /// ],
13261 /// "properties": {
13262 /// "orbitals": {
13263 /// "description": "Waypoints that orbit this waypoint.",
13264 /// "type": "array",
13265 /// "items": {
13266 /// "$ref": "#/components/schemas/WaypointOrbital"
13267 /// }
13268 /// },
13269 /// "orbits": {
13270 /// "description": "The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.",
13271 /// "type": "string",
13272 /// "minLength": 1
13273 /// },
13274 /// "symbol": {
13275 /// "$ref": "#/components/schemas/WaypointSymbol"
13276 /// },
13277 /// "type": {
13278 /// "$ref": "#/components/schemas/WaypointType"
13279 /// },
13280 /// "x": {
13281 /// "description": "Relative position of the waypoint on the system's x axis. This is not an absolute position in the universe.",
13282 /// "type": "integer"
13283 /// },
13284 /// "y": {
13285 /// "description": "Relative position of the waypoint on the system's y axis. This is not an absolute position in the universe.",
13286 /// "type": "integer"
13287 /// }
13288 /// }
13289 ///}
13290 /// ```
13291 /// </details>
13292 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13293 pub struct SystemWaypoint {
13294 ///Waypoints that orbit this waypoint.
13295 pub orbitals: ::std::vec::Vec<WaypointOrbital>,
13296 ///The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.
13297 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13298 pub orbits: ::std::option::Option<SystemWaypointOrbits>,
13299 pub symbol: WaypointSymbol,
13300 #[serde(rename = "type")]
13301 pub type_: WaypointType,
13302 ///Relative position of the waypoint on the system's x axis. This is not an absolute position in the universe.
13303 pub x: i64,
13304 ///Relative position of the waypoint on the system's y axis. This is not an absolute position in the universe.
13305 pub y: i64,
13306 }
13307 ///The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.
13308 ///
13309 /// <details><summary>JSON schema</summary>
13310 ///
13311 /// ```json
13312 ///{
13313 /// "description": "The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.",
13314 /// "type": "string",
13315 /// "minLength": 1
13316 ///}
13317 /// ```
13318 /// </details>
13319 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13320 #[serde(transparent)]
13321 pub struct SystemWaypointOrbits(::std::string::String);
13322 impl ::std::ops::Deref for SystemWaypointOrbits {
13323 type Target = ::std::string::String;
13324 fn deref(&self) -> &::std::string::String {
13325 &self.0
13326 }
13327 }
13328 impl ::std::convert::From<SystemWaypointOrbits> for ::std::string::String {
13329 fn from(value: SystemWaypointOrbits) -> Self {
13330 value.0
13331 }
13332 }
13333 impl ::std::str::FromStr for SystemWaypointOrbits {
13334 type Err = self::error::ConversionError;
13335 fn from_str(
13336 value: &str,
13337 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13338 if value.chars().count() < 1usize {
13339 return Err("shorter than 1 characters".into());
13340 }
13341 Ok(Self(value.to_string()))
13342 }
13343 }
13344 impl ::std::convert::TryFrom<&str> for SystemWaypointOrbits {
13345 type Error = self::error::ConversionError;
13346 fn try_from(
13347 value: &str,
13348 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13349 value.parse()
13350 }
13351 }
13352 impl ::std::convert::TryFrom<&::std::string::String> for SystemWaypointOrbits {
13353 type Error = self::error::ConversionError;
13354 fn try_from(
13355 value: &::std::string::String,
13356 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13357 value.parse()
13358 }
13359 }
13360 impl ::std::convert::TryFrom<::std::string::String> for SystemWaypointOrbits {
13361 type Error = self::error::ConversionError;
13362 fn try_from(
13363 value: ::std::string::String,
13364 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13365 value.parse()
13366 }
13367 }
13368 impl<'de> ::serde::Deserialize<'de> for SystemWaypointOrbits {
13369 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
13370 where
13371 D: ::serde::Deserializer<'de>,
13372 {
13373 ::std::string::String::deserialize(deserializer)?
13374 .parse()
13375 .map_err(|e: self::error::ConversionError| {
13376 <D::Error as ::serde::de::Error>::custom(e.to_string())
13377 })
13378 }
13379 }
13380 ///A good that can be traded for other goods or currency.
13381 ///
13382 /// <details><summary>JSON schema</summary>
13383 ///
13384 /// ```json
13385 ///{
13386 /// "description": "A good that can be traded for other goods or currency.",
13387 /// "type": "object",
13388 /// "required": [
13389 /// "description",
13390 /// "name",
13391 /// "symbol"
13392 /// ],
13393 /// "properties": {
13394 /// "description": {
13395 /// "description": "The description of the good.",
13396 /// "type": "string"
13397 /// },
13398 /// "name": {
13399 /// "description": "The name of the good.",
13400 /// "type": "string"
13401 /// },
13402 /// "symbol": {
13403 /// "$ref": "#/components/schemas/TradeSymbol"
13404 /// }
13405 /// }
13406 ///}
13407 /// ```
13408 /// </details>
13409 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13410 pub struct TradeGood {
13411 ///The description of the good.
13412 pub description: ::std::string::String,
13413 ///The name of the good.
13414 pub name: ::std::string::String,
13415 pub symbol: TradeSymbol,
13416 }
13417 ///The good's symbol.
13418 ///
13419 /// <details><summary>JSON schema</summary>
13420 ///
13421 /// ```json
13422 ///{
13423 /// "description": "The good's symbol.",
13424 /// "type": "string",
13425 /// "enum": [
13426 /// "PRECIOUS_STONES",
13427 /// "QUARTZ_SAND",
13428 /// "SILICON_CRYSTALS",
13429 /// "AMMONIA_ICE",
13430 /// "LIQUID_HYDROGEN",
13431 /// "LIQUID_NITROGEN",
13432 /// "ICE_WATER",
13433 /// "EXOTIC_MATTER",
13434 /// "ADVANCED_CIRCUITRY",
13435 /// "GRAVITON_EMITTERS",
13436 /// "IRON",
13437 /// "IRON_ORE",
13438 /// "COPPER",
13439 /// "COPPER_ORE",
13440 /// "ALUMINUM",
13441 /// "ALUMINUM_ORE",
13442 /// "SILVER",
13443 /// "SILVER_ORE",
13444 /// "GOLD",
13445 /// "GOLD_ORE",
13446 /// "PLATINUM",
13447 /// "PLATINUM_ORE",
13448 /// "DIAMONDS",
13449 /// "URANITE",
13450 /// "URANITE_ORE",
13451 /// "MERITIUM",
13452 /// "MERITIUM_ORE",
13453 /// "HYDROCARBON",
13454 /// "ANTIMATTER",
13455 /// "FAB_MATS",
13456 /// "FERTILIZERS",
13457 /// "FABRICS",
13458 /// "FOOD",
13459 /// "JEWELRY",
13460 /// "MACHINERY",
13461 /// "FIREARMS",
13462 /// "ASSAULT_RIFLES",
13463 /// "MILITARY_EQUIPMENT",
13464 /// "EXPLOSIVES",
13465 /// "LAB_INSTRUMENTS",
13466 /// "AMMUNITION",
13467 /// "ELECTRONICS",
13468 /// "SHIP_PLATING",
13469 /// "SHIP_PARTS",
13470 /// "EQUIPMENT",
13471 /// "FUEL",
13472 /// "MEDICINE",
13473 /// "DRUGS",
13474 /// "CLOTHING",
13475 /// "MICROPROCESSORS",
13476 /// "PLASTICS",
13477 /// "POLYNUCLEOTIDES",
13478 /// "BIOCOMPOSITES",
13479 /// "QUANTUM_STABILIZERS",
13480 /// "NANOBOTS",
13481 /// "AI_MAINFRAMES",
13482 /// "QUANTUM_DRIVES",
13483 /// "ROBOTIC_DRONES",
13484 /// "CYBER_IMPLANTS",
13485 /// "GENE_THERAPEUTICS",
13486 /// "NEURAL_CHIPS",
13487 /// "MOOD_REGULATORS",
13488 /// "VIRAL_AGENTS",
13489 /// "MICRO_FUSION_GENERATORS",
13490 /// "SUPERGRAINS",
13491 /// "LASER_RIFLES",
13492 /// "HOLOGRAPHICS",
13493 /// "SHIP_SALVAGE",
13494 /// "RELIC_TECH",
13495 /// "NOVEL_LIFEFORMS",
13496 /// "BOTANICAL_SPECIMENS",
13497 /// "CULTURAL_ARTIFACTS",
13498 /// "FRAME_PROBE",
13499 /// "FRAME_DRONE",
13500 /// "FRAME_INTERCEPTOR",
13501 /// "FRAME_RACER",
13502 /// "FRAME_FIGHTER",
13503 /// "FRAME_FRIGATE",
13504 /// "FRAME_SHUTTLE",
13505 /// "FRAME_EXPLORER",
13506 /// "FRAME_MINER",
13507 /// "FRAME_LIGHT_FREIGHTER",
13508 /// "FRAME_HEAVY_FREIGHTER",
13509 /// "FRAME_TRANSPORT",
13510 /// "FRAME_DESTROYER",
13511 /// "FRAME_CRUISER",
13512 /// "FRAME_CARRIER",
13513 /// "FRAME_BULK_FREIGHTER",
13514 /// "REACTOR_SOLAR_I",
13515 /// "REACTOR_FUSION_I",
13516 /// "REACTOR_FISSION_I",
13517 /// "REACTOR_CHEMICAL_I",
13518 /// "REACTOR_ANTIMATTER_I",
13519 /// "ENGINE_IMPULSE_DRIVE_I",
13520 /// "ENGINE_ION_DRIVE_I",
13521 /// "ENGINE_ION_DRIVE_II",
13522 /// "ENGINE_HYPER_DRIVE_I",
13523 /// "MODULE_MINERAL_PROCESSOR_I",
13524 /// "MODULE_GAS_PROCESSOR_I",
13525 /// "MODULE_CARGO_HOLD_I",
13526 /// "MODULE_CARGO_HOLD_II",
13527 /// "MODULE_CARGO_HOLD_III",
13528 /// "MODULE_CREW_QUARTERS_I",
13529 /// "MODULE_ENVOY_QUARTERS_I",
13530 /// "MODULE_PASSENGER_CABIN_I",
13531 /// "MODULE_MICRO_REFINERY_I",
13532 /// "MODULE_SCIENCE_LAB_I",
13533 /// "MODULE_JUMP_DRIVE_I",
13534 /// "MODULE_JUMP_DRIVE_II",
13535 /// "MODULE_JUMP_DRIVE_III",
13536 /// "MODULE_WARP_DRIVE_I",
13537 /// "MODULE_WARP_DRIVE_II",
13538 /// "MODULE_WARP_DRIVE_III",
13539 /// "MODULE_SHIELD_GENERATOR_I",
13540 /// "MODULE_SHIELD_GENERATOR_II",
13541 /// "MODULE_ORE_REFINERY_I",
13542 /// "MODULE_FUEL_REFINERY_I",
13543 /// "MOUNT_GAS_SIPHON_I",
13544 /// "MOUNT_GAS_SIPHON_II",
13545 /// "MOUNT_GAS_SIPHON_III",
13546 /// "MOUNT_SURVEYOR_I",
13547 /// "MOUNT_SURVEYOR_II",
13548 /// "MOUNT_SURVEYOR_III",
13549 /// "MOUNT_SENSOR_ARRAY_I",
13550 /// "MOUNT_SENSOR_ARRAY_II",
13551 /// "MOUNT_SENSOR_ARRAY_III",
13552 /// "MOUNT_MINING_LASER_I",
13553 /// "MOUNT_MINING_LASER_II",
13554 /// "MOUNT_MINING_LASER_III",
13555 /// "MOUNT_LASER_CANNON_I",
13556 /// "MOUNT_MISSILE_LAUNCHER_I",
13557 /// "MOUNT_TURRET_I",
13558 /// "SHIP_PROBE",
13559 /// "SHIP_MINING_DRONE",
13560 /// "SHIP_SIPHON_DRONE",
13561 /// "SHIP_INTERCEPTOR",
13562 /// "SHIP_LIGHT_HAULER",
13563 /// "SHIP_COMMAND_FRIGATE",
13564 /// "SHIP_EXPLORER",
13565 /// "SHIP_HEAVY_FREIGHTER",
13566 /// "SHIP_LIGHT_SHUTTLE",
13567 /// "SHIP_ORE_HOUND",
13568 /// "SHIP_REFINING_FREIGHTER",
13569 /// "SHIP_SURVEYOR",
13570 /// "SHIP_BULK_FREIGHTER"
13571 /// ]
13572 ///}
13573 /// ```
13574 /// </details>
13575 #[derive(
13576 ::serde::Deserialize,
13577 ::serde::Serialize,
13578 Clone,
13579 Copy,
13580 Debug,
13581 Eq,
13582 Hash,
13583 Ord,
13584 PartialEq,
13585 PartialOrd
13586 )]
13587 pub enum TradeSymbol {
13588 #[serde(rename = "PRECIOUS_STONES")]
13589 PreciousStones,
13590 #[serde(rename = "QUARTZ_SAND")]
13591 QuartzSand,
13592 #[serde(rename = "SILICON_CRYSTALS")]
13593 SiliconCrystals,
13594 #[serde(rename = "AMMONIA_ICE")]
13595 AmmoniaIce,
13596 #[serde(rename = "LIQUID_HYDROGEN")]
13597 LiquidHydrogen,
13598 #[serde(rename = "LIQUID_NITROGEN")]
13599 LiquidNitrogen,
13600 #[serde(rename = "ICE_WATER")]
13601 IceWater,
13602 #[serde(rename = "EXOTIC_MATTER")]
13603 ExoticMatter,
13604 #[serde(rename = "ADVANCED_CIRCUITRY")]
13605 AdvancedCircuitry,
13606 #[serde(rename = "GRAVITON_EMITTERS")]
13607 GravitonEmitters,
13608 #[serde(rename = "IRON")]
13609 Iron,
13610 #[serde(rename = "IRON_ORE")]
13611 IronOre,
13612 #[serde(rename = "COPPER")]
13613 Copper,
13614 #[serde(rename = "COPPER_ORE")]
13615 CopperOre,
13616 #[serde(rename = "ALUMINUM")]
13617 Aluminum,
13618 #[serde(rename = "ALUMINUM_ORE")]
13619 AluminumOre,
13620 #[serde(rename = "SILVER")]
13621 Silver,
13622 #[serde(rename = "SILVER_ORE")]
13623 SilverOre,
13624 #[serde(rename = "GOLD")]
13625 Gold,
13626 #[serde(rename = "GOLD_ORE")]
13627 GoldOre,
13628 #[serde(rename = "PLATINUM")]
13629 Platinum,
13630 #[serde(rename = "PLATINUM_ORE")]
13631 PlatinumOre,
13632 #[serde(rename = "DIAMONDS")]
13633 Diamonds,
13634 #[serde(rename = "URANITE")]
13635 Uranite,
13636 #[serde(rename = "URANITE_ORE")]
13637 UraniteOre,
13638 #[serde(rename = "MERITIUM")]
13639 Meritium,
13640 #[serde(rename = "MERITIUM_ORE")]
13641 MeritiumOre,
13642 #[serde(rename = "HYDROCARBON")]
13643 Hydrocarbon,
13644 #[serde(rename = "ANTIMATTER")]
13645 Antimatter,
13646 #[serde(rename = "FAB_MATS")]
13647 FabMats,
13648 #[serde(rename = "FERTILIZERS")]
13649 Fertilizers,
13650 #[serde(rename = "FABRICS")]
13651 Fabrics,
13652 #[serde(rename = "FOOD")]
13653 Food,
13654 #[serde(rename = "JEWELRY")]
13655 Jewelry,
13656 #[serde(rename = "MACHINERY")]
13657 Machinery,
13658 #[serde(rename = "FIREARMS")]
13659 Firearms,
13660 #[serde(rename = "ASSAULT_RIFLES")]
13661 AssaultRifles,
13662 #[serde(rename = "MILITARY_EQUIPMENT")]
13663 MilitaryEquipment,
13664 #[serde(rename = "EXPLOSIVES")]
13665 Explosives,
13666 #[serde(rename = "LAB_INSTRUMENTS")]
13667 LabInstruments,
13668 #[serde(rename = "AMMUNITION")]
13669 Ammunition,
13670 #[serde(rename = "ELECTRONICS")]
13671 Electronics,
13672 #[serde(rename = "SHIP_PLATING")]
13673 ShipPlating,
13674 #[serde(rename = "SHIP_PARTS")]
13675 ShipParts,
13676 #[serde(rename = "EQUIPMENT")]
13677 Equipment,
13678 #[serde(rename = "FUEL")]
13679 Fuel,
13680 #[serde(rename = "MEDICINE")]
13681 Medicine,
13682 #[serde(rename = "DRUGS")]
13683 Drugs,
13684 #[serde(rename = "CLOTHING")]
13685 Clothing,
13686 #[serde(rename = "MICROPROCESSORS")]
13687 Microprocessors,
13688 #[serde(rename = "PLASTICS")]
13689 Plastics,
13690 #[serde(rename = "POLYNUCLEOTIDES")]
13691 Polynucleotides,
13692 #[serde(rename = "BIOCOMPOSITES")]
13693 Biocomposites,
13694 #[serde(rename = "QUANTUM_STABILIZERS")]
13695 QuantumStabilizers,
13696 #[serde(rename = "NANOBOTS")]
13697 Nanobots,
13698 #[serde(rename = "AI_MAINFRAMES")]
13699 AiMainframes,
13700 #[serde(rename = "QUANTUM_DRIVES")]
13701 QuantumDrives,
13702 #[serde(rename = "ROBOTIC_DRONES")]
13703 RoboticDrones,
13704 #[serde(rename = "CYBER_IMPLANTS")]
13705 CyberImplants,
13706 #[serde(rename = "GENE_THERAPEUTICS")]
13707 GeneTherapeutics,
13708 #[serde(rename = "NEURAL_CHIPS")]
13709 NeuralChips,
13710 #[serde(rename = "MOOD_REGULATORS")]
13711 MoodRegulators,
13712 #[serde(rename = "VIRAL_AGENTS")]
13713 ViralAgents,
13714 #[serde(rename = "MICRO_FUSION_GENERATORS")]
13715 MicroFusionGenerators,
13716 #[serde(rename = "SUPERGRAINS")]
13717 Supergrains,
13718 #[serde(rename = "LASER_RIFLES")]
13719 LaserRifles,
13720 #[serde(rename = "HOLOGRAPHICS")]
13721 Holographics,
13722 #[serde(rename = "SHIP_SALVAGE")]
13723 ShipSalvage,
13724 #[serde(rename = "RELIC_TECH")]
13725 RelicTech,
13726 #[serde(rename = "NOVEL_LIFEFORMS")]
13727 NovelLifeforms,
13728 #[serde(rename = "BOTANICAL_SPECIMENS")]
13729 BotanicalSpecimens,
13730 #[serde(rename = "CULTURAL_ARTIFACTS")]
13731 CulturalArtifacts,
13732 #[serde(rename = "FRAME_PROBE")]
13733 FrameProbe,
13734 #[serde(rename = "FRAME_DRONE")]
13735 FrameDrone,
13736 #[serde(rename = "FRAME_INTERCEPTOR")]
13737 FrameInterceptor,
13738 #[serde(rename = "FRAME_RACER")]
13739 FrameRacer,
13740 #[serde(rename = "FRAME_FIGHTER")]
13741 FrameFighter,
13742 #[serde(rename = "FRAME_FRIGATE")]
13743 FrameFrigate,
13744 #[serde(rename = "FRAME_SHUTTLE")]
13745 FrameShuttle,
13746 #[serde(rename = "FRAME_EXPLORER")]
13747 FrameExplorer,
13748 #[serde(rename = "FRAME_MINER")]
13749 FrameMiner,
13750 #[serde(rename = "FRAME_LIGHT_FREIGHTER")]
13751 FrameLightFreighter,
13752 #[serde(rename = "FRAME_HEAVY_FREIGHTER")]
13753 FrameHeavyFreighter,
13754 #[serde(rename = "FRAME_TRANSPORT")]
13755 FrameTransport,
13756 #[serde(rename = "FRAME_DESTROYER")]
13757 FrameDestroyer,
13758 #[serde(rename = "FRAME_CRUISER")]
13759 FrameCruiser,
13760 #[serde(rename = "FRAME_CARRIER")]
13761 FrameCarrier,
13762 #[serde(rename = "FRAME_BULK_FREIGHTER")]
13763 FrameBulkFreighter,
13764 #[serde(rename = "REACTOR_SOLAR_I")]
13765 ReactorSolarI,
13766 #[serde(rename = "REACTOR_FUSION_I")]
13767 ReactorFusionI,
13768 #[serde(rename = "REACTOR_FISSION_I")]
13769 ReactorFissionI,
13770 #[serde(rename = "REACTOR_CHEMICAL_I")]
13771 ReactorChemicalI,
13772 #[serde(rename = "REACTOR_ANTIMATTER_I")]
13773 ReactorAntimatterI,
13774 #[serde(rename = "ENGINE_IMPULSE_DRIVE_I")]
13775 EngineImpulseDriveI,
13776 #[serde(rename = "ENGINE_ION_DRIVE_I")]
13777 EngineIonDriveI,
13778 #[serde(rename = "ENGINE_ION_DRIVE_II")]
13779 EngineIonDriveIi,
13780 #[serde(rename = "ENGINE_HYPER_DRIVE_I")]
13781 EngineHyperDriveI,
13782 #[serde(rename = "MODULE_MINERAL_PROCESSOR_I")]
13783 ModuleMineralProcessorI,
13784 #[serde(rename = "MODULE_GAS_PROCESSOR_I")]
13785 ModuleGasProcessorI,
13786 #[serde(rename = "MODULE_CARGO_HOLD_I")]
13787 ModuleCargoHoldI,
13788 #[serde(rename = "MODULE_CARGO_HOLD_II")]
13789 ModuleCargoHoldIi,
13790 #[serde(rename = "MODULE_CARGO_HOLD_III")]
13791 ModuleCargoHoldIii,
13792 #[serde(rename = "MODULE_CREW_QUARTERS_I")]
13793 ModuleCrewQuartersI,
13794 #[serde(rename = "MODULE_ENVOY_QUARTERS_I")]
13795 ModuleEnvoyQuartersI,
13796 #[serde(rename = "MODULE_PASSENGER_CABIN_I")]
13797 ModulePassengerCabinI,
13798 #[serde(rename = "MODULE_MICRO_REFINERY_I")]
13799 ModuleMicroRefineryI,
13800 #[serde(rename = "MODULE_SCIENCE_LAB_I")]
13801 ModuleScienceLabI,
13802 #[serde(rename = "MODULE_JUMP_DRIVE_I")]
13803 ModuleJumpDriveI,
13804 #[serde(rename = "MODULE_JUMP_DRIVE_II")]
13805 ModuleJumpDriveIi,
13806 #[serde(rename = "MODULE_JUMP_DRIVE_III")]
13807 ModuleJumpDriveIii,
13808 #[serde(rename = "MODULE_WARP_DRIVE_I")]
13809 ModuleWarpDriveI,
13810 #[serde(rename = "MODULE_WARP_DRIVE_II")]
13811 ModuleWarpDriveIi,
13812 #[serde(rename = "MODULE_WARP_DRIVE_III")]
13813 ModuleWarpDriveIii,
13814 #[serde(rename = "MODULE_SHIELD_GENERATOR_I")]
13815 ModuleShieldGeneratorI,
13816 #[serde(rename = "MODULE_SHIELD_GENERATOR_II")]
13817 ModuleShieldGeneratorIi,
13818 #[serde(rename = "MODULE_ORE_REFINERY_I")]
13819 ModuleOreRefineryI,
13820 #[serde(rename = "MODULE_FUEL_REFINERY_I")]
13821 ModuleFuelRefineryI,
13822 #[serde(rename = "MOUNT_GAS_SIPHON_I")]
13823 MountGasSiphonI,
13824 #[serde(rename = "MOUNT_GAS_SIPHON_II")]
13825 MountGasSiphonIi,
13826 #[serde(rename = "MOUNT_GAS_SIPHON_III")]
13827 MountGasSiphonIii,
13828 #[serde(rename = "MOUNT_SURVEYOR_I")]
13829 MountSurveyorI,
13830 #[serde(rename = "MOUNT_SURVEYOR_II")]
13831 MountSurveyorIi,
13832 #[serde(rename = "MOUNT_SURVEYOR_III")]
13833 MountSurveyorIii,
13834 #[serde(rename = "MOUNT_SENSOR_ARRAY_I")]
13835 MountSensorArrayI,
13836 #[serde(rename = "MOUNT_SENSOR_ARRAY_II")]
13837 MountSensorArrayIi,
13838 #[serde(rename = "MOUNT_SENSOR_ARRAY_III")]
13839 MountSensorArrayIii,
13840 #[serde(rename = "MOUNT_MINING_LASER_I")]
13841 MountMiningLaserI,
13842 #[serde(rename = "MOUNT_MINING_LASER_II")]
13843 MountMiningLaserIi,
13844 #[serde(rename = "MOUNT_MINING_LASER_III")]
13845 MountMiningLaserIii,
13846 #[serde(rename = "MOUNT_LASER_CANNON_I")]
13847 MountLaserCannonI,
13848 #[serde(rename = "MOUNT_MISSILE_LAUNCHER_I")]
13849 MountMissileLauncherI,
13850 #[serde(rename = "MOUNT_TURRET_I")]
13851 MountTurretI,
13852 #[serde(rename = "SHIP_PROBE")]
13853 ShipProbe,
13854 #[serde(rename = "SHIP_MINING_DRONE")]
13855 ShipMiningDrone,
13856 #[serde(rename = "SHIP_SIPHON_DRONE")]
13857 ShipSiphonDrone,
13858 #[serde(rename = "SHIP_INTERCEPTOR")]
13859 ShipInterceptor,
13860 #[serde(rename = "SHIP_LIGHT_HAULER")]
13861 ShipLightHauler,
13862 #[serde(rename = "SHIP_COMMAND_FRIGATE")]
13863 ShipCommandFrigate,
13864 #[serde(rename = "SHIP_EXPLORER")]
13865 ShipExplorer,
13866 #[serde(rename = "SHIP_HEAVY_FREIGHTER")]
13867 ShipHeavyFreighter,
13868 #[serde(rename = "SHIP_LIGHT_SHUTTLE")]
13869 ShipLightShuttle,
13870 #[serde(rename = "SHIP_ORE_HOUND")]
13871 ShipOreHound,
13872 #[serde(rename = "SHIP_REFINING_FREIGHTER")]
13873 ShipRefiningFreighter,
13874 #[serde(rename = "SHIP_SURVEYOR")]
13875 ShipSurveyor,
13876 #[serde(rename = "SHIP_BULK_FREIGHTER")]
13877 ShipBulkFreighter,
13878 }
13879 impl ::std::fmt::Display for TradeSymbol {
13880 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13881 match *self {
13882 Self::PreciousStones => f.write_str("PRECIOUS_STONES"),
13883 Self::QuartzSand => f.write_str("QUARTZ_SAND"),
13884 Self::SiliconCrystals => f.write_str("SILICON_CRYSTALS"),
13885 Self::AmmoniaIce => f.write_str("AMMONIA_ICE"),
13886 Self::LiquidHydrogen => f.write_str("LIQUID_HYDROGEN"),
13887 Self::LiquidNitrogen => f.write_str("LIQUID_NITROGEN"),
13888 Self::IceWater => f.write_str("ICE_WATER"),
13889 Self::ExoticMatter => f.write_str("EXOTIC_MATTER"),
13890 Self::AdvancedCircuitry => f.write_str("ADVANCED_CIRCUITRY"),
13891 Self::GravitonEmitters => f.write_str("GRAVITON_EMITTERS"),
13892 Self::Iron => f.write_str("IRON"),
13893 Self::IronOre => f.write_str("IRON_ORE"),
13894 Self::Copper => f.write_str("COPPER"),
13895 Self::CopperOre => f.write_str("COPPER_ORE"),
13896 Self::Aluminum => f.write_str("ALUMINUM"),
13897 Self::AluminumOre => f.write_str("ALUMINUM_ORE"),
13898 Self::Silver => f.write_str("SILVER"),
13899 Self::SilverOre => f.write_str("SILVER_ORE"),
13900 Self::Gold => f.write_str("GOLD"),
13901 Self::GoldOre => f.write_str("GOLD_ORE"),
13902 Self::Platinum => f.write_str("PLATINUM"),
13903 Self::PlatinumOre => f.write_str("PLATINUM_ORE"),
13904 Self::Diamonds => f.write_str("DIAMONDS"),
13905 Self::Uranite => f.write_str("URANITE"),
13906 Self::UraniteOre => f.write_str("URANITE_ORE"),
13907 Self::Meritium => f.write_str("MERITIUM"),
13908 Self::MeritiumOre => f.write_str("MERITIUM_ORE"),
13909 Self::Hydrocarbon => f.write_str("HYDROCARBON"),
13910 Self::Antimatter => f.write_str("ANTIMATTER"),
13911 Self::FabMats => f.write_str("FAB_MATS"),
13912 Self::Fertilizers => f.write_str("FERTILIZERS"),
13913 Self::Fabrics => f.write_str("FABRICS"),
13914 Self::Food => f.write_str("FOOD"),
13915 Self::Jewelry => f.write_str("JEWELRY"),
13916 Self::Machinery => f.write_str("MACHINERY"),
13917 Self::Firearms => f.write_str("FIREARMS"),
13918 Self::AssaultRifles => f.write_str("ASSAULT_RIFLES"),
13919 Self::MilitaryEquipment => f.write_str("MILITARY_EQUIPMENT"),
13920 Self::Explosives => f.write_str("EXPLOSIVES"),
13921 Self::LabInstruments => f.write_str("LAB_INSTRUMENTS"),
13922 Self::Ammunition => f.write_str("AMMUNITION"),
13923 Self::Electronics => f.write_str("ELECTRONICS"),
13924 Self::ShipPlating => f.write_str("SHIP_PLATING"),
13925 Self::ShipParts => f.write_str("SHIP_PARTS"),
13926 Self::Equipment => f.write_str("EQUIPMENT"),
13927 Self::Fuel => f.write_str("FUEL"),
13928 Self::Medicine => f.write_str("MEDICINE"),
13929 Self::Drugs => f.write_str("DRUGS"),
13930 Self::Clothing => f.write_str("CLOTHING"),
13931 Self::Microprocessors => f.write_str("MICROPROCESSORS"),
13932 Self::Plastics => f.write_str("PLASTICS"),
13933 Self::Polynucleotides => f.write_str("POLYNUCLEOTIDES"),
13934 Self::Biocomposites => f.write_str("BIOCOMPOSITES"),
13935 Self::QuantumStabilizers => f.write_str("QUANTUM_STABILIZERS"),
13936 Self::Nanobots => f.write_str("NANOBOTS"),
13937 Self::AiMainframes => f.write_str("AI_MAINFRAMES"),
13938 Self::QuantumDrives => f.write_str("QUANTUM_DRIVES"),
13939 Self::RoboticDrones => f.write_str("ROBOTIC_DRONES"),
13940 Self::CyberImplants => f.write_str("CYBER_IMPLANTS"),
13941 Self::GeneTherapeutics => f.write_str("GENE_THERAPEUTICS"),
13942 Self::NeuralChips => f.write_str("NEURAL_CHIPS"),
13943 Self::MoodRegulators => f.write_str("MOOD_REGULATORS"),
13944 Self::ViralAgents => f.write_str("VIRAL_AGENTS"),
13945 Self::MicroFusionGenerators => f.write_str("MICRO_FUSION_GENERATORS"),
13946 Self::Supergrains => f.write_str("SUPERGRAINS"),
13947 Self::LaserRifles => f.write_str("LASER_RIFLES"),
13948 Self::Holographics => f.write_str("HOLOGRAPHICS"),
13949 Self::ShipSalvage => f.write_str("SHIP_SALVAGE"),
13950 Self::RelicTech => f.write_str("RELIC_TECH"),
13951 Self::NovelLifeforms => f.write_str("NOVEL_LIFEFORMS"),
13952 Self::BotanicalSpecimens => f.write_str("BOTANICAL_SPECIMENS"),
13953 Self::CulturalArtifacts => f.write_str("CULTURAL_ARTIFACTS"),
13954 Self::FrameProbe => f.write_str("FRAME_PROBE"),
13955 Self::FrameDrone => f.write_str("FRAME_DRONE"),
13956 Self::FrameInterceptor => f.write_str("FRAME_INTERCEPTOR"),
13957 Self::FrameRacer => f.write_str("FRAME_RACER"),
13958 Self::FrameFighter => f.write_str("FRAME_FIGHTER"),
13959 Self::FrameFrigate => f.write_str("FRAME_FRIGATE"),
13960 Self::FrameShuttle => f.write_str("FRAME_SHUTTLE"),
13961 Self::FrameExplorer => f.write_str("FRAME_EXPLORER"),
13962 Self::FrameMiner => f.write_str("FRAME_MINER"),
13963 Self::FrameLightFreighter => f.write_str("FRAME_LIGHT_FREIGHTER"),
13964 Self::FrameHeavyFreighter => f.write_str("FRAME_HEAVY_FREIGHTER"),
13965 Self::FrameTransport => f.write_str("FRAME_TRANSPORT"),
13966 Self::FrameDestroyer => f.write_str("FRAME_DESTROYER"),
13967 Self::FrameCruiser => f.write_str("FRAME_CRUISER"),
13968 Self::FrameCarrier => f.write_str("FRAME_CARRIER"),
13969 Self::FrameBulkFreighter => f.write_str("FRAME_BULK_FREIGHTER"),
13970 Self::ReactorSolarI => f.write_str("REACTOR_SOLAR_I"),
13971 Self::ReactorFusionI => f.write_str("REACTOR_FUSION_I"),
13972 Self::ReactorFissionI => f.write_str("REACTOR_FISSION_I"),
13973 Self::ReactorChemicalI => f.write_str("REACTOR_CHEMICAL_I"),
13974 Self::ReactorAntimatterI => f.write_str("REACTOR_ANTIMATTER_I"),
13975 Self::EngineImpulseDriveI => f.write_str("ENGINE_IMPULSE_DRIVE_I"),
13976 Self::EngineIonDriveI => f.write_str("ENGINE_ION_DRIVE_I"),
13977 Self::EngineIonDriveIi => f.write_str("ENGINE_ION_DRIVE_II"),
13978 Self::EngineHyperDriveI => f.write_str("ENGINE_HYPER_DRIVE_I"),
13979 Self::ModuleMineralProcessorI => {
13980 f.write_str("MODULE_MINERAL_PROCESSOR_I")
13981 }
13982 Self::ModuleGasProcessorI => f.write_str("MODULE_GAS_PROCESSOR_I"),
13983 Self::ModuleCargoHoldI => f.write_str("MODULE_CARGO_HOLD_I"),
13984 Self::ModuleCargoHoldIi => f.write_str("MODULE_CARGO_HOLD_II"),
13985 Self::ModuleCargoHoldIii => f.write_str("MODULE_CARGO_HOLD_III"),
13986 Self::ModuleCrewQuartersI => f.write_str("MODULE_CREW_QUARTERS_I"),
13987 Self::ModuleEnvoyQuartersI => f.write_str("MODULE_ENVOY_QUARTERS_I"),
13988 Self::ModulePassengerCabinI => f.write_str("MODULE_PASSENGER_CABIN_I"),
13989 Self::ModuleMicroRefineryI => f.write_str("MODULE_MICRO_REFINERY_I"),
13990 Self::ModuleScienceLabI => f.write_str("MODULE_SCIENCE_LAB_I"),
13991 Self::ModuleJumpDriveI => f.write_str("MODULE_JUMP_DRIVE_I"),
13992 Self::ModuleJumpDriveIi => f.write_str("MODULE_JUMP_DRIVE_II"),
13993 Self::ModuleJumpDriveIii => f.write_str("MODULE_JUMP_DRIVE_III"),
13994 Self::ModuleWarpDriveI => f.write_str("MODULE_WARP_DRIVE_I"),
13995 Self::ModuleWarpDriveIi => f.write_str("MODULE_WARP_DRIVE_II"),
13996 Self::ModuleWarpDriveIii => f.write_str("MODULE_WARP_DRIVE_III"),
13997 Self::ModuleShieldGeneratorI => f.write_str("MODULE_SHIELD_GENERATOR_I"),
13998 Self::ModuleShieldGeneratorIi => {
13999 f.write_str("MODULE_SHIELD_GENERATOR_II")
14000 }
14001 Self::ModuleOreRefineryI => f.write_str("MODULE_ORE_REFINERY_I"),
14002 Self::ModuleFuelRefineryI => f.write_str("MODULE_FUEL_REFINERY_I"),
14003 Self::MountGasSiphonI => f.write_str("MOUNT_GAS_SIPHON_I"),
14004 Self::MountGasSiphonIi => f.write_str("MOUNT_GAS_SIPHON_II"),
14005 Self::MountGasSiphonIii => f.write_str("MOUNT_GAS_SIPHON_III"),
14006 Self::MountSurveyorI => f.write_str("MOUNT_SURVEYOR_I"),
14007 Self::MountSurveyorIi => f.write_str("MOUNT_SURVEYOR_II"),
14008 Self::MountSurveyorIii => f.write_str("MOUNT_SURVEYOR_III"),
14009 Self::MountSensorArrayI => f.write_str("MOUNT_SENSOR_ARRAY_I"),
14010 Self::MountSensorArrayIi => f.write_str("MOUNT_SENSOR_ARRAY_II"),
14011 Self::MountSensorArrayIii => f.write_str("MOUNT_SENSOR_ARRAY_III"),
14012 Self::MountMiningLaserI => f.write_str("MOUNT_MINING_LASER_I"),
14013 Self::MountMiningLaserIi => f.write_str("MOUNT_MINING_LASER_II"),
14014 Self::MountMiningLaserIii => f.write_str("MOUNT_MINING_LASER_III"),
14015 Self::MountLaserCannonI => f.write_str("MOUNT_LASER_CANNON_I"),
14016 Self::MountMissileLauncherI => f.write_str("MOUNT_MISSILE_LAUNCHER_I"),
14017 Self::MountTurretI => f.write_str("MOUNT_TURRET_I"),
14018 Self::ShipProbe => f.write_str("SHIP_PROBE"),
14019 Self::ShipMiningDrone => f.write_str("SHIP_MINING_DRONE"),
14020 Self::ShipSiphonDrone => f.write_str("SHIP_SIPHON_DRONE"),
14021 Self::ShipInterceptor => f.write_str("SHIP_INTERCEPTOR"),
14022 Self::ShipLightHauler => f.write_str("SHIP_LIGHT_HAULER"),
14023 Self::ShipCommandFrigate => f.write_str("SHIP_COMMAND_FRIGATE"),
14024 Self::ShipExplorer => f.write_str("SHIP_EXPLORER"),
14025 Self::ShipHeavyFreighter => f.write_str("SHIP_HEAVY_FREIGHTER"),
14026 Self::ShipLightShuttle => f.write_str("SHIP_LIGHT_SHUTTLE"),
14027 Self::ShipOreHound => f.write_str("SHIP_ORE_HOUND"),
14028 Self::ShipRefiningFreighter => f.write_str("SHIP_REFINING_FREIGHTER"),
14029 Self::ShipSurveyor => f.write_str("SHIP_SURVEYOR"),
14030 Self::ShipBulkFreighter => f.write_str("SHIP_BULK_FREIGHTER"),
14031 }
14032 }
14033 }
14034 impl ::std::str::FromStr for TradeSymbol {
14035 type Err = self::error::ConversionError;
14036 fn from_str(
14037 value: &str,
14038 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14039 match value {
14040 "PRECIOUS_STONES" => Ok(Self::PreciousStones),
14041 "QUARTZ_SAND" => Ok(Self::QuartzSand),
14042 "SILICON_CRYSTALS" => Ok(Self::SiliconCrystals),
14043 "AMMONIA_ICE" => Ok(Self::AmmoniaIce),
14044 "LIQUID_HYDROGEN" => Ok(Self::LiquidHydrogen),
14045 "LIQUID_NITROGEN" => Ok(Self::LiquidNitrogen),
14046 "ICE_WATER" => Ok(Self::IceWater),
14047 "EXOTIC_MATTER" => Ok(Self::ExoticMatter),
14048 "ADVANCED_CIRCUITRY" => Ok(Self::AdvancedCircuitry),
14049 "GRAVITON_EMITTERS" => Ok(Self::GravitonEmitters),
14050 "IRON" => Ok(Self::Iron),
14051 "IRON_ORE" => Ok(Self::IronOre),
14052 "COPPER" => Ok(Self::Copper),
14053 "COPPER_ORE" => Ok(Self::CopperOre),
14054 "ALUMINUM" => Ok(Self::Aluminum),
14055 "ALUMINUM_ORE" => Ok(Self::AluminumOre),
14056 "SILVER" => Ok(Self::Silver),
14057 "SILVER_ORE" => Ok(Self::SilverOre),
14058 "GOLD" => Ok(Self::Gold),
14059 "GOLD_ORE" => Ok(Self::GoldOre),
14060 "PLATINUM" => Ok(Self::Platinum),
14061 "PLATINUM_ORE" => Ok(Self::PlatinumOre),
14062 "DIAMONDS" => Ok(Self::Diamonds),
14063 "URANITE" => Ok(Self::Uranite),
14064 "URANITE_ORE" => Ok(Self::UraniteOre),
14065 "MERITIUM" => Ok(Self::Meritium),
14066 "MERITIUM_ORE" => Ok(Self::MeritiumOre),
14067 "HYDROCARBON" => Ok(Self::Hydrocarbon),
14068 "ANTIMATTER" => Ok(Self::Antimatter),
14069 "FAB_MATS" => Ok(Self::FabMats),
14070 "FERTILIZERS" => Ok(Self::Fertilizers),
14071 "FABRICS" => Ok(Self::Fabrics),
14072 "FOOD" => Ok(Self::Food),
14073 "JEWELRY" => Ok(Self::Jewelry),
14074 "MACHINERY" => Ok(Self::Machinery),
14075 "FIREARMS" => Ok(Self::Firearms),
14076 "ASSAULT_RIFLES" => Ok(Self::AssaultRifles),
14077 "MILITARY_EQUIPMENT" => Ok(Self::MilitaryEquipment),
14078 "EXPLOSIVES" => Ok(Self::Explosives),
14079 "LAB_INSTRUMENTS" => Ok(Self::LabInstruments),
14080 "AMMUNITION" => Ok(Self::Ammunition),
14081 "ELECTRONICS" => Ok(Self::Electronics),
14082 "SHIP_PLATING" => Ok(Self::ShipPlating),
14083 "SHIP_PARTS" => Ok(Self::ShipParts),
14084 "EQUIPMENT" => Ok(Self::Equipment),
14085 "FUEL" => Ok(Self::Fuel),
14086 "MEDICINE" => Ok(Self::Medicine),
14087 "DRUGS" => Ok(Self::Drugs),
14088 "CLOTHING" => Ok(Self::Clothing),
14089 "MICROPROCESSORS" => Ok(Self::Microprocessors),
14090 "PLASTICS" => Ok(Self::Plastics),
14091 "POLYNUCLEOTIDES" => Ok(Self::Polynucleotides),
14092 "BIOCOMPOSITES" => Ok(Self::Biocomposites),
14093 "QUANTUM_STABILIZERS" => Ok(Self::QuantumStabilizers),
14094 "NANOBOTS" => Ok(Self::Nanobots),
14095 "AI_MAINFRAMES" => Ok(Self::AiMainframes),
14096 "QUANTUM_DRIVES" => Ok(Self::QuantumDrives),
14097 "ROBOTIC_DRONES" => Ok(Self::RoboticDrones),
14098 "CYBER_IMPLANTS" => Ok(Self::CyberImplants),
14099 "GENE_THERAPEUTICS" => Ok(Self::GeneTherapeutics),
14100 "NEURAL_CHIPS" => Ok(Self::NeuralChips),
14101 "MOOD_REGULATORS" => Ok(Self::MoodRegulators),
14102 "VIRAL_AGENTS" => Ok(Self::ViralAgents),
14103 "MICRO_FUSION_GENERATORS" => Ok(Self::MicroFusionGenerators),
14104 "SUPERGRAINS" => Ok(Self::Supergrains),
14105 "LASER_RIFLES" => Ok(Self::LaserRifles),
14106 "HOLOGRAPHICS" => Ok(Self::Holographics),
14107 "SHIP_SALVAGE" => Ok(Self::ShipSalvage),
14108 "RELIC_TECH" => Ok(Self::RelicTech),
14109 "NOVEL_LIFEFORMS" => Ok(Self::NovelLifeforms),
14110 "BOTANICAL_SPECIMENS" => Ok(Self::BotanicalSpecimens),
14111 "CULTURAL_ARTIFACTS" => Ok(Self::CulturalArtifacts),
14112 "FRAME_PROBE" => Ok(Self::FrameProbe),
14113 "FRAME_DRONE" => Ok(Self::FrameDrone),
14114 "FRAME_INTERCEPTOR" => Ok(Self::FrameInterceptor),
14115 "FRAME_RACER" => Ok(Self::FrameRacer),
14116 "FRAME_FIGHTER" => Ok(Self::FrameFighter),
14117 "FRAME_FRIGATE" => Ok(Self::FrameFrigate),
14118 "FRAME_SHUTTLE" => Ok(Self::FrameShuttle),
14119 "FRAME_EXPLORER" => Ok(Self::FrameExplorer),
14120 "FRAME_MINER" => Ok(Self::FrameMiner),
14121 "FRAME_LIGHT_FREIGHTER" => Ok(Self::FrameLightFreighter),
14122 "FRAME_HEAVY_FREIGHTER" => Ok(Self::FrameHeavyFreighter),
14123 "FRAME_TRANSPORT" => Ok(Self::FrameTransport),
14124 "FRAME_DESTROYER" => Ok(Self::FrameDestroyer),
14125 "FRAME_CRUISER" => Ok(Self::FrameCruiser),
14126 "FRAME_CARRIER" => Ok(Self::FrameCarrier),
14127 "FRAME_BULK_FREIGHTER" => Ok(Self::FrameBulkFreighter),
14128 "REACTOR_SOLAR_I" => Ok(Self::ReactorSolarI),
14129 "REACTOR_FUSION_I" => Ok(Self::ReactorFusionI),
14130 "REACTOR_FISSION_I" => Ok(Self::ReactorFissionI),
14131 "REACTOR_CHEMICAL_I" => Ok(Self::ReactorChemicalI),
14132 "REACTOR_ANTIMATTER_I" => Ok(Self::ReactorAntimatterI),
14133 "ENGINE_IMPULSE_DRIVE_I" => Ok(Self::EngineImpulseDriveI),
14134 "ENGINE_ION_DRIVE_I" => Ok(Self::EngineIonDriveI),
14135 "ENGINE_ION_DRIVE_II" => Ok(Self::EngineIonDriveIi),
14136 "ENGINE_HYPER_DRIVE_I" => Ok(Self::EngineHyperDriveI),
14137 "MODULE_MINERAL_PROCESSOR_I" => Ok(Self::ModuleMineralProcessorI),
14138 "MODULE_GAS_PROCESSOR_I" => Ok(Self::ModuleGasProcessorI),
14139 "MODULE_CARGO_HOLD_I" => Ok(Self::ModuleCargoHoldI),
14140 "MODULE_CARGO_HOLD_II" => Ok(Self::ModuleCargoHoldIi),
14141 "MODULE_CARGO_HOLD_III" => Ok(Self::ModuleCargoHoldIii),
14142 "MODULE_CREW_QUARTERS_I" => Ok(Self::ModuleCrewQuartersI),
14143 "MODULE_ENVOY_QUARTERS_I" => Ok(Self::ModuleEnvoyQuartersI),
14144 "MODULE_PASSENGER_CABIN_I" => Ok(Self::ModulePassengerCabinI),
14145 "MODULE_MICRO_REFINERY_I" => Ok(Self::ModuleMicroRefineryI),
14146 "MODULE_SCIENCE_LAB_I" => Ok(Self::ModuleScienceLabI),
14147 "MODULE_JUMP_DRIVE_I" => Ok(Self::ModuleJumpDriveI),
14148 "MODULE_JUMP_DRIVE_II" => Ok(Self::ModuleJumpDriveIi),
14149 "MODULE_JUMP_DRIVE_III" => Ok(Self::ModuleJumpDriveIii),
14150 "MODULE_WARP_DRIVE_I" => Ok(Self::ModuleWarpDriveI),
14151 "MODULE_WARP_DRIVE_II" => Ok(Self::ModuleWarpDriveIi),
14152 "MODULE_WARP_DRIVE_III" => Ok(Self::ModuleWarpDriveIii),
14153 "MODULE_SHIELD_GENERATOR_I" => Ok(Self::ModuleShieldGeneratorI),
14154 "MODULE_SHIELD_GENERATOR_II" => Ok(Self::ModuleShieldGeneratorIi),
14155 "MODULE_ORE_REFINERY_I" => Ok(Self::ModuleOreRefineryI),
14156 "MODULE_FUEL_REFINERY_I" => Ok(Self::ModuleFuelRefineryI),
14157 "MOUNT_GAS_SIPHON_I" => Ok(Self::MountGasSiphonI),
14158 "MOUNT_GAS_SIPHON_II" => Ok(Self::MountGasSiphonIi),
14159 "MOUNT_GAS_SIPHON_III" => Ok(Self::MountGasSiphonIii),
14160 "MOUNT_SURVEYOR_I" => Ok(Self::MountSurveyorI),
14161 "MOUNT_SURVEYOR_II" => Ok(Self::MountSurveyorIi),
14162 "MOUNT_SURVEYOR_III" => Ok(Self::MountSurveyorIii),
14163 "MOUNT_SENSOR_ARRAY_I" => Ok(Self::MountSensorArrayI),
14164 "MOUNT_SENSOR_ARRAY_II" => Ok(Self::MountSensorArrayIi),
14165 "MOUNT_SENSOR_ARRAY_III" => Ok(Self::MountSensorArrayIii),
14166 "MOUNT_MINING_LASER_I" => Ok(Self::MountMiningLaserI),
14167 "MOUNT_MINING_LASER_II" => Ok(Self::MountMiningLaserIi),
14168 "MOUNT_MINING_LASER_III" => Ok(Self::MountMiningLaserIii),
14169 "MOUNT_LASER_CANNON_I" => Ok(Self::MountLaserCannonI),
14170 "MOUNT_MISSILE_LAUNCHER_I" => Ok(Self::MountMissileLauncherI),
14171 "MOUNT_TURRET_I" => Ok(Self::MountTurretI),
14172 "SHIP_PROBE" => Ok(Self::ShipProbe),
14173 "SHIP_MINING_DRONE" => Ok(Self::ShipMiningDrone),
14174 "SHIP_SIPHON_DRONE" => Ok(Self::ShipSiphonDrone),
14175 "SHIP_INTERCEPTOR" => Ok(Self::ShipInterceptor),
14176 "SHIP_LIGHT_HAULER" => Ok(Self::ShipLightHauler),
14177 "SHIP_COMMAND_FRIGATE" => Ok(Self::ShipCommandFrigate),
14178 "SHIP_EXPLORER" => Ok(Self::ShipExplorer),
14179 "SHIP_HEAVY_FREIGHTER" => Ok(Self::ShipHeavyFreighter),
14180 "SHIP_LIGHT_SHUTTLE" => Ok(Self::ShipLightShuttle),
14181 "SHIP_ORE_HOUND" => Ok(Self::ShipOreHound),
14182 "SHIP_REFINING_FREIGHTER" => Ok(Self::ShipRefiningFreighter),
14183 "SHIP_SURVEYOR" => Ok(Self::ShipSurveyor),
14184 "SHIP_BULK_FREIGHTER" => Ok(Self::ShipBulkFreighter),
14185 _ => Err("invalid value".into()),
14186 }
14187 }
14188 }
14189 impl ::std::convert::TryFrom<&str> for TradeSymbol {
14190 type Error = self::error::ConversionError;
14191 fn try_from(
14192 value: &str,
14193 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14194 value.parse()
14195 }
14196 }
14197 impl ::std::convert::TryFrom<&::std::string::String> for TradeSymbol {
14198 type Error = self::error::ConversionError;
14199 fn try_from(
14200 value: &::std::string::String,
14201 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14202 value.parse()
14203 }
14204 }
14205 impl ::std::convert::TryFrom<::std::string::String> for TradeSymbol {
14206 type Error = self::error::ConversionError;
14207 fn try_from(
14208 value: ::std::string::String,
14209 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14210 value.parse()
14211 }
14212 }
14213 ///Cargo transferred successfully.
14214 ///
14215 /// <details><summary>JSON schema</summary>
14216 ///
14217 /// ```json
14218 ///{
14219 /// "title": "Transfer Cargo 200 Response",
14220 /// "description": "Cargo transferred successfully.",
14221 /// "type": "object",
14222 /// "required": [
14223 /// "data"
14224 /// ],
14225 /// "properties": {
14226 /// "data": {
14227 /// "type": "object",
14228 /// "required": [
14229 /// "cargo",
14230 /// "targetCargo"
14231 /// ],
14232 /// "properties": {
14233 /// "cargo": {
14234 /// "$ref": "#/components/schemas/ShipCargo"
14235 /// },
14236 /// "targetCargo": {
14237 /// "$ref": "#/components/schemas/ShipCargo"
14238 /// }
14239 /// }
14240 /// }
14241 /// }
14242 ///}
14243 /// ```
14244 /// </details>
14245 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14246 pub struct TransferCargo200Response {
14247 pub data: TransferCargo200ResponseData,
14248 }
14249 ///`TransferCargo200ResponseData`
14250 ///
14251 /// <details><summary>JSON schema</summary>
14252 ///
14253 /// ```json
14254 ///{
14255 /// "type": "object",
14256 /// "required": [
14257 /// "cargo",
14258 /// "targetCargo"
14259 /// ],
14260 /// "properties": {
14261 /// "cargo": {
14262 /// "$ref": "#/components/schemas/ShipCargo"
14263 /// },
14264 /// "targetCargo": {
14265 /// "$ref": "#/components/schemas/ShipCargo"
14266 /// }
14267 /// }
14268 ///}
14269 /// ```
14270 /// </details>
14271 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14272 pub struct TransferCargo200ResponseData {
14273 pub cargo: ShipCargo,
14274 #[serde(rename = "targetCargo")]
14275 pub target_cargo: ShipCargo,
14276 }
14277 ///`TransferCargoRequest`
14278 ///
14279 /// <details><summary>JSON schema</summary>
14280 ///
14281 /// ```json
14282 ///{
14283 /// "title": "Transfer Cargo Request",
14284 /// "type": "object",
14285 /// "required": [
14286 /// "shipSymbol",
14287 /// "tradeSymbol",
14288 /// "units"
14289 /// ],
14290 /// "properties": {
14291 /// "shipSymbol": {
14292 /// "description": "The symbol of the ship to transfer to.",
14293 /// "type": "string"
14294 /// },
14295 /// "tradeSymbol": {
14296 /// "$ref": "#/components/schemas/TradeSymbol"
14297 /// },
14298 /// "units": {
14299 /// "description": "Amount of units to transfer.",
14300 /// "type": "integer",
14301 /// "minimum": 1.0
14302 /// }
14303 /// }
14304 ///}
14305 /// ```
14306 /// </details>
14307 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14308 pub struct TransferCargoRequest {
14309 ///The symbol of the ship to transfer to.
14310 #[serde(rename = "shipSymbol")]
14311 pub ship_symbol: ::std::string::String,
14312 #[serde(rename = "tradeSymbol")]
14313 pub trade_symbol: TradeSymbol,
14314 ///Amount of units to transfer.
14315 pub units: ::std::num::NonZeroU64,
14316 }
14317 ///`WarpShipBody`
14318 ///
14319 /// <details><summary>JSON schema</summary>
14320 ///
14321 /// ```json
14322 ///{
14323 /// "type": "object",
14324 /// "required": [
14325 /// "waypointSymbol"
14326 /// ],
14327 /// "properties": {
14328 /// "waypointSymbol": {
14329 /// "description": "The symbol of the waypoint to navigate/warp to.",
14330 /// "type": "string",
14331 /// "minLength": 1
14332 /// }
14333 /// }
14334 ///}
14335 /// ```
14336 /// </details>
14337 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14338 pub struct WarpShipBody {
14339 ///The symbol of the waypoint to navigate/warp to.
14340 #[serde(rename = "waypointSymbol")]
14341 pub waypoint_symbol: WarpShipBodyWaypointSymbol,
14342 }
14343 ///The symbol of the waypoint to navigate/warp to.
14344 ///
14345 /// <details><summary>JSON schema</summary>
14346 ///
14347 /// ```json
14348 ///{
14349 /// "description": "The symbol of the waypoint to navigate/warp to.",
14350 /// "type": "string",
14351 /// "minLength": 1
14352 ///}
14353 /// ```
14354 /// </details>
14355 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14356 #[serde(transparent)]
14357 pub struct WarpShipBodyWaypointSymbol(::std::string::String);
14358 impl ::std::ops::Deref for WarpShipBodyWaypointSymbol {
14359 type Target = ::std::string::String;
14360 fn deref(&self) -> &::std::string::String {
14361 &self.0
14362 }
14363 }
14364 impl ::std::convert::From<WarpShipBodyWaypointSymbol> for ::std::string::String {
14365 fn from(value: WarpShipBodyWaypointSymbol) -> Self {
14366 value.0
14367 }
14368 }
14369 impl ::std::str::FromStr for WarpShipBodyWaypointSymbol {
14370 type Err = self::error::ConversionError;
14371 fn from_str(
14372 value: &str,
14373 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14374 if value.chars().count() < 1usize {
14375 return Err("shorter than 1 characters".into());
14376 }
14377 Ok(Self(value.to_string()))
14378 }
14379 }
14380 impl ::std::convert::TryFrom<&str> for WarpShipBodyWaypointSymbol {
14381 type Error = self::error::ConversionError;
14382 fn try_from(
14383 value: &str,
14384 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14385 value.parse()
14386 }
14387 }
14388 impl ::std::convert::TryFrom<&::std::string::String> for WarpShipBodyWaypointSymbol {
14389 type Error = self::error::ConversionError;
14390 fn try_from(
14391 value: &::std::string::String,
14392 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14393 value.parse()
14394 }
14395 }
14396 impl ::std::convert::TryFrom<::std::string::String> for WarpShipBodyWaypointSymbol {
14397 type Error = self::error::ConversionError;
14398 fn try_from(
14399 value: ::std::string::String,
14400 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14401 value.parse()
14402 }
14403 }
14404 impl<'de> ::serde::Deserialize<'de> for WarpShipBodyWaypointSymbol {
14405 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14406 where
14407 D: ::serde::Deserializer<'de>,
14408 {
14409 ::std::string::String::deserialize(deserializer)?
14410 .parse()
14411 .map_err(|e: self::error::ConversionError| {
14412 <D::Error as ::serde::de::Error>::custom(e.to_string())
14413 })
14414 }
14415 }
14416 ///The successful transit information including the route details and changes to ship fuel. The route includes the expected time of arrival.
14417 ///
14418 /// <details><summary>JSON schema</summary>
14419 ///
14420 /// ```json
14421 ///{
14422 /// "description": "The successful transit information including the route details and changes to ship fuel. The route includes the expected time of arrival.",
14423 /// "type": "object",
14424 /// "required": [
14425 /// "data"
14426 /// ],
14427 /// "properties": {
14428 /// "data": {
14429 /// "type": "object",
14430 /// "required": [
14431 /// "events",
14432 /// "fuel",
14433 /// "nav"
14434 /// ],
14435 /// "properties": {
14436 /// "events": {
14437 /// "type": "array",
14438 /// "items": {
14439 /// "$ref": "#/components/schemas/ShipConditionEvent"
14440 /// }
14441 /// },
14442 /// "fuel": {
14443 /// "$ref": "#/components/schemas/ShipFuel"
14444 /// },
14445 /// "nav": {
14446 /// "$ref": "#/components/schemas/ShipNav"
14447 /// }
14448 /// }
14449 /// }
14450 /// }
14451 ///}
14452 /// ```
14453 /// </details>
14454 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14455 pub struct WarpShipResponse {
14456 pub data: WarpShipResponseData,
14457 }
14458 ///`WarpShipResponseData`
14459 ///
14460 /// <details><summary>JSON schema</summary>
14461 ///
14462 /// ```json
14463 ///{
14464 /// "type": "object",
14465 /// "required": [
14466 /// "events",
14467 /// "fuel",
14468 /// "nav"
14469 /// ],
14470 /// "properties": {
14471 /// "events": {
14472 /// "type": "array",
14473 /// "items": {
14474 /// "$ref": "#/components/schemas/ShipConditionEvent"
14475 /// }
14476 /// },
14477 /// "fuel": {
14478 /// "$ref": "#/components/schemas/ShipFuel"
14479 /// },
14480 /// "nav": {
14481 /// "$ref": "#/components/schemas/ShipNav"
14482 /// }
14483 /// }
14484 ///}
14485 /// ```
14486 /// </details>
14487 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14488 pub struct WarpShipResponseData {
14489 pub events: ::std::vec::Vec<ShipConditionEvent>,
14490 pub fuel: ShipFuel,
14491 pub nav: ShipNav,
14492 }
14493 ///A waypoint is a location that ships can travel to such as a Planet, Moon or Space Station.
14494 ///
14495 /// <details><summary>JSON schema</summary>
14496 ///
14497 /// ```json
14498 ///{
14499 /// "description": "A waypoint is a location that ships can travel to such as a Planet, Moon or Space Station.",
14500 /// "type": "object",
14501 /// "required": [
14502 /// "isUnderConstruction",
14503 /// "orbitals",
14504 /// "symbol",
14505 /// "systemSymbol",
14506 /// "traits",
14507 /// "type",
14508 /// "x",
14509 /// "y"
14510 /// ],
14511 /// "properties": {
14512 /// "chart": {
14513 /// "$ref": "#/components/schemas/Chart"
14514 /// },
14515 /// "faction": {
14516 /// "$ref": "#/components/schemas/WaypointFaction"
14517 /// },
14518 /// "isUnderConstruction": {
14519 /// "description": "True if the waypoint is under construction.",
14520 /// "type": "boolean"
14521 /// },
14522 /// "modifiers": {
14523 /// "description": "The modifiers of the waypoint.",
14524 /// "type": "array",
14525 /// "items": {
14526 /// "$ref": "#/components/schemas/WaypointModifier"
14527 /// }
14528 /// },
14529 /// "orbitals": {
14530 /// "description": "Waypoints that orbit this waypoint.",
14531 /// "type": "array",
14532 /// "items": {
14533 /// "$ref": "#/components/schemas/WaypointOrbital"
14534 /// }
14535 /// },
14536 /// "orbits": {
14537 /// "description": "The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.",
14538 /// "type": "string",
14539 /// "minLength": 1
14540 /// },
14541 /// "symbol": {
14542 /// "$ref": "#/components/schemas/WaypointSymbol"
14543 /// },
14544 /// "systemSymbol": {
14545 /// "$ref": "#/components/schemas/SystemSymbol"
14546 /// },
14547 /// "traits": {
14548 /// "description": "The traits of the waypoint.",
14549 /// "type": "array",
14550 /// "items": {
14551 /// "$ref": "#/components/schemas/WaypointTrait"
14552 /// }
14553 /// },
14554 /// "type": {
14555 /// "$ref": "#/components/schemas/WaypointType"
14556 /// },
14557 /// "x": {
14558 /// "description": "Relative position of the waypoint on the system's x axis. This is not an absolute position in the universe.",
14559 /// "type": "integer"
14560 /// },
14561 /// "y": {
14562 /// "description": "Relative position of the waypoint on the system's y axis. This is not an absolute position in the universe.",
14563 /// "type": "integer"
14564 /// }
14565 /// }
14566 ///}
14567 /// ```
14568 /// </details>
14569 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14570 pub struct Waypoint {
14571 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14572 pub chart: ::std::option::Option<Chart>,
14573 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14574 pub faction: ::std::option::Option<WaypointFaction>,
14575 ///True if the waypoint is under construction.
14576 #[serde(rename = "isUnderConstruction")]
14577 pub is_under_construction: bool,
14578 ///The modifiers of the waypoint.
14579 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
14580 pub modifiers: ::std::vec::Vec<WaypointModifier>,
14581 ///Waypoints that orbit this waypoint.
14582 pub orbitals: ::std::vec::Vec<WaypointOrbital>,
14583 ///The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.
14584 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14585 pub orbits: ::std::option::Option<WaypointOrbits>,
14586 pub symbol: WaypointSymbol,
14587 #[serde(rename = "systemSymbol")]
14588 pub system_symbol: SystemSymbol,
14589 ///The traits of the waypoint.
14590 pub traits: ::std::vec::Vec<WaypointTrait>,
14591 #[serde(rename = "type")]
14592 pub type_: WaypointType,
14593 ///Relative position of the waypoint on the system's x axis. This is not an absolute position in the universe.
14594 pub x: i64,
14595 ///Relative position of the waypoint on the system's y axis. This is not an absolute position in the universe.
14596 pub y: i64,
14597 }
14598 ///The faction that controls the waypoint.
14599 ///
14600 /// <details><summary>JSON schema</summary>
14601 ///
14602 /// ```json
14603 ///{
14604 /// "description": "The faction that controls the waypoint.",
14605 /// "type": "object",
14606 /// "required": [
14607 /// "symbol"
14608 /// ],
14609 /// "properties": {
14610 /// "symbol": {
14611 /// "$ref": "#/components/schemas/FactionSymbol"
14612 /// }
14613 /// }
14614 ///}
14615 /// ```
14616 /// </details>
14617 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14618 pub struct WaypointFaction {
14619 pub symbol: FactionSymbol,
14620 }
14621 ///`WaypointModifier`
14622 ///
14623 /// <details><summary>JSON schema</summary>
14624 ///
14625 /// ```json
14626 ///{
14627 /// "type": "object",
14628 /// "required": [
14629 /// "description",
14630 /// "name",
14631 /// "symbol"
14632 /// ],
14633 /// "properties": {
14634 /// "description": {
14635 /// "description": "A description of the trait.",
14636 /// "type": "string"
14637 /// },
14638 /// "name": {
14639 /// "description": "The name of the trait.",
14640 /// "type": "string"
14641 /// },
14642 /// "symbol": {
14643 /// "$ref": "#/components/schemas/WaypointModifierSymbol"
14644 /// }
14645 /// }
14646 ///}
14647 /// ```
14648 /// </details>
14649 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14650 pub struct WaypointModifier {
14651 ///A description of the trait.
14652 pub description: ::std::string::String,
14653 ///The name of the trait.
14654 pub name: ::std::string::String,
14655 pub symbol: WaypointModifierSymbol,
14656 }
14657 ///The unique identifier of the modifier.
14658 ///
14659 /// <details><summary>JSON schema</summary>
14660 ///
14661 /// ```json
14662 ///{
14663 /// "title": "Waypoint Modifier Symbol",
14664 /// "description": "The unique identifier of the modifier.",
14665 /// "type": "string",
14666 /// "enum": [
14667 /// "STRIPPED",
14668 /// "UNSTABLE",
14669 /// "RADIATION_LEAK",
14670 /// "CRITICAL_LIMIT",
14671 /// "CIVIL_UNREST"
14672 /// ]
14673 ///}
14674 /// ```
14675 /// </details>
14676 #[derive(
14677 ::serde::Deserialize,
14678 ::serde::Serialize,
14679 Clone,
14680 Copy,
14681 Debug,
14682 Eq,
14683 Hash,
14684 Ord,
14685 PartialEq,
14686 PartialOrd
14687 )]
14688 pub enum WaypointModifierSymbol {
14689 #[serde(rename = "STRIPPED")]
14690 Stripped,
14691 #[serde(rename = "UNSTABLE")]
14692 Unstable,
14693 #[serde(rename = "RADIATION_LEAK")]
14694 RadiationLeak,
14695 #[serde(rename = "CRITICAL_LIMIT")]
14696 CriticalLimit,
14697 #[serde(rename = "CIVIL_UNREST")]
14698 CivilUnrest,
14699 }
14700 impl ::std::fmt::Display for WaypointModifierSymbol {
14701 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14702 match *self {
14703 Self::Stripped => f.write_str("STRIPPED"),
14704 Self::Unstable => f.write_str("UNSTABLE"),
14705 Self::RadiationLeak => f.write_str("RADIATION_LEAK"),
14706 Self::CriticalLimit => f.write_str("CRITICAL_LIMIT"),
14707 Self::CivilUnrest => f.write_str("CIVIL_UNREST"),
14708 }
14709 }
14710 }
14711 impl ::std::str::FromStr for WaypointModifierSymbol {
14712 type Err = self::error::ConversionError;
14713 fn from_str(
14714 value: &str,
14715 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14716 match value {
14717 "STRIPPED" => Ok(Self::Stripped),
14718 "UNSTABLE" => Ok(Self::Unstable),
14719 "RADIATION_LEAK" => Ok(Self::RadiationLeak),
14720 "CRITICAL_LIMIT" => Ok(Self::CriticalLimit),
14721 "CIVIL_UNREST" => Ok(Self::CivilUnrest),
14722 _ => Err("invalid value".into()),
14723 }
14724 }
14725 }
14726 impl ::std::convert::TryFrom<&str> for WaypointModifierSymbol {
14727 type Error = self::error::ConversionError;
14728 fn try_from(
14729 value: &str,
14730 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14731 value.parse()
14732 }
14733 }
14734 impl ::std::convert::TryFrom<&::std::string::String> for WaypointModifierSymbol {
14735 type Error = self::error::ConversionError;
14736 fn try_from(
14737 value: &::std::string::String,
14738 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14739 value.parse()
14740 }
14741 }
14742 impl ::std::convert::TryFrom<::std::string::String> for WaypointModifierSymbol {
14743 type Error = self::error::ConversionError;
14744 fn try_from(
14745 value: ::std::string::String,
14746 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14747 value.parse()
14748 }
14749 }
14750 ///An orbital is another waypoint that orbits a parent waypoint.
14751 ///
14752 /// <details><summary>JSON schema</summary>
14753 ///
14754 /// ```json
14755 ///{
14756 /// "description": "An orbital is another waypoint that orbits a parent waypoint.",
14757 /// "type": "object",
14758 /// "required": [
14759 /// "symbol"
14760 /// ],
14761 /// "properties": {
14762 /// "symbol": {
14763 /// "description": "The symbol of the orbiting waypoint.",
14764 /// "type": "string",
14765 /// "minLength": 1
14766 /// }
14767 /// }
14768 ///}
14769 /// ```
14770 /// </details>
14771 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14772 pub struct WaypointOrbital {
14773 ///The symbol of the orbiting waypoint.
14774 pub symbol: WaypointOrbitalSymbol,
14775 }
14776 ///The symbol of the orbiting waypoint.
14777 ///
14778 /// <details><summary>JSON schema</summary>
14779 ///
14780 /// ```json
14781 ///{
14782 /// "description": "The symbol of the orbiting waypoint.",
14783 /// "type": "string",
14784 /// "minLength": 1
14785 ///}
14786 /// ```
14787 /// </details>
14788 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14789 #[serde(transparent)]
14790 pub struct WaypointOrbitalSymbol(::std::string::String);
14791 impl ::std::ops::Deref for WaypointOrbitalSymbol {
14792 type Target = ::std::string::String;
14793 fn deref(&self) -> &::std::string::String {
14794 &self.0
14795 }
14796 }
14797 impl ::std::convert::From<WaypointOrbitalSymbol> for ::std::string::String {
14798 fn from(value: WaypointOrbitalSymbol) -> Self {
14799 value.0
14800 }
14801 }
14802 impl ::std::str::FromStr for WaypointOrbitalSymbol {
14803 type Err = self::error::ConversionError;
14804 fn from_str(
14805 value: &str,
14806 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14807 if value.chars().count() < 1usize {
14808 return Err("shorter than 1 characters".into());
14809 }
14810 Ok(Self(value.to_string()))
14811 }
14812 }
14813 impl ::std::convert::TryFrom<&str> for WaypointOrbitalSymbol {
14814 type Error = self::error::ConversionError;
14815 fn try_from(
14816 value: &str,
14817 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14818 value.parse()
14819 }
14820 }
14821 impl ::std::convert::TryFrom<&::std::string::String> for WaypointOrbitalSymbol {
14822 type Error = self::error::ConversionError;
14823 fn try_from(
14824 value: &::std::string::String,
14825 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14826 value.parse()
14827 }
14828 }
14829 impl ::std::convert::TryFrom<::std::string::String> for WaypointOrbitalSymbol {
14830 type Error = self::error::ConversionError;
14831 fn try_from(
14832 value: ::std::string::String,
14833 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14834 value.parse()
14835 }
14836 }
14837 impl<'de> ::serde::Deserialize<'de> for WaypointOrbitalSymbol {
14838 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14839 where
14840 D: ::serde::Deserializer<'de>,
14841 {
14842 ::std::string::String::deserialize(deserializer)?
14843 .parse()
14844 .map_err(|e: self::error::ConversionError| {
14845 <D::Error as ::serde::de::Error>::custom(e.to_string())
14846 })
14847 }
14848 }
14849 ///The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.
14850 ///
14851 /// <details><summary>JSON schema</summary>
14852 ///
14853 /// ```json
14854 ///{
14855 /// "description": "The symbol of the parent waypoint, if this waypoint is in orbit around another waypoint. Otherwise this value is undefined.",
14856 /// "type": "string",
14857 /// "minLength": 1
14858 ///}
14859 /// ```
14860 /// </details>
14861 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14862 #[serde(transparent)]
14863 pub struct WaypointOrbits(::std::string::String);
14864 impl ::std::ops::Deref for WaypointOrbits {
14865 type Target = ::std::string::String;
14866 fn deref(&self) -> &::std::string::String {
14867 &self.0
14868 }
14869 }
14870 impl ::std::convert::From<WaypointOrbits> for ::std::string::String {
14871 fn from(value: WaypointOrbits) -> Self {
14872 value.0
14873 }
14874 }
14875 impl ::std::str::FromStr for WaypointOrbits {
14876 type Err = self::error::ConversionError;
14877 fn from_str(
14878 value: &str,
14879 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14880 if value.chars().count() < 1usize {
14881 return Err("shorter than 1 characters".into());
14882 }
14883 Ok(Self(value.to_string()))
14884 }
14885 }
14886 impl ::std::convert::TryFrom<&str> for WaypointOrbits {
14887 type Error = self::error::ConversionError;
14888 fn try_from(
14889 value: &str,
14890 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14891 value.parse()
14892 }
14893 }
14894 impl ::std::convert::TryFrom<&::std::string::String> for WaypointOrbits {
14895 type Error = self::error::ConversionError;
14896 fn try_from(
14897 value: &::std::string::String,
14898 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14899 value.parse()
14900 }
14901 }
14902 impl ::std::convert::TryFrom<::std::string::String> for WaypointOrbits {
14903 type Error = self::error::ConversionError;
14904 fn try_from(
14905 value: ::std::string::String,
14906 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14907 value.parse()
14908 }
14909 }
14910 impl<'de> ::serde::Deserialize<'de> for WaypointOrbits {
14911 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14912 where
14913 D: ::serde::Deserializer<'de>,
14914 {
14915 ::std::string::String::deserialize(deserializer)?
14916 .parse()
14917 .map_err(|e: self::error::ConversionError| {
14918 <D::Error as ::serde::de::Error>::custom(e.to_string())
14919 })
14920 }
14921 }
14922 ///The symbol of the waypoint.
14923 ///
14924 /// <details><summary>JSON schema</summary>
14925 ///
14926 /// ```json
14927 ///{
14928 /// "description": "The symbol of the waypoint.",
14929 /// "type": "string",
14930 /// "minLength": 1
14931 ///}
14932 /// ```
14933 /// </details>
14934 #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14935 #[serde(transparent)]
14936 pub struct WaypointSymbol(::std::string::String);
14937 impl ::std::ops::Deref for WaypointSymbol {
14938 type Target = ::std::string::String;
14939 fn deref(&self) -> &::std::string::String {
14940 &self.0
14941 }
14942 }
14943 impl ::std::convert::From<WaypointSymbol> for ::std::string::String {
14944 fn from(value: WaypointSymbol) -> Self {
14945 value.0
14946 }
14947 }
14948 impl ::std::str::FromStr for WaypointSymbol {
14949 type Err = self::error::ConversionError;
14950 fn from_str(
14951 value: &str,
14952 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14953 if value.chars().count() < 1usize {
14954 return Err("shorter than 1 characters".into());
14955 }
14956 Ok(Self(value.to_string()))
14957 }
14958 }
14959 impl ::std::convert::TryFrom<&str> for WaypointSymbol {
14960 type Error = self::error::ConversionError;
14961 fn try_from(
14962 value: &str,
14963 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14964 value.parse()
14965 }
14966 }
14967 impl ::std::convert::TryFrom<&::std::string::String> for WaypointSymbol {
14968 type Error = self::error::ConversionError;
14969 fn try_from(
14970 value: &::std::string::String,
14971 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14972 value.parse()
14973 }
14974 }
14975 impl ::std::convert::TryFrom<::std::string::String> for WaypointSymbol {
14976 type Error = self::error::ConversionError;
14977 fn try_from(
14978 value: ::std::string::String,
14979 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14980 value.parse()
14981 }
14982 }
14983 impl<'de> ::serde::Deserialize<'de> for WaypointSymbol {
14984 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14985 where
14986 D: ::serde::Deserializer<'de>,
14987 {
14988 ::std::string::String::deserialize(deserializer)?
14989 .parse()
14990 .map_err(|e: self::error::ConversionError| {
14991 <D::Error as ::serde::de::Error>::custom(e.to_string())
14992 })
14993 }
14994 }
14995 ///`WaypointTrait`
14996 ///
14997 /// <details><summary>JSON schema</summary>
14998 ///
14999 /// ```json
15000 ///{
15001 /// "type": "object",
15002 /// "required": [
15003 /// "description",
15004 /// "name",
15005 /// "symbol"
15006 /// ],
15007 /// "properties": {
15008 /// "description": {
15009 /// "description": "A description of the trait.",
15010 /// "type": "string"
15011 /// },
15012 /// "name": {
15013 /// "description": "The name of the trait.",
15014 /// "type": "string"
15015 /// },
15016 /// "symbol": {
15017 /// "$ref": "#/components/schemas/WaypointTraitSymbol"
15018 /// }
15019 /// }
15020 ///}
15021 /// ```
15022 /// </details>
15023 #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15024 pub struct WaypointTrait {
15025 ///A description of the trait.
15026 pub description: ::std::string::String,
15027 ///The name of the trait.
15028 pub name: ::std::string::String,
15029 pub symbol: WaypointTraitSymbol,
15030 }
15031 ///The unique identifier of the trait.
15032 ///
15033 /// <details><summary>JSON schema</summary>
15034 ///
15035 /// ```json
15036 ///{
15037 /// "description": "The unique identifier of the trait.",
15038 /// "type": "string",
15039 /// "enum": [
15040 /// "UNCHARTED",
15041 /// "UNDER_CONSTRUCTION",
15042 /// "MARKETPLACE",
15043 /// "SHIPYARD",
15044 /// "OUTPOST",
15045 /// "SCATTERED_SETTLEMENTS",
15046 /// "SPRAWLING_CITIES",
15047 /// "MEGA_STRUCTURES",
15048 /// "PIRATE_BASE",
15049 /// "OVERCROWDED",
15050 /// "HIGH_TECH",
15051 /// "CORRUPT",
15052 /// "BUREAUCRATIC",
15053 /// "TRADING_HUB",
15054 /// "INDUSTRIAL",
15055 /// "BLACK_MARKET",
15056 /// "RESEARCH_FACILITY",
15057 /// "MILITARY_BASE",
15058 /// "SURVEILLANCE_OUTPOST",
15059 /// "EXPLORATION_OUTPOST",
15060 /// "MINERAL_DEPOSITS",
15061 /// "COMMON_METAL_DEPOSITS",
15062 /// "PRECIOUS_METAL_DEPOSITS",
15063 /// "RARE_METAL_DEPOSITS",
15064 /// "METHANE_POOLS",
15065 /// "ICE_CRYSTALS",
15066 /// "EXPLOSIVE_GASES",
15067 /// "STRONG_MAGNETOSPHERE",
15068 /// "VIBRANT_AURORAS",
15069 /// "SALT_FLATS",
15070 /// "CANYONS",
15071 /// "PERPETUAL_DAYLIGHT",
15072 /// "PERPETUAL_OVERCAST",
15073 /// "DRY_SEABEDS",
15074 /// "MAGMA_SEAS",
15075 /// "SUPERVOLCANOES",
15076 /// "ASH_CLOUDS",
15077 /// "VAST_RUINS",
15078 /// "MUTATED_FLORA",
15079 /// "TERRAFORMED",
15080 /// "EXTREME_TEMPERATURES",
15081 /// "EXTREME_PRESSURE",
15082 /// "DIVERSE_LIFE",
15083 /// "SCARCE_LIFE",
15084 /// "FOSSILS",
15085 /// "WEAK_GRAVITY",
15086 /// "STRONG_GRAVITY",
15087 /// "CRUSHING_GRAVITY",
15088 /// "TOXIC_ATMOSPHERE",
15089 /// "CORROSIVE_ATMOSPHERE",
15090 /// "BREATHABLE_ATMOSPHERE",
15091 /// "THIN_ATMOSPHERE",
15092 /// "JOVIAN",
15093 /// "ROCKY",
15094 /// "VOLCANIC",
15095 /// "FROZEN",
15096 /// "SWAMP",
15097 /// "BARREN",
15098 /// "TEMPERATE",
15099 /// "JUNGLE",
15100 /// "OCEAN",
15101 /// "RADIOACTIVE",
15102 /// "MICRO_GRAVITY_ANOMALIES",
15103 /// "DEBRIS_CLUSTER",
15104 /// "DEEP_CRATERS",
15105 /// "SHALLOW_CRATERS",
15106 /// "UNSTABLE_COMPOSITION",
15107 /// "HOLLOWED_INTERIOR",
15108 /// "STRIPPED"
15109 /// ]
15110 ///}
15111 /// ```
15112 /// </details>
15113 #[derive(
15114 ::serde::Deserialize,
15115 ::serde::Serialize,
15116 Clone,
15117 Copy,
15118 Debug,
15119 Eq,
15120 Hash,
15121 Ord,
15122 PartialEq,
15123 PartialOrd
15124 )]
15125 pub enum WaypointTraitSymbol {
15126 #[serde(rename = "UNCHARTED")]
15127 Uncharted,
15128 #[serde(rename = "UNDER_CONSTRUCTION")]
15129 UnderConstruction,
15130 #[serde(rename = "MARKETPLACE")]
15131 Marketplace,
15132 #[serde(rename = "SHIPYARD")]
15133 Shipyard,
15134 #[serde(rename = "OUTPOST")]
15135 Outpost,
15136 #[serde(rename = "SCATTERED_SETTLEMENTS")]
15137 ScatteredSettlements,
15138 #[serde(rename = "SPRAWLING_CITIES")]
15139 SprawlingCities,
15140 #[serde(rename = "MEGA_STRUCTURES")]
15141 MegaStructures,
15142 #[serde(rename = "PIRATE_BASE")]
15143 PirateBase,
15144 #[serde(rename = "OVERCROWDED")]
15145 Overcrowded,
15146 #[serde(rename = "HIGH_TECH")]
15147 HighTech,
15148 #[serde(rename = "CORRUPT")]
15149 Corrupt,
15150 #[serde(rename = "BUREAUCRATIC")]
15151 Bureaucratic,
15152 #[serde(rename = "TRADING_HUB")]
15153 TradingHub,
15154 #[serde(rename = "INDUSTRIAL")]
15155 Industrial,
15156 #[serde(rename = "BLACK_MARKET")]
15157 BlackMarket,
15158 #[serde(rename = "RESEARCH_FACILITY")]
15159 ResearchFacility,
15160 #[serde(rename = "MILITARY_BASE")]
15161 MilitaryBase,
15162 #[serde(rename = "SURVEILLANCE_OUTPOST")]
15163 SurveillanceOutpost,
15164 #[serde(rename = "EXPLORATION_OUTPOST")]
15165 ExplorationOutpost,
15166 #[serde(rename = "MINERAL_DEPOSITS")]
15167 MineralDeposits,
15168 #[serde(rename = "COMMON_METAL_DEPOSITS")]
15169 CommonMetalDeposits,
15170 #[serde(rename = "PRECIOUS_METAL_DEPOSITS")]
15171 PreciousMetalDeposits,
15172 #[serde(rename = "RARE_METAL_DEPOSITS")]
15173 RareMetalDeposits,
15174 #[serde(rename = "METHANE_POOLS")]
15175 MethanePools,
15176 #[serde(rename = "ICE_CRYSTALS")]
15177 IceCrystals,
15178 #[serde(rename = "EXPLOSIVE_GASES")]
15179 ExplosiveGases,
15180 #[serde(rename = "STRONG_MAGNETOSPHERE")]
15181 StrongMagnetosphere,
15182 #[serde(rename = "VIBRANT_AURORAS")]
15183 VibrantAuroras,
15184 #[serde(rename = "SALT_FLATS")]
15185 SaltFlats,
15186 #[serde(rename = "CANYONS")]
15187 Canyons,
15188 #[serde(rename = "PERPETUAL_DAYLIGHT")]
15189 PerpetualDaylight,
15190 #[serde(rename = "PERPETUAL_OVERCAST")]
15191 PerpetualOvercast,
15192 #[serde(rename = "DRY_SEABEDS")]
15193 DrySeabeds,
15194 #[serde(rename = "MAGMA_SEAS")]
15195 MagmaSeas,
15196 #[serde(rename = "SUPERVOLCANOES")]
15197 Supervolcanoes,
15198 #[serde(rename = "ASH_CLOUDS")]
15199 AshClouds,
15200 #[serde(rename = "VAST_RUINS")]
15201 VastRuins,
15202 #[serde(rename = "MUTATED_FLORA")]
15203 MutatedFlora,
15204 #[serde(rename = "TERRAFORMED")]
15205 Terraformed,
15206 #[serde(rename = "EXTREME_TEMPERATURES")]
15207 ExtremeTemperatures,
15208 #[serde(rename = "EXTREME_PRESSURE")]
15209 ExtremePressure,
15210 #[serde(rename = "DIVERSE_LIFE")]
15211 DiverseLife,
15212 #[serde(rename = "SCARCE_LIFE")]
15213 ScarceLife,
15214 #[serde(rename = "FOSSILS")]
15215 Fossils,
15216 #[serde(rename = "WEAK_GRAVITY")]
15217 WeakGravity,
15218 #[serde(rename = "STRONG_GRAVITY")]
15219 StrongGravity,
15220 #[serde(rename = "CRUSHING_GRAVITY")]
15221 CrushingGravity,
15222 #[serde(rename = "TOXIC_ATMOSPHERE")]
15223 ToxicAtmosphere,
15224 #[serde(rename = "CORROSIVE_ATMOSPHERE")]
15225 CorrosiveAtmosphere,
15226 #[serde(rename = "BREATHABLE_ATMOSPHERE")]
15227 BreathableAtmosphere,
15228 #[serde(rename = "THIN_ATMOSPHERE")]
15229 ThinAtmosphere,
15230 #[serde(rename = "JOVIAN")]
15231 Jovian,
15232 #[serde(rename = "ROCKY")]
15233 Rocky,
15234 #[serde(rename = "VOLCANIC")]
15235 Volcanic,
15236 #[serde(rename = "FROZEN")]
15237 Frozen,
15238 #[serde(rename = "SWAMP")]
15239 Swamp,
15240 #[serde(rename = "BARREN")]
15241 Barren,
15242 #[serde(rename = "TEMPERATE")]
15243 Temperate,
15244 #[serde(rename = "JUNGLE")]
15245 Jungle,
15246 #[serde(rename = "OCEAN")]
15247 Ocean,
15248 #[serde(rename = "RADIOACTIVE")]
15249 Radioactive,
15250 #[serde(rename = "MICRO_GRAVITY_ANOMALIES")]
15251 MicroGravityAnomalies,
15252 #[serde(rename = "DEBRIS_CLUSTER")]
15253 DebrisCluster,
15254 #[serde(rename = "DEEP_CRATERS")]
15255 DeepCraters,
15256 #[serde(rename = "SHALLOW_CRATERS")]
15257 ShallowCraters,
15258 #[serde(rename = "UNSTABLE_COMPOSITION")]
15259 UnstableComposition,
15260 #[serde(rename = "HOLLOWED_INTERIOR")]
15261 HollowedInterior,
15262 #[serde(rename = "STRIPPED")]
15263 Stripped,
15264 }
15265 impl ::std::fmt::Display for WaypointTraitSymbol {
15266 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15267 match *self {
15268 Self::Uncharted => f.write_str("UNCHARTED"),
15269 Self::UnderConstruction => f.write_str("UNDER_CONSTRUCTION"),
15270 Self::Marketplace => f.write_str("MARKETPLACE"),
15271 Self::Shipyard => f.write_str("SHIPYARD"),
15272 Self::Outpost => f.write_str("OUTPOST"),
15273 Self::ScatteredSettlements => f.write_str("SCATTERED_SETTLEMENTS"),
15274 Self::SprawlingCities => f.write_str("SPRAWLING_CITIES"),
15275 Self::MegaStructures => f.write_str("MEGA_STRUCTURES"),
15276 Self::PirateBase => f.write_str("PIRATE_BASE"),
15277 Self::Overcrowded => f.write_str("OVERCROWDED"),
15278 Self::HighTech => f.write_str("HIGH_TECH"),
15279 Self::Corrupt => f.write_str("CORRUPT"),
15280 Self::Bureaucratic => f.write_str("BUREAUCRATIC"),
15281 Self::TradingHub => f.write_str("TRADING_HUB"),
15282 Self::Industrial => f.write_str("INDUSTRIAL"),
15283 Self::BlackMarket => f.write_str("BLACK_MARKET"),
15284 Self::ResearchFacility => f.write_str("RESEARCH_FACILITY"),
15285 Self::MilitaryBase => f.write_str("MILITARY_BASE"),
15286 Self::SurveillanceOutpost => f.write_str("SURVEILLANCE_OUTPOST"),
15287 Self::ExplorationOutpost => f.write_str("EXPLORATION_OUTPOST"),
15288 Self::MineralDeposits => f.write_str("MINERAL_DEPOSITS"),
15289 Self::CommonMetalDeposits => f.write_str("COMMON_METAL_DEPOSITS"),
15290 Self::PreciousMetalDeposits => f.write_str("PRECIOUS_METAL_DEPOSITS"),
15291 Self::RareMetalDeposits => f.write_str("RARE_METAL_DEPOSITS"),
15292 Self::MethanePools => f.write_str("METHANE_POOLS"),
15293 Self::IceCrystals => f.write_str("ICE_CRYSTALS"),
15294 Self::ExplosiveGases => f.write_str("EXPLOSIVE_GASES"),
15295 Self::StrongMagnetosphere => f.write_str("STRONG_MAGNETOSPHERE"),
15296 Self::VibrantAuroras => f.write_str("VIBRANT_AURORAS"),
15297 Self::SaltFlats => f.write_str("SALT_FLATS"),
15298 Self::Canyons => f.write_str("CANYONS"),
15299 Self::PerpetualDaylight => f.write_str("PERPETUAL_DAYLIGHT"),
15300 Self::PerpetualOvercast => f.write_str("PERPETUAL_OVERCAST"),
15301 Self::DrySeabeds => f.write_str("DRY_SEABEDS"),
15302 Self::MagmaSeas => f.write_str("MAGMA_SEAS"),
15303 Self::Supervolcanoes => f.write_str("SUPERVOLCANOES"),
15304 Self::AshClouds => f.write_str("ASH_CLOUDS"),
15305 Self::VastRuins => f.write_str("VAST_RUINS"),
15306 Self::MutatedFlora => f.write_str("MUTATED_FLORA"),
15307 Self::Terraformed => f.write_str("TERRAFORMED"),
15308 Self::ExtremeTemperatures => f.write_str("EXTREME_TEMPERATURES"),
15309 Self::ExtremePressure => f.write_str("EXTREME_PRESSURE"),
15310 Self::DiverseLife => f.write_str("DIVERSE_LIFE"),
15311 Self::ScarceLife => f.write_str("SCARCE_LIFE"),
15312 Self::Fossils => f.write_str("FOSSILS"),
15313 Self::WeakGravity => f.write_str("WEAK_GRAVITY"),
15314 Self::StrongGravity => f.write_str("STRONG_GRAVITY"),
15315 Self::CrushingGravity => f.write_str("CRUSHING_GRAVITY"),
15316 Self::ToxicAtmosphere => f.write_str("TOXIC_ATMOSPHERE"),
15317 Self::CorrosiveAtmosphere => f.write_str("CORROSIVE_ATMOSPHERE"),
15318 Self::BreathableAtmosphere => f.write_str("BREATHABLE_ATMOSPHERE"),
15319 Self::ThinAtmosphere => f.write_str("THIN_ATMOSPHERE"),
15320 Self::Jovian => f.write_str("JOVIAN"),
15321 Self::Rocky => f.write_str("ROCKY"),
15322 Self::Volcanic => f.write_str("VOLCANIC"),
15323 Self::Frozen => f.write_str("FROZEN"),
15324 Self::Swamp => f.write_str("SWAMP"),
15325 Self::Barren => f.write_str("BARREN"),
15326 Self::Temperate => f.write_str("TEMPERATE"),
15327 Self::Jungle => f.write_str("JUNGLE"),
15328 Self::Ocean => f.write_str("OCEAN"),
15329 Self::Radioactive => f.write_str("RADIOACTIVE"),
15330 Self::MicroGravityAnomalies => f.write_str("MICRO_GRAVITY_ANOMALIES"),
15331 Self::DebrisCluster => f.write_str("DEBRIS_CLUSTER"),
15332 Self::DeepCraters => f.write_str("DEEP_CRATERS"),
15333 Self::ShallowCraters => f.write_str("SHALLOW_CRATERS"),
15334 Self::UnstableComposition => f.write_str("UNSTABLE_COMPOSITION"),
15335 Self::HollowedInterior => f.write_str("HOLLOWED_INTERIOR"),
15336 Self::Stripped => f.write_str("STRIPPED"),
15337 }
15338 }
15339 }
15340 impl ::std::str::FromStr for WaypointTraitSymbol {
15341 type Err = self::error::ConversionError;
15342 fn from_str(
15343 value: &str,
15344 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15345 match value {
15346 "UNCHARTED" => Ok(Self::Uncharted),
15347 "UNDER_CONSTRUCTION" => Ok(Self::UnderConstruction),
15348 "MARKETPLACE" => Ok(Self::Marketplace),
15349 "SHIPYARD" => Ok(Self::Shipyard),
15350 "OUTPOST" => Ok(Self::Outpost),
15351 "SCATTERED_SETTLEMENTS" => Ok(Self::ScatteredSettlements),
15352 "SPRAWLING_CITIES" => Ok(Self::SprawlingCities),
15353 "MEGA_STRUCTURES" => Ok(Self::MegaStructures),
15354 "PIRATE_BASE" => Ok(Self::PirateBase),
15355 "OVERCROWDED" => Ok(Self::Overcrowded),
15356 "HIGH_TECH" => Ok(Self::HighTech),
15357 "CORRUPT" => Ok(Self::Corrupt),
15358 "BUREAUCRATIC" => Ok(Self::Bureaucratic),
15359 "TRADING_HUB" => Ok(Self::TradingHub),
15360 "INDUSTRIAL" => Ok(Self::Industrial),
15361 "BLACK_MARKET" => Ok(Self::BlackMarket),
15362 "RESEARCH_FACILITY" => Ok(Self::ResearchFacility),
15363 "MILITARY_BASE" => Ok(Self::MilitaryBase),
15364 "SURVEILLANCE_OUTPOST" => Ok(Self::SurveillanceOutpost),
15365 "EXPLORATION_OUTPOST" => Ok(Self::ExplorationOutpost),
15366 "MINERAL_DEPOSITS" => Ok(Self::MineralDeposits),
15367 "COMMON_METAL_DEPOSITS" => Ok(Self::CommonMetalDeposits),
15368 "PRECIOUS_METAL_DEPOSITS" => Ok(Self::PreciousMetalDeposits),
15369 "RARE_METAL_DEPOSITS" => Ok(Self::RareMetalDeposits),
15370 "METHANE_POOLS" => Ok(Self::MethanePools),
15371 "ICE_CRYSTALS" => Ok(Self::IceCrystals),
15372 "EXPLOSIVE_GASES" => Ok(Self::ExplosiveGases),
15373 "STRONG_MAGNETOSPHERE" => Ok(Self::StrongMagnetosphere),
15374 "VIBRANT_AURORAS" => Ok(Self::VibrantAuroras),
15375 "SALT_FLATS" => Ok(Self::SaltFlats),
15376 "CANYONS" => Ok(Self::Canyons),
15377 "PERPETUAL_DAYLIGHT" => Ok(Self::PerpetualDaylight),
15378 "PERPETUAL_OVERCAST" => Ok(Self::PerpetualOvercast),
15379 "DRY_SEABEDS" => Ok(Self::DrySeabeds),
15380 "MAGMA_SEAS" => Ok(Self::MagmaSeas),
15381 "SUPERVOLCANOES" => Ok(Self::Supervolcanoes),
15382 "ASH_CLOUDS" => Ok(Self::AshClouds),
15383 "VAST_RUINS" => Ok(Self::VastRuins),
15384 "MUTATED_FLORA" => Ok(Self::MutatedFlora),
15385 "TERRAFORMED" => Ok(Self::Terraformed),
15386 "EXTREME_TEMPERATURES" => Ok(Self::ExtremeTemperatures),
15387 "EXTREME_PRESSURE" => Ok(Self::ExtremePressure),
15388 "DIVERSE_LIFE" => Ok(Self::DiverseLife),
15389 "SCARCE_LIFE" => Ok(Self::ScarceLife),
15390 "FOSSILS" => Ok(Self::Fossils),
15391 "WEAK_GRAVITY" => Ok(Self::WeakGravity),
15392 "STRONG_GRAVITY" => Ok(Self::StrongGravity),
15393 "CRUSHING_GRAVITY" => Ok(Self::CrushingGravity),
15394 "TOXIC_ATMOSPHERE" => Ok(Self::ToxicAtmosphere),
15395 "CORROSIVE_ATMOSPHERE" => Ok(Self::CorrosiveAtmosphere),
15396 "BREATHABLE_ATMOSPHERE" => Ok(Self::BreathableAtmosphere),
15397 "THIN_ATMOSPHERE" => Ok(Self::ThinAtmosphere),
15398 "JOVIAN" => Ok(Self::Jovian),
15399 "ROCKY" => Ok(Self::Rocky),
15400 "VOLCANIC" => Ok(Self::Volcanic),
15401 "FROZEN" => Ok(Self::Frozen),
15402 "SWAMP" => Ok(Self::Swamp),
15403 "BARREN" => Ok(Self::Barren),
15404 "TEMPERATE" => Ok(Self::Temperate),
15405 "JUNGLE" => Ok(Self::Jungle),
15406 "OCEAN" => Ok(Self::Ocean),
15407 "RADIOACTIVE" => Ok(Self::Radioactive),
15408 "MICRO_GRAVITY_ANOMALIES" => Ok(Self::MicroGravityAnomalies),
15409 "DEBRIS_CLUSTER" => Ok(Self::DebrisCluster),
15410 "DEEP_CRATERS" => Ok(Self::DeepCraters),
15411 "SHALLOW_CRATERS" => Ok(Self::ShallowCraters),
15412 "UNSTABLE_COMPOSITION" => Ok(Self::UnstableComposition),
15413 "HOLLOWED_INTERIOR" => Ok(Self::HollowedInterior),
15414 "STRIPPED" => Ok(Self::Stripped),
15415 _ => Err("invalid value".into()),
15416 }
15417 }
15418 }
15419 impl ::std::convert::TryFrom<&str> for WaypointTraitSymbol {
15420 type Error = self::error::ConversionError;
15421 fn try_from(
15422 value: &str,
15423 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15424 value.parse()
15425 }
15426 }
15427 impl ::std::convert::TryFrom<&::std::string::String> for WaypointTraitSymbol {
15428 type Error = self::error::ConversionError;
15429 fn try_from(
15430 value: &::std::string::String,
15431 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15432 value.parse()
15433 }
15434 }
15435 impl ::std::convert::TryFrom<::std::string::String> for WaypointTraitSymbol {
15436 type Error = self::error::ConversionError;
15437 fn try_from(
15438 value: ::std::string::String,
15439 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15440 value.parse()
15441 }
15442 }
15443 ///The type of waypoint.
15444 ///
15445 /// <details><summary>JSON schema</summary>
15446 ///
15447 /// ```json
15448 ///{
15449 /// "description": "The type of waypoint.",
15450 /// "type": "string",
15451 /// "enum": [
15452 /// "PLANET",
15453 /// "GAS_GIANT",
15454 /// "MOON",
15455 /// "ORBITAL_STATION",
15456 /// "JUMP_GATE",
15457 /// "ASTEROID_FIELD",
15458 /// "ASTEROID",
15459 /// "ENGINEERED_ASTEROID",
15460 /// "ASTEROID_BASE",
15461 /// "NEBULA",
15462 /// "DEBRIS_FIELD",
15463 /// "GRAVITY_WELL",
15464 /// "ARTIFICIAL_GRAVITY_WELL",
15465 /// "FUEL_STATION"
15466 /// ]
15467 ///}
15468 /// ```
15469 /// </details>
15470 #[derive(
15471 ::serde::Deserialize,
15472 ::serde::Serialize,
15473 Clone,
15474 Copy,
15475 Debug,
15476 Eq,
15477 Hash,
15478 Ord,
15479 PartialEq,
15480 PartialOrd
15481 )]
15482 pub enum WaypointType {
15483 #[serde(rename = "PLANET")]
15484 Planet,
15485 #[serde(rename = "GAS_GIANT")]
15486 GasGiant,
15487 #[serde(rename = "MOON")]
15488 Moon,
15489 #[serde(rename = "ORBITAL_STATION")]
15490 OrbitalStation,
15491 #[serde(rename = "JUMP_GATE")]
15492 JumpGate,
15493 #[serde(rename = "ASTEROID_FIELD")]
15494 AsteroidField,
15495 #[serde(rename = "ASTEROID")]
15496 Asteroid,
15497 #[serde(rename = "ENGINEERED_ASTEROID")]
15498 EngineeredAsteroid,
15499 #[serde(rename = "ASTEROID_BASE")]
15500 AsteroidBase,
15501 #[serde(rename = "NEBULA")]
15502 Nebula,
15503 #[serde(rename = "DEBRIS_FIELD")]
15504 DebrisField,
15505 #[serde(rename = "GRAVITY_WELL")]
15506 GravityWell,
15507 #[serde(rename = "ARTIFICIAL_GRAVITY_WELL")]
15508 ArtificialGravityWell,
15509 #[serde(rename = "FUEL_STATION")]
15510 FuelStation,
15511 }
15512 impl ::std::fmt::Display for WaypointType {
15513 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15514 match *self {
15515 Self::Planet => f.write_str("PLANET"),
15516 Self::GasGiant => f.write_str("GAS_GIANT"),
15517 Self::Moon => f.write_str("MOON"),
15518 Self::OrbitalStation => f.write_str("ORBITAL_STATION"),
15519 Self::JumpGate => f.write_str("JUMP_GATE"),
15520 Self::AsteroidField => f.write_str("ASTEROID_FIELD"),
15521 Self::Asteroid => f.write_str("ASTEROID"),
15522 Self::EngineeredAsteroid => f.write_str("ENGINEERED_ASTEROID"),
15523 Self::AsteroidBase => f.write_str("ASTEROID_BASE"),
15524 Self::Nebula => f.write_str("NEBULA"),
15525 Self::DebrisField => f.write_str("DEBRIS_FIELD"),
15526 Self::GravityWell => f.write_str("GRAVITY_WELL"),
15527 Self::ArtificialGravityWell => f.write_str("ARTIFICIAL_GRAVITY_WELL"),
15528 Self::FuelStation => f.write_str("FUEL_STATION"),
15529 }
15530 }
15531 }
15532 impl ::std::str::FromStr for WaypointType {
15533 type Err = self::error::ConversionError;
15534 fn from_str(
15535 value: &str,
15536 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15537 match value {
15538 "PLANET" => Ok(Self::Planet),
15539 "GAS_GIANT" => Ok(Self::GasGiant),
15540 "MOON" => Ok(Self::Moon),
15541 "ORBITAL_STATION" => Ok(Self::OrbitalStation),
15542 "JUMP_GATE" => Ok(Self::JumpGate),
15543 "ASTEROID_FIELD" => Ok(Self::AsteroidField),
15544 "ASTEROID" => Ok(Self::Asteroid),
15545 "ENGINEERED_ASTEROID" => Ok(Self::EngineeredAsteroid),
15546 "ASTEROID_BASE" => Ok(Self::AsteroidBase),
15547 "NEBULA" => Ok(Self::Nebula),
15548 "DEBRIS_FIELD" => Ok(Self::DebrisField),
15549 "GRAVITY_WELL" => Ok(Self::GravityWell),
15550 "ARTIFICIAL_GRAVITY_WELL" => Ok(Self::ArtificialGravityWell),
15551 "FUEL_STATION" => Ok(Self::FuelStation),
15552 _ => Err("invalid value".into()),
15553 }
15554 }
15555 }
15556 impl ::std::convert::TryFrom<&str> for WaypointType {
15557 type Error = self::error::ConversionError;
15558 fn try_from(
15559 value: &str,
15560 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15561 value.parse()
15562 }
15563 }
15564 impl ::std::convert::TryFrom<&::std::string::String> for WaypointType {
15565 type Error = self::error::ConversionError;
15566 fn try_from(
15567 value: &::std::string::String,
15568 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15569 value.parse()
15570 }
15571 }
15572 impl ::std::convert::TryFrom<::std::string::String> for WaypointType {
15573 type Error = self::error::ConversionError;
15574 fn try_from(
15575 value: ::std::string::String,
15576 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15577 value.parse()
15578 }
15579 }
15580}
15581#[derive(Clone, Debug)]
15582/**Client for SpaceTraders API
15583
15584SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe.
15585
15586The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server.
15587
15588```json http
15589{
15590 "method": "GET",
15591 "url": "https://api.spacetraders.io/v2",
15592}
15593```
15594
15595Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community.
15596
15597We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
15598
15599
15600
15601
15602Version: v2.3.0*/
15603pub struct Client {
15604 pub(crate) baseurl: String,
15605 pub(crate) client: reqwest::Client,
15606}
15607impl Client {
15608 /// Create a new client.
15609 ///
15610 /// `baseurl` is the base URL provided to the internal
15611 /// `reqwest::Client`, and should include a scheme and hostname,
15612 /// as well as port and a path stem if applicable.
15613 pub fn new(baseurl: &str) -> Self {
15614 #[cfg(not(target_arch = "wasm32"))]
15615 let client = {
15616 let dur = ::std::time::Duration::from_secs(15u64);
15617 reqwest::ClientBuilder::new().connect_timeout(dur).timeout(dur)
15618 };
15619 #[cfg(target_arch = "wasm32")]
15620 let client = reqwest::ClientBuilder::new();
15621 Self::new_with_client(baseurl, client.build().unwrap())
15622 }
15623 /// Construct a new client with an existing `reqwest::Client`,
15624 /// allowing more control over its configuration.
15625 ///
15626 /// `baseurl` is the base URL provided to the internal
15627 /// `reqwest::Client`, and should include a scheme and hostname,
15628 /// as well as port and a path stem if applicable.
15629 pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self {
15630 Self {
15631 baseurl: baseurl.to_string(),
15632 client,
15633 }
15634 }
15635}
15636impl ClientInfo<()> for Client {
15637 fn api_version() -> &'static str {
15638 "v2.3.0"
15639 }
15640 fn baseurl(&self) -> &str {
15641 self.baseurl.as_str()
15642 }
15643 fn client(&self) -> &reqwest::Client {
15644 &self.client
15645 }
15646 fn inner(&self) -> &() {
15647 &()
15648 }
15649}
15650impl ClientHooks<()> for &Client {}
15651#[allow(clippy::all)]
15652impl Client {
15653 /**Server status
15654
15655Return the status of the game server.
15656This also includes a few global elements, such as announcements, server reset dates and leaderboards.
15657
15658Sends a `GET` request to `/`
15659
15660*/
15661 pub async fn get_status<'a>(
15662 &'a self,
15663 ) -> Result<ResponseValue<types::GetStatusResponse>, Error<()>> {
15664 let url = format!("{}/", self.baseurl,);
15665 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15666 header_map
15667 .append(
15668 ::reqwest::header::HeaderName::from_static("api-version"),
15669 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15670 );
15671 #[allow(unused_mut)]
15672 let mut request = self
15673 .client
15674 .get(url)
15675 .header(
15676 ::reqwest::header::ACCEPT,
15677 ::reqwest::header::HeaderValue::from_static("application/json"),
15678 )
15679 .headers(header_map)
15680 .build()?;
15681 let info = OperationInfo {
15682 operation_id: "get_status",
15683 };
15684 self.pre(&mut request, &info).await?;
15685 let result = self.exec(request, &info).await;
15686 self.post(&result, &info).await?;
15687 let response = result?;
15688 match response.status().as_u16() {
15689 200u16 => ResponseValue::from_response(response).await,
15690 _ => Err(Error::UnexpectedResponse(response)),
15691 }
15692 }
15693 /**List all public agent details
15694
15695List all public agent details.
15696
15697Sends a `GET` request to `/agents`
15698
15699Arguments:
15700- `limit`: How many entries to return per page
15701- `page`: What entry offset to request
15702*/
15703 pub async fn get_agents<'a>(
15704 &'a self,
15705 limit: Option<::std::num::NonZeroU64>,
15706 page: Option<::std::num::NonZeroU64>,
15707 ) -> Result<ResponseValue<types::GetAgentsResponse>, Error<()>> {
15708 let url = format!("{}/agents", self.baseurl,);
15709 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15710 header_map
15711 .append(
15712 ::reqwest::header::HeaderName::from_static("api-version"),
15713 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15714 );
15715 #[allow(unused_mut)]
15716 let mut request = self
15717 .client
15718 .get(url)
15719 .header(
15720 ::reqwest::header::ACCEPT,
15721 ::reqwest::header::HeaderValue::from_static("application/json"),
15722 )
15723 .query(&progenitor_client::QueryParam::new("limit", &limit))
15724 .query(&progenitor_client::QueryParam::new("page", &page))
15725 .headers(header_map)
15726 .build()?;
15727 let info = OperationInfo {
15728 operation_id: "get_agents",
15729 };
15730 self.pre(&mut request, &info).await?;
15731 let result = self.exec(request, &info).await;
15732 self.post(&result, &info).await?;
15733 let response = result?;
15734 match response.status().as_u16() {
15735 200u16 => ResponseValue::from_response(response).await,
15736 _ => Err(Error::UnexpectedResponse(response)),
15737 }
15738 }
15739 /**Get public details for a specific agent
15740
15741Get public details for a specific agent.
15742
15743Sends a `GET` request to `/agents/{agentSymbol}`
15744
15745Arguments:
15746- `agent_symbol`: The agent symbol
15747*/
15748 pub async fn get_agent<'a>(
15749 &'a self,
15750 agent_symbol: &'a str,
15751 ) -> Result<ResponseValue<types::GetAgentResponse>, Error<()>> {
15752 let url = format!(
15753 "{}/agents/{}", self.baseurl, encode_path(& agent_symbol.to_string()),
15754 );
15755 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15756 header_map
15757 .append(
15758 ::reqwest::header::HeaderName::from_static("api-version"),
15759 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15760 );
15761 #[allow(unused_mut)]
15762 let mut request = self
15763 .client
15764 .get(url)
15765 .header(
15766 ::reqwest::header::ACCEPT,
15767 ::reqwest::header::HeaderValue::from_static("application/json"),
15768 )
15769 .headers(header_map)
15770 .build()?;
15771 let info = OperationInfo {
15772 operation_id: "get_agent",
15773 };
15774 self.pre(&mut request, &info).await?;
15775 let result = self.exec(request, &info).await;
15776 self.post(&result, &info).await?;
15777 let response = result?;
15778 match response.status().as_u16() {
15779 200u16 => ResponseValue::from_response(response).await,
15780 _ => Err(Error::UnexpectedResponse(response)),
15781 }
15782 }
15783 /**Error code list
15784
15785Return a list of all possible error codes thrown by the game server.
15786
15787Sends a `GET` request to `/error-codes`
15788
15789*/
15790 pub async fn get_error_codes<'a>(
15791 &'a self,
15792 ) -> Result<ResponseValue<types::GetErrorCodesResponse>, Error<()>> {
15793 let url = format!("{}/error-codes", self.baseurl,);
15794 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15795 header_map
15796 .append(
15797 ::reqwest::header::HeaderName::from_static("api-version"),
15798 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15799 );
15800 #[allow(unused_mut)]
15801 let mut request = self
15802 .client
15803 .get(url)
15804 .header(
15805 ::reqwest::header::ACCEPT,
15806 ::reqwest::header::HeaderValue::from_static("application/json"),
15807 )
15808 .headers(header_map)
15809 .build()?;
15810 let info = OperationInfo {
15811 operation_id: "get_error_codes",
15812 };
15813 self.pre(&mut request, &info).await?;
15814 let result = self.exec(request, &info).await;
15815 self.post(&result, &info).await?;
15816 let response = result?;
15817 match response.status().as_u16() {
15818 200u16 => ResponseValue::from_response(response).await,
15819 _ => Err(Error::UnexpectedResponse(response)),
15820 }
15821 }
15822 /**List factions
15823
15824Return a paginated list of all the factions in the game.
15825
15826Sends a `GET` request to `/factions`
15827
15828Arguments:
15829- `limit`: How many entries to return per page
15830- `page`: What entry offset to request
15831*/
15832 pub async fn get_factions<'a>(
15833 &'a self,
15834 limit: Option<::std::num::NonZeroU64>,
15835 page: Option<::std::num::NonZeroU64>,
15836 ) -> Result<ResponseValue<types::GetFactionsResponse>, Error<()>> {
15837 let url = format!("{}/factions", self.baseurl,);
15838 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15839 header_map
15840 .append(
15841 ::reqwest::header::HeaderName::from_static("api-version"),
15842 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15843 );
15844 #[allow(unused_mut)]
15845 let mut request = self
15846 .client
15847 .get(url)
15848 .header(
15849 ::reqwest::header::ACCEPT,
15850 ::reqwest::header::HeaderValue::from_static("application/json"),
15851 )
15852 .query(&progenitor_client::QueryParam::new("limit", &limit))
15853 .query(&progenitor_client::QueryParam::new("page", &page))
15854 .headers(header_map)
15855 .build()?;
15856 let info = OperationInfo {
15857 operation_id: "get_factions",
15858 };
15859 self.pre(&mut request, &info).await?;
15860 let result = self.exec(request, &info).await;
15861 self.post(&result, &info).await?;
15862 let response = result?;
15863 match response.status().as_u16() {
15864 200u16 => ResponseValue::from_response(response).await,
15865 _ => Err(Error::UnexpectedResponse(response)),
15866 }
15867 }
15868 /**Faction details
15869
15870View the details of a faction.
15871
15872Sends a `GET` request to `/factions/{factionSymbol}`
15873
15874Arguments:
15875- `faction_symbol`: The faction symbol
15876*/
15877 pub async fn get_faction<'a>(
15878 &'a self,
15879 faction_symbol: &'a str,
15880 ) -> Result<ResponseValue<types::GetFactionResponse>, Error<()>> {
15881 let url = format!(
15882 "{}/factions/{}", self.baseurl, encode_path(& faction_symbol.to_string()),
15883 );
15884 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15885 header_map
15886 .append(
15887 ::reqwest::header::HeaderName::from_static("api-version"),
15888 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15889 );
15890 #[allow(unused_mut)]
15891 let mut request = self
15892 .client
15893 .get(url)
15894 .header(
15895 ::reqwest::header::ACCEPT,
15896 ::reqwest::header::HeaderValue::from_static("application/json"),
15897 )
15898 .headers(header_map)
15899 .build()?;
15900 let info = OperationInfo {
15901 operation_id: "get_faction",
15902 };
15903 self.pre(&mut request, &info).await?;
15904 let result = self.exec(request, &info).await;
15905 self.post(&result, &info).await?;
15906 let response = result?;
15907 match response.status().as_u16() {
15908 200u16 => ResponseValue::from_response(response).await,
15909 _ => Err(Error::UnexpectedResponse(response)),
15910 }
15911 }
15912 /**Describes trade relationships
15913
15914Describes which import and exports map to each other.
15915
15916Sends a `GET` request to `/market/supply-chain`
15917
15918*/
15919 pub async fn get_supply_chain<'a>(
15920 &'a self,
15921 ) -> Result<ResponseValue<types::GetSupplyChainResponse>, Error<()>> {
15922 let url = format!("{}/market/supply-chain", self.baseurl,);
15923 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15924 header_map
15925 .append(
15926 ::reqwest::header::HeaderName::from_static("api-version"),
15927 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15928 );
15929 #[allow(unused_mut)]
15930 let mut request = self
15931 .client
15932 .get(url)
15933 .header(
15934 ::reqwest::header::ACCEPT,
15935 ::reqwest::header::HeaderValue::from_static("application/json"),
15936 )
15937 .headers(header_map)
15938 .build()?;
15939 let info = OperationInfo {
15940 operation_id: "get_supply_chain",
15941 };
15942 self.pre(&mut request, &info).await?;
15943 let result = self.exec(request, &info).await;
15944 self.post(&result, &info).await?;
15945 let response = result?;
15946 match response.status().as_u16() {
15947 200u16 => ResponseValue::from_response(response).await,
15948 _ => Err(Error::UnexpectedResponse(response)),
15949 }
15950 }
15951 /**Get Account
15952
15953Fetch your account details.
15954
15955Sends a `GET` request to `/my/account`
15956
15957*/
15958 pub async fn get_my_account<'a>(
15959 &'a self,
15960 ) -> Result<ResponseValue<types::GetMyAccountResponse>, Error<()>> {
15961 let url = format!("{}/my/account", self.baseurl,);
15962 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
15963 header_map
15964 .append(
15965 ::reqwest::header::HeaderName::from_static("api-version"),
15966 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
15967 );
15968 #[allow(unused_mut)]
15969 let mut request = self
15970 .client
15971 .get(url)
15972 .header(
15973 ::reqwest::header::ACCEPT,
15974 ::reqwest::header::HeaderValue::from_static("application/json"),
15975 )
15976 .headers(header_map)
15977 .build()?;
15978 let info = OperationInfo {
15979 operation_id: "get_my_account",
15980 };
15981 self.pre(&mut request, &info).await?;
15982 let result = self.exec(request, &info).await;
15983 self.post(&result, &info).await?;
15984 let response = result?;
15985 match response.status().as_u16() {
15986 200u16 => ResponseValue::from_response(response).await,
15987 _ => Err(Error::UnexpectedResponse(response)),
15988 }
15989 }
15990 /**Get Agent
15991
15992Fetch your agent's details.
15993
15994Sends a `GET` request to `/my/agent`
15995
15996*/
15997 pub async fn get_my_agent<'a>(
15998 &'a self,
15999 ) -> Result<ResponseValue<types::GetMyAgentResponse>, Error<()>> {
16000 let url = format!("{}/my/agent", self.baseurl,);
16001 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16002 header_map
16003 .append(
16004 ::reqwest::header::HeaderName::from_static("api-version"),
16005 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16006 );
16007 #[allow(unused_mut)]
16008 let mut request = self
16009 .client
16010 .get(url)
16011 .header(
16012 ::reqwest::header::ACCEPT,
16013 ::reqwest::header::HeaderValue::from_static("application/json"),
16014 )
16015 .headers(header_map)
16016 .build()?;
16017 let info = OperationInfo {
16018 operation_id: "get_my_agent",
16019 };
16020 self.pre(&mut request, &info).await?;
16021 let result = self.exec(request, &info).await;
16022 self.post(&result, &info).await?;
16023 let response = result?;
16024 match response.status().as_u16() {
16025 200u16 => ResponseValue::from_response(response).await,
16026 _ => Err(Error::UnexpectedResponse(response)),
16027 }
16028 }
16029 /**Get Agent Events
16030
16031Get recent events for your agent.
16032
16033Sends a `GET` request to `/my/agent/events`
16034
16035*/
16036 pub async fn get_my_agent_events<'a>(
16037 &'a self,
16038 ) -> Result<ResponseValue<types::GetMyAgentEventsResponse>, Error<()>> {
16039 let url = format!("{}/my/agent/events", self.baseurl,);
16040 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16041 header_map
16042 .append(
16043 ::reqwest::header::HeaderName::from_static("api-version"),
16044 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16045 );
16046 #[allow(unused_mut)]
16047 let mut request = self
16048 .client
16049 .get(url)
16050 .header(
16051 ::reqwest::header::ACCEPT,
16052 ::reqwest::header::HeaderValue::from_static("application/json"),
16053 )
16054 .headers(header_map)
16055 .build()?;
16056 let info = OperationInfo {
16057 operation_id: "get_my_agent_events",
16058 };
16059 self.pre(&mut request, &info).await?;
16060 let result = self.exec(request, &info).await;
16061 self.post(&result, &info).await?;
16062 let response = result?;
16063 match response.status().as_u16() {
16064 200u16 => ResponseValue::from_response(response).await,
16065 _ => Err(Error::UnexpectedResponse(response)),
16066 }
16067 }
16068 /**List Contracts
16069
16070Return a paginated list of all your contracts.
16071
16072Sends a `GET` request to `/my/contracts`
16073
16074Arguments:
16075- `limit`: How many entries to return per page
16076- `page`: What entry offset to request
16077*/
16078 pub async fn get_contracts<'a>(
16079 &'a self,
16080 limit: Option<::std::num::NonZeroU64>,
16081 page: Option<::std::num::NonZeroU64>,
16082 ) -> Result<ResponseValue<types::GetContractsResponse>, Error<()>> {
16083 let url = format!("{}/my/contracts", self.baseurl,);
16084 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16085 header_map
16086 .append(
16087 ::reqwest::header::HeaderName::from_static("api-version"),
16088 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16089 );
16090 #[allow(unused_mut)]
16091 let mut request = self
16092 .client
16093 .get(url)
16094 .header(
16095 ::reqwest::header::ACCEPT,
16096 ::reqwest::header::HeaderValue::from_static("application/json"),
16097 )
16098 .query(&progenitor_client::QueryParam::new("limit", &limit))
16099 .query(&progenitor_client::QueryParam::new("page", &page))
16100 .headers(header_map)
16101 .build()?;
16102 let info = OperationInfo {
16103 operation_id: "get_contracts",
16104 };
16105 self.pre(&mut request, &info).await?;
16106 let result = self.exec(request, &info).await;
16107 self.post(&result, &info).await?;
16108 let response = result?;
16109 match response.status().as_u16() {
16110 200u16 => ResponseValue::from_response(response).await,
16111 _ => Err(Error::UnexpectedResponse(response)),
16112 }
16113 }
16114 /**Get Contract
16115
16116Get the details of a specific contract.
16117
16118Sends a `GET` request to `/my/contracts/{contractId}`
16119
16120Arguments:
16121- `contract_id`: The contract ID to accept.
16122*/
16123 pub async fn get_contract<'a>(
16124 &'a self,
16125 contract_id: &'a str,
16126 ) -> Result<ResponseValue<types::GetContractResponse>, Error<()>> {
16127 let url = format!(
16128 "{}/my/contracts/{}", self.baseurl, encode_path(& contract_id.to_string()),
16129 );
16130 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16131 header_map
16132 .append(
16133 ::reqwest::header::HeaderName::from_static("api-version"),
16134 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16135 );
16136 #[allow(unused_mut)]
16137 let mut request = self
16138 .client
16139 .get(url)
16140 .header(
16141 ::reqwest::header::ACCEPT,
16142 ::reqwest::header::HeaderValue::from_static("application/json"),
16143 )
16144 .headers(header_map)
16145 .build()?;
16146 let info = OperationInfo {
16147 operation_id: "get_contract",
16148 };
16149 self.pre(&mut request, &info).await?;
16150 let result = self.exec(request, &info).await;
16151 self.post(&result, &info).await?;
16152 let response = result?;
16153 match response.status().as_u16() {
16154 200u16 => ResponseValue::from_response(response).await,
16155 _ => Err(Error::UnexpectedResponse(response)),
16156 }
16157 }
16158 /**Accept Contract
16159
16160Accept a contract by ID.
16161
16162You can only accept contracts that were offered to you, were not accepted yet, and whose deadlines has not passed yet.
16163
16164Sends a `POST` request to `/my/contracts/{contractId}/accept`
16165
16166Arguments:
16167- `contract_id`: The contract ID to accept.
16168*/
16169 pub async fn accept_contract<'a>(
16170 &'a self,
16171 contract_id: &'a str,
16172 ) -> Result<ResponseValue<types::AcceptContractResponse>, Error<()>> {
16173 let url = format!(
16174 "{}/my/contracts/{}/accept", self.baseurl, encode_path(& contract_id
16175 .to_string()),
16176 );
16177 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16178 header_map
16179 .append(
16180 ::reqwest::header::HeaderName::from_static("api-version"),
16181 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16182 );
16183 #[allow(unused_mut)]
16184 let mut request = self
16185 .client
16186 .post(url)
16187 .header(
16188 ::reqwest::header::ACCEPT,
16189 ::reqwest::header::HeaderValue::from_static("application/json"),
16190 )
16191 .headers(header_map)
16192 .build()?;
16193 let info = OperationInfo {
16194 operation_id: "accept_contract",
16195 };
16196 self.pre(&mut request, &info).await?;
16197 let result = self.exec(request, &info).await;
16198 self.post(&result, &info).await?;
16199 let response = result?;
16200 match response.status().as_u16() {
16201 200u16 => ResponseValue::from_response(response).await,
16202 _ => Err(Error::UnexpectedResponse(response)),
16203 }
16204 }
16205 /**Deliver Cargo to Contract
16206
16207Deliver cargo to a contract.
16208
16209In order to use this API, a ship must be at the delivery location (denoted in the delivery terms as `destinationSymbol` of a contract) and must have a number of units of a good required by this contract in its cargo.
16210
16211Cargo that was delivered will be removed from the ship's cargo.
16212
16213Sends a `POST` request to `/my/contracts/{contractId}/deliver`
16214
16215Arguments:
16216- `contract_id`: The ID of the contract.
16217- `body`
16218*/
16219 pub async fn deliver_contract<'a>(
16220 &'a self,
16221 contract_id: &'a str,
16222 body: &'a types::DeliverContractBody,
16223 ) -> Result<ResponseValue<types::DeliverContractResponse>, Error<()>> {
16224 let url = format!(
16225 "{}/my/contracts/{}/deliver", self.baseurl, encode_path(& contract_id
16226 .to_string()),
16227 );
16228 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16229 header_map
16230 .append(
16231 ::reqwest::header::HeaderName::from_static("api-version"),
16232 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16233 );
16234 #[allow(unused_mut)]
16235 let mut request = self
16236 .client
16237 .post(url)
16238 .header(
16239 ::reqwest::header::ACCEPT,
16240 ::reqwest::header::HeaderValue::from_static("application/json"),
16241 )
16242 .json(&body)
16243 .headers(header_map)
16244 .build()?;
16245 let info = OperationInfo {
16246 operation_id: "deliver_contract",
16247 };
16248 self.pre(&mut request, &info).await?;
16249 let result = self.exec(request, &info).await;
16250 self.post(&result, &info).await?;
16251 let response = result?;
16252 match response.status().as_u16() {
16253 200u16 => ResponseValue::from_response(response).await,
16254 _ => Err(Error::UnexpectedResponse(response)),
16255 }
16256 }
16257 /**Fulfill Contract
16258
16259Fulfill a contract. Can only be used on contracts that have all of their delivery terms fulfilled.
16260
16261Sends a `POST` request to `/my/contracts/{contractId}/fulfill`
16262
16263Arguments:
16264- `contract_id`: The ID of the contract to fulfill.
16265*/
16266 pub async fn fulfill_contract<'a>(
16267 &'a self,
16268 contract_id: &'a str,
16269 ) -> Result<ResponseValue<types::FulfillContractResponse>, Error<()>> {
16270 let url = format!(
16271 "{}/my/contracts/{}/fulfill", self.baseurl, encode_path(& contract_id
16272 .to_string()),
16273 );
16274 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16275 header_map
16276 .append(
16277 ::reqwest::header::HeaderName::from_static("api-version"),
16278 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16279 );
16280 #[allow(unused_mut)]
16281 let mut request = self
16282 .client
16283 .post(url)
16284 .header(
16285 ::reqwest::header::ACCEPT,
16286 ::reqwest::header::HeaderValue::from_static("application/json"),
16287 )
16288 .headers(header_map)
16289 .build()?;
16290 let info = OperationInfo {
16291 operation_id: "fulfill_contract",
16292 };
16293 self.pre(&mut request, &info).await?;
16294 let result = self.exec(request, &info).await;
16295 self.post(&result, &info).await?;
16296 let response = result?;
16297 match response.status().as_u16() {
16298 200u16 => ResponseValue::from_response(response).await,
16299 _ => Err(Error::UnexpectedResponse(response)),
16300 }
16301 }
16302 /**Get My Factions
16303
16304Retrieve factions with which the agent has reputation.
16305
16306Sends a `GET` request to `/my/factions`
16307
16308Arguments:
16309- `limit`: How many entries to return per page
16310- `page`: What entry offset to request
16311*/
16312 pub async fn get_my_factions<'a>(
16313 &'a self,
16314 limit: Option<::std::num::NonZeroU64>,
16315 page: Option<::std::num::NonZeroU64>,
16316 ) -> Result<ResponseValue<types::GetMyFactionsResponse>, Error<()>> {
16317 let url = format!("{}/my/factions", self.baseurl,);
16318 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16319 header_map
16320 .append(
16321 ::reqwest::header::HeaderName::from_static("api-version"),
16322 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16323 );
16324 #[allow(unused_mut)]
16325 let mut request = self
16326 .client
16327 .get(url)
16328 .header(
16329 ::reqwest::header::ACCEPT,
16330 ::reqwest::header::HeaderValue::from_static("application/json"),
16331 )
16332 .query(&progenitor_client::QueryParam::new("limit", &limit))
16333 .query(&progenitor_client::QueryParam::new("page", &page))
16334 .headers(header_map)
16335 .build()?;
16336 let info = OperationInfo {
16337 operation_id: "get_my_factions",
16338 };
16339 self.pre(&mut request, &info).await?;
16340 let result = self.exec(request, &info).await;
16341 self.post(&result, &info).await?;
16342 let response = result?;
16343 match response.status().as_u16() {
16344 200u16 => ResponseValue::from_response(response).await,
16345 _ => Err(Error::UnexpectedResponse(response)),
16346 }
16347 }
16348 /**List Ships
16349
16350Return a paginated list of all of ships under your agent's ownership.
16351
16352Sends a `GET` request to `/my/ships`
16353
16354Arguments:
16355- `limit`: How many entries to return per page
16356- `page`: What entry offset to request
16357*/
16358 pub async fn get_my_ships<'a>(
16359 &'a self,
16360 limit: Option<::std::num::NonZeroU64>,
16361 page: Option<::std::num::NonZeroU64>,
16362 ) -> Result<ResponseValue<types::GetMyShipsResponse>, Error<()>> {
16363 let url = format!("{}/my/ships", self.baseurl,);
16364 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16365 header_map
16366 .append(
16367 ::reqwest::header::HeaderName::from_static("api-version"),
16368 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16369 );
16370 #[allow(unused_mut)]
16371 let mut request = self
16372 .client
16373 .get(url)
16374 .header(
16375 ::reqwest::header::ACCEPT,
16376 ::reqwest::header::HeaderValue::from_static("application/json"),
16377 )
16378 .query(&progenitor_client::QueryParam::new("limit", &limit))
16379 .query(&progenitor_client::QueryParam::new("page", &page))
16380 .headers(header_map)
16381 .build()?;
16382 let info = OperationInfo {
16383 operation_id: "get_my_ships",
16384 };
16385 self.pre(&mut request, &info).await?;
16386 let result = self.exec(request, &info).await;
16387 self.post(&result, &info).await?;
16388 let response = result?;
16389 match response.status().as_u16() {
16390 200u16 => ResponseValue::from_response(response).await,
16391 _ => Err(Error::UnexpectedResponse(response)),
16392 }
16393 }
16394 /**Purchase Ship
16395
16396Purchase a ship from a Shipyard. In order to use this function, a ship under your agent's ownership must be in a waypoint that has the `Shipyard` trait, and the Shipyard must sell the type of the desired ship.
16397
16398Shipyards typically offer ship types, which are predefined templates of ships that have dedicated roles. A template comes with a preset of an engine, a reactor, and a frame. It may also include a few modules and mounts.
16399
16400Sends a `POST` request to `/my/ships`
16401
16402*/
16403 pub async fn purchase_ship<'a>(
16404 &'a self,
16405 body: &'a types::PurchaseShipBody,
16406 ) -> Result<ResponseValue<types::PurchaseShipResponse>, Error<()>> {
16407 let url = format!("{}/my/ships", self.baseurl,);
16408 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16409 header_map
16410 .append(
16411 ::reqwest::header::HeaderName::from_static("api-version"),
16412 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16413 );
16414 #[allow(unused_mut)]
16415 let mut request = self
16416 .client
16417 .post(url)
16418 .header(
16419 ::reqwest::header::ACCEPT,
16420 ::reqwest::header::HeaderValue::from_static("application/json"),
16421 )
16422 .json(&body)
16423 .headers(header_map)
16424 .build()?;
16425 let info = OperationInfo {
16426 operation_id: "purchase_ship",
16427 };
16428 self.pre(&mut request, &info).await?;
16429 let result = self.exec(request, &info).await;
16430 self.post(&result, &info).await?;
16431 let response = result?;
16432 match response.status().as_u16() {
16433 201u16 => ResponseValue::from_response(response).await,
16434 _ => Err(Error::UnexpectedResponse(response)),
16435 }
16436 }
16437 /**Get Ship
16438
16439Retrieve the details of a ship under your agent's ownership.
16440
16441Sends a `GET` request to `/my/ships/{shipSymbol}`
16442
16443Arguments:
16444- `ship_symbol`: The symbol of the ship.
16445*/
16446 pub async fn get_my_ship<'a>(
16447 &'a self,
16448 ship_symbol: &'a str,
16449 ) -> Result<ResponseValue<types::GetMyShipResponse>, Error<()>> {
16450 let url = format!(
16451 "{}/my/ships/{}", self.baseurl, encode_path(& ship_symbol.to_string()),
16452 );
16453 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16454 header_map
16455 .append(
16456 ::reqwest::header::HeaderName::from_static("api-version"),
16457 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16458 );
16459 #[allow(unused_mut)]
16460 let mut request = self
16461 .client
16462 .get(url)
16463 .header(
16464 ::reqwest::header::ACCEPT,
16465 ::reqwest::header::HeaderValue::from_static("application/json"),
16466 )
16467 .headers(header_map)
16468 .build()?;
16469 let info = OperationInfo {
16470 operation_id: "get_my_ship",
16471 };
16472 self.pre(&mut request, &info).await?;
16473 let result = self.exec(request, &info).await;
16474 self.post(&result, &info).await?;
16475 let response = result?;
16476 match response.status().as_u16() {
16477 200u16 => ResponseValue::from_response(response).await,
16478 _ => Err(Error::UnexpectedResponse(response)),
16479 }
16480 }
16481 /**Get Ship Cargo
16482
16483Retrieve the cargo of a ship under your agent's ownership.
16484
16485Sends a `GET` request to `/my/ships/{shipSymbol}/cargo`
16486
16487Arguments:
16488- `ship_symbol`: The symbol of the ship.
16489*/
16490 pub async fn get_my_ship_cargo<'a>(
16491 &'a self,
16492 ship_symbol: &'a str,
16493 ) -> Result<ResponseValue<types::GetMyShipCargoResponse>, Error<()>> {
16494 let url = format!(
16495 "{}/my/ships/{}/cargo", self.baseurl, encode_path(& ship_symbol.to_string()),
16496 );
16497 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16498 header_map
16499 .append(
16500 ::reqwest::header::HeaderName::from_static("api-version"),
16501 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16502 );
16503 #[allow(unused_mut)]
16504 let mut request = self
16505 .client
16506 .get(url)
16507 .header(
16508 ::reqwest::header::ACCEPT,
16509 ::reqwest::header::HeaderValue::from_static("application/json"),
16510 )
16511 .headers(header_map)
16512 .build()?;
16513 let info = OperationInfo {
16514 operation_id: "get_my_ship_cargo",
16515 };
16516 self.pre(&mut request, &info).await?;
16517 let result = self.exec(request, &info).await;
16518 self.post(&result, &info).await?;
16519 let response = result?;
16520 match response.status().as_u16() {
16521 200u16 => ResponseValue::from_response(response).await,
16522 _ => Err(Error::UnexpectedResponse(response)),
16523 }
16524 }
16525 /**Create Chart
16526
16527Command a ship to chart the waypoint at its current location.
16528
16529Most waypoints in the universe are uncharted by default. These waypoints have their traits hidden until they have been charted by a ship.
16530
16531Charting a waypoint will record your agent as the one who created the chart, and all other agents would also be able to see the waypoint's traits. Charting a waypoint gives you a one time reward of credits based on the rarity of the waypoint's traits.
16532
16533Sends a `POST` request to `/my/ships/{shipSymbol}/chart`
16534
16535Arguments:
16536- `ship_symbol`: The symbol of the ship.
16537*/
16538 pub async fn create_chart<'a>(
16539 &'a self,
16540 ship_symbol: &'a str,
16541 ) -> Result<ResponseValue<types::CreateChartResponse>, Error<()>> {
16542 let url = format!(
16543 "{}/my/ships/{}/chart", self.baseurl, encode_path(& ship_symbol.to_string()),
16544 );
16545 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16546 header_map
16547 .append(
16548 ::reqwest::header::HeaderName::from_static("api-version"),
16549 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16550 );
16551 #[allow(unused_mut)]
16552 let mut request = self
16553 .client
16554 .post(url)
16555 .header(
16556 ::reqwest::header::ACCEPT,
16557 ::reqwest::header::HeaderValue::from_static("application/json"),
16558 )
16559 .headers(header_map)
16560 .build()?;
16561 let info = OperationInfo {
16562 operation_id: "create_chart",
16563 };
16564 self.pre(&mut request, &info).await?;
16565 let result = self.exec(request, &info).await;
16566 self.post(&result, &info).await?;
16567 let response = result?;
16568 match response.status().as_u16() {
16569 201u16 => ResponseValue::from_response(response).await,
16570 _ => Err(Error::UnexpectedResponse(response)),
16571 }
16572 }
16573 /**Get Ship Cooldown
16574
16575Retrieve the details of your ship's reactor cooldown. Some actions such as activating your jump drive, scanning, or extracting resources taxes your reactor and results in a cooldown.
16576
16577Your ship cannot perform additional actions until your cooldown has expired. The duration of your cooldown is relative to the power consumption of the related modules or mounts for the action taken.
16578
16579Response returns a 204 status code (no-content) when the ship has no cooldown.
16580
16581Sends a `GET` request to `/my/ships/{shipSymbol}/cooldown`
16582
16583Arguments:
16584- `ship_symbol`: The symbol of the ship.
16585*/
16586 pub async fn get_ship_cooldown<'a>(
16587 &'a self,
16588 ship_symbol: &'a str,
16589 ) -> Result<ResponseValue<types::GetShipCooldownResponse>, Error<()>> {
16590 let url = format!(
16591 "{}/my/ships/{}/cooldown", self.baseurl, encode_path(& ship_symbol
16592 .to_string()),
16593 );
16594 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16595 header_map
16596 .append(
16597 ::reqwest::header::HeaderName::from_static("api-version"),
16598 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16599 );
16600 #[allow(unused_mut)]
16601 let mut request = self
16602 .client
16603 .get(url)
16604 .header(
16605 ::reqwest::header::ACCEPT,
16606 ::reqwest::header::HeaderValue::from_static("application/json"),
16607 )
16608 .headers(header_map)
16609 .build()?;
16610 let info = OperationInfo {
16611 operation_id: "get_ship_cooldown",
16612 };
16613 self.pre(&mut request, &info).await?;
16614 let result = self.exec(request, &info).await;
16615 self.post(&result, &info).await?;
16616 let response = result?;
16617 match response.status().as_u16() {
16618 200u16 => ResponseValue::from_response(response).await,
16619 _ => Err(Error::UnexpectedResponse(response)),
16620 }
16621 }
16622 /**Dock Ship
16623
16624Attempt to dock your ship at its current location. Docking will only succeed if your ship is capable of docking at the time of the request.
16625
16626Docked ships can access elements in their current location, such as the market or a shipyard, but cannot do actions that require the ship to be above surface such as navigating or extracting.
16627
16628The endpoint is idempotent - successive calls will succeed even if the ship is already docked.
16629
16630Sends a `POST` request to `/my/ships/{shipSymbol}/dock`
16631
16632Arguments:
16633- `ship_symbol`: The symbol of the ship.
16634*/
16635 pub async fn dock_ship<'a>(
16636 &'a self,
16637 ship_symbol: &'a str,
16638 ) -> Result<ResponseValue<types::DockShip200Response>, Error<()>> {
16639 let url = format!(
16640 "{}/my/ships/{}/dock", self.baseurl, encode_path(& ship_symbol.to_string()),
16641 );
16642 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16643 header_map
16644 .append(
16645 ::reqwest::header::HeaderName::from_static("api-version"),
16646 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16647 );
16648 #[allow(unused_mut)]
16649 let mut request = self
16650 .client
16651 .post(url)
16652 .header(
16653 ::reqwest::header::ACCEPT,
16654 ::reqwest::header::HeaderValue::from_static("application/json"),
16655 )
16656 .headers(header_map)
16657 .build()?;
16658 let info = OperationInfo {
16659 operation_id: "dock_ship",
16660 };
16661 self.pre(&mut request, &info).await?;
16662 let result = self.exec(request, &info).await;
16663 self.post(&result, &info).await?;
16664 let response = result?;
16665 match response.status().as_u16() {
16666 200u16 => ResponseValue::from_response(response).await,
16667 _ => Err(Error::UnexpectedResponse(response)),
16668 }
16669 }
16670 /**Extract Resources
16671
16672Extract resources from a waypoint that can be extracted, such as asteroid fields, into your ship. Send an optional survey as the payload to target specific yields.
16673
16674The ship must be in orbit to be able to extract and must have mining equipments installed that can extract goods, such as the `Gas Siphon` mount for gas-based goods or `Mining Laser` mount for ore-based goods.
16675
16676The survey property is now deprecated. See the `extract/survey` endpoint for more details.
16677
16678Sends a `POST` request to `/my/ships/{shipSymbol}/extract`
16679
16680Arguments:
16681- `ship_symbol`: The symbol of the ship.
16682*/
16683 pub async fn extract_resources<'a>(
16684 &'a self,
16685 ship_symbol: &'a str,
16686 ) -> Result<ResponseValue<types::ExtractResourcesResponse>, Error<()>> {
16687 let url = format!(
16688 "{}/my/ships/{}/extract", self.baseurl, encode_path(& ship_symbol
16689 .to_string()),
16690 );
16691 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16692 header_map
16693 .append(
16694 ::reqwest::header::HeaderName::from_static("api-version"),
16695 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16696 );
16697 #[allow(unused_mut)]
16698 let mut request = self
16699 .client
16700 .post(url)
16701 .header(
16702 ::reqwest::header::ACCEPT,
16703 ::reqwest::header::HeaderValue::from_static("application/json"),
16704 )
16705 .headers(header_map)
16706 .build()?;
16707 let info = OperationInfo {
16708 operation_id: "extract_resources",
16709 };
16710 self.pre(&mut request, &info).await?;
16711 let result = self.exec(request, &info).await;
16712 self.post(&result, &info).await?;
16713 let response = result?;
16714 match response.status().as_u16() {
16715 201u16 => ResponseValue::from_response(response).await,
16716 _ => Err(Error::UnexpectedResponse(response)),
16717 }
16718 }
16719 /**Extract Resources with Survey
16720
16721Use a survey when extracting resources from a waypoint. This endpoint requires a survey as the payload, which allows your ship to extract specific yields.
16722
16723Send the full survey object as the payload which will be validated according to the signature. If the signature is invalid, or any properties of the survey are changed, the request will fail.
16724
16725Sends a `POST` request to `/my/ships/{shipSymbol}/extract/survey`
16726
16727Arguments:
16728- `ship_symbol`: The symbol of the ship.
16729- `body`
16730*/
16731 pub async fn extract_resources_with_survey<'a>(
16732 &'a self,
16733 ship_symbol: &'a str,
16734 body: &'a types::Survey,
16735 ) -> Result<ResponseValue<types::ExtractResourcesWithSurveyResponse>, Error<()>> {
16736 let url = format!(
16737 "{}/my/ships/{}/extract/survey", self.baseurl, encode_path(& ship_symbol
16738 .to_string()),
16739 );
16740 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16741 header_map
16742 .append(
16743 ::reqwest::header::HeaderName::from_static("api-version"),
16744 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16745 );
16746 #[allow(unused_mut)]
16747 let mut request = self
16748 .client
16749 .post(url)
16750 .header(
16751 ::reqwest::header::ACCEPT,
16752 ::reqwest::header::HeaderValue::from_static("application/json"),
16753 )
16754 .json(&body)
16755 .headers(header_map)
16756 .build()?;
16757 let info = OperationInfo {
16758 operation_id: "extract_resources_with_survey",
16759 };
16760 self.pre(&mut request, &info).await?;
16761 let result = self.exec(request, &info).await;
16762 self.post(&result, &info).await?;
16763 let response = result?;
16764 match response.status().as_u16() {
16765 201u16 => ResponseValue::from_response(response).await,
16766 _ => Err(Error::UnexpectedResponse(response)),
16767 }
16768 }
16769 /**Jettison Cargo
16770
16771Jettison cargo from your ship's cargo hold.
16772
16773Sends a `POST` request to `/my/ships/{shipSymbol}/jettison`
16774
16775Arguments:
16776- `ship_symbol`: The symbol of the ship.
16777- `body`
16778*/
16779 pub async fn jettison<'a>(
16780 &'a self,
16781 ship_symbol: &'a str,
16782 body: &'a types::JettisonBody,
16783 ) -> Result<ResponseValue<types::JettisonResponse>, Error<()>> {
16784 let url = format!(
16785 "{}/my/ships/{}/jettison", self.baseurl, encode_path(& ship_symbol
16786 .to_string()),
16787 );
16788 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16789 header_map
16790 .append(
16791 ::reqwest::header::HeaderName::from_static("api-version"),
16792 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16793 );
16794 #[allow(unused_mut)]
16795 let mut request = self
16796 .client
16797 .post(url)
16798 .header(
16799 ::reqwest::header::ACCEPT,
16800 ::reqwest::header::HeaderValue::from_static("application/json"),
16801 )
16802 .json(&body)
16803 .headers(header_map)
16804 .build()?;
16805 let info = OperationInfo {
16806 operation_id: "jettison",
16807 };
16808 self.pre(&mut request, &info).await?;
16809 let result = self.exec(request, &info).await;
16810 self.post(&result, &info).await?;
16811 let response = result?;
16812 match response.status().as_u16() {
16813 200u16 => ResponseValue::from_response(response).await,
16814 _ => Err(Error::UnexpectedResponse(response)),
16815 }
16816 }
16817 /**Jump Ship
16818
16819Jump your ship instantly to a target connected waypoint. The ship must be in orbit to execute a jump.
16820
16821A unit of antimatter is purchased and consumed from the market when jumping. The price of antimatter is determined by the market and is subject to change. A ship can only jump to connected waypoints
16822
16823Sends a `POST` request to `/my/ships/{shipSymbol}/jump`
16824
16825Arguments:
16826- `ship_symbol`: The symbol of the ship.
16827- `body`
16828*/
16829 pub async fn jump_ship<'a>(
16830 &'a self,
16831 ship_symbol: &'a str,
16832 body: &'a types::JumpShipBody,
16833 ) -> Result<ResponseValue<types::JumpShipResponse>, Error<()>> {
16834 let url = format!(
16835 "{}/my/ships/{}/jump", self.baseurl, encode_path(& ship_symbol.to_string()),
16836 );
16837 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16838 header_map
16839 .append(
16840 ::reqwest::header::HeaderName::from_static("api-version"),
16841 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16842 );
16843 #[allow(unused_mut)]
16844 let mut request = self
16845 .client
16846 .post(url)
16847 .header(
16848 ::reqwest::header::ACCEPT,
16849 ::reqwest::header::HeaderValue::from_static("application/json"),
16850 )
16851 .json(&body)
16852 .headers(header_map)
16853 .build()?;
16854 let info = OperationInfo {
16855 operation_id: "jump_ship",
16856 };
16857 self.pre(&mut request, &info).await?;
16858 let result = self.exec(request, &info).await;
16859 self.post(&result, &info).await?;
16860 let response = result?;
16861 match response.status().as_u16() {
16862 200u16 => ResponseValue::from_response(response).await,
16863 _ => Err(Error::UnexpectedResponse(response)),
16864 }
16865 }
16866 /**Get Ship Modules
16867
16868Get the modules installed on a ship.
16869
16870Sends a `GET` request to `/my/ships/{shipSymbol}/modules`
16871
16872Arguments:
16873- `ship_symbol`: The symbol of the ship.
16874*/
16875 pub async fn get_ship_modules<'a>(
16876 &'a self,
16877 ship_symbol: &'a str,
16878 ) -> Result<ResponseValue<types::GetShipModulesResponse>, Error<()>> {
16879 let url = format!(
16880 "{}/my/ships/{}/modules", self.baseurl, encode_path(& ship_symbol
16881 .to_string()),
16882 );
16883 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16884 header_map
16885 .append(
16886 ::reqwest::header::HeaderName::from_static("api-version"),
16887 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16888 );
16889 #[allow(unused_mut)]
16890 let mut request = self
16891 .client
16892 .get(url)
16893 .header(
16894 ::reqwest::header::ACCEPT,
16895 ::reqwest::header::HeaderValue::from_static("application/json"),
16896 )
16897 .headers(header_map)
16898 .build()?;
16899 let info = OperationInfo {
16900 operation_id: "get_ship_modules",
16901 };
16902 self.pre(&mut request, &info).await?;
16903 let result = self.exec(request, &info).await;
16904 self.post(&result, &info).await?;
16905 let response = result?;
16906 match response.status().as_u16() {
16907 200u16 => ResponseValue::from_response(response).await,
16908 _ => Err(Error::UnexpectedResponse(response)),
16909 }
16910 }
16911 /**Install Ship Module
16912
16913Install a module on a ship. The module must be in your cargo.
16914
16915Sends a `POST` request to `/my/ships/{shipSymbol}/modules/install`
16916
16917Arguments:
16918- `ship_symbol`: The symbol of the ship.
16919- `body`
16920*/
16921 pub async fn install_ship_module<'a>(
16922 &'a self,
16923 ship_symbol: &'a str,
16924 body: &'a types::InstallShipModuleBody,
16925 ) -> Result<ResponseValue<types::InstallShipModuleResponse>, Error<()>> {
16926 let url = format!(
16927 "{}/my/ships/{}/modules/install", self.baseurl, encode_path(& ship_symbol
16928 .to_string()),
16929 );
16930 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16931 header_map
16932 .append(
16933 ::reqwest::header::HeaderName::from_static("api-version"),
16934 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16935 );
16936 #[allow(unused_mut)]
16937 let mut request = self
16938 .client
16939 .post(url)
16940 .header(
16941 ::reqwest::header::ACCEPT,
16942 ::reqwest::header::HeaderValue::from_static("application/json"),
16943 )
16944 .json(&body)
16945 .headers(header_map)
16946 .build()?;
16947 let info = OperationInfo {
16948 operation_id: "install_ship_module",
16949 };
16950 self.pre(&mut request, &info).await?;
16951 let result = self.exec(request, &info).await;
16952 self.post(&result, &info).await?;
16953 let response = result?;
16954 match response.status().as_u16() {
16955 201u16 => ResponseValue::from_response(response).await,
16956 _ => Err(Error::UnexpectedResponse(response)),
16957 }
16958 }
16959 /**Remove Ship Module
16960
16961Remove a module from a ship. The module will be placed in cargo.
16962
16963Sends a `POST` request to `/my/ships/{shipSymbol}/modules/remove`
16964
16965Arguments:
16966- `ship_symbol`: The symbol of the ship.
16967- `body`
16968*/
16969 pub async fn remove_ship_module<'a>(
16970 &'a self,
16971 ship_symbol: &'a str,
16972 body: &'a types::RemoveShipModuleBody,
16973 ) -> Result<ResponseValue<types::RemoveShipModuleResponse>, Error<()>> {
16974 let url = format!(
16975 "{}/my/ships/{}/modules/remove", self.baseurl, encode_path(& ship_symbol
16976 .to_string()),
16977 );
16978 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16979 header_map
16980 .append(
16981 ::reqwest::header::HeaderName::from_static("api-version"),
16982 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
16983 );
16984 #[allow(unused_mut)]
16985 let mut request = self
16986 .client
16987 .post(url)
16988 .header(
16989 ::reqwest::header::ACCEPT,
16990 ::reqwest::header::HeaderValue::from_static("application/json"),
16991 )
16992 .json(&body)
16993 .headers(header_map)
16994 .build()?;
16995 let info = OperationInfo {
16996 operation_id: "remove_ship_module",
16997 };
16998 self.pre(&mut request, &info).await?;
16999 let result = self.exec(request, &info).await;
17000 self.post(&result, &info).await?;
17001 let response = result?;
17002 match response.status().as_u16() {
17003 201u16 => ResponseValue::from_response(response).await,
17004 _ => Err(Error::UnexpectedResponse(response)),
17005 }
17006 }
17007 /**Get Mounts
17008
17009Get the mounts installed on a ship.
17010
17011Sends a `GET` request to `/my/ships/{shipSymbol}/mounts`
17012
17013Arguments:
17014- `ship_symbol`: The symbol of the ship.
17015*/
17016 pub async fn get_mounts<'a>(
17017 &'a self,
17018 ship_symbol: &'a str,
17019 ) -> Result<ResponseValue<types::GetMounts200Response>, Error<()>> {
17020 let url = format!(
17021 "{}/my/ships/{}/mounts", self.baseurl, encode_path(& ship_symbol
17022 .to_string()),
17023 );
17024 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17025 header_map
17026 .append(
17027 ::reqwest::header::HeaderName::from_static("api-version"),
17028 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17029 );
17030 #[allow(unused_mut)]
17031 let mut request = self
17032 .client
17033 .get(url)
17034 .header(
17035 ::reqwest::header::ACCEPT,
17036 ::reqwest::header::HeaderValue::from_static("application/json"),
17037 )
17038 .headers(header_map)
17039 .build()?;
17040 let info = OperationInfo {
17041 operation_id: "get_mounts",
17042 };
17043 self.pre(&mut request, &info).await?;
17044 let result = self.exec(request, &info).await;
17045 self.post(&result, &info).await?;
17046 let response = result?;
17047 match response.status().as_u16() {
17048 200u16 => ResponseValue::from_response(response).await,
17049 _ => Err(Error::UnexpectedResponse(response)),
17050 }
17051 }
17052 /**Install Mount
17053
17054Install a mount on a ship.
17055
17056In order to install a mount, the ship must be docked and located in a waypoint that has a `Shipyard` trait. The ship also must have the mount to install in its cargo hold.
17057
17058An installation fee will be deduced by the Shipyard for installing the mount on the ship.
17059
17060Sends a `POST` request to `/my/ships/{shipSymbol}/mounts/install`
17061
17062Arguments:
17063- `ship_symbol`: The symbol of the ship.
17064- `body`
17065*/
17066 pub async fn install_mount<'a>(
17067 &'a self,
17068 ship_symbol: &'a str,
17069 body: &'a types::InstallMountRequest,
17070 ) -> Result<ResponseValue<types::InstallMount201Response>, Error<()>> {
17071 let url = format!(
17072 "{}/my/ships/{}/mounts/install", self.baseurl, encode_path(& ship_symbol
17073 .to_string()),
17074 );
17075 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17076 header_map
17077 .append(
17078 ::reqwest::header::HeaderName::from_static("api-version"),
17079 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17080 );
17081 #[allow(unused_mut)]
17082 let mut request = self
17083 .client
17084 .post(url)
17085 .header(
17086 ::reqwest::header::ACCEPT,
17087 ::reqwest::header::HeaderValue::from_static("application/json"),
17088 )
17089 .json(&body)
17090 .headers(header_map)
17091 .build()?;
17092 let info = OperationInfo {
17093 operation_id: "install_mount",
17094 };
17095 self.pre(&mut request, &info).await?;
17096 let result = self.exec(request, &info).await;
17097 self.post(&result, &info).await?;
17098 let response = result?;
17099 match response.status().as_u16() {
17100 201u16 => ResponseValue::from_response(response).await,
17101 _ => Err(Error::UnexpectedResponse(response)),
17102 }
17103 }
17104 /**Remove Mount
17105
17106Remove a mount from a ship.
17107
17108The ship must be docked in a waypoint that has the `Shipyard` trait, and must have the desired mount that it wish to remove installed.
17109
17110A removal fee will be deduced from the agent by the Shipyard.
17111
17112Sends a `POST` request to `/my/ships/{shipSymbol}/mounts/remove`
17113
17114Arguments:
17115- `ship_symbol`: The symbol of the ship.
17116- `body`
17117*/
17118 pub async fn remove_mount<'a>(
17119 &'a self,
17120 ship_symbol: &'a str,
17121 body: &'a types::RemoveMountRequest,
17122 ) -> Result<ResponseValue<types::RemoveMount201Response>, Error<()>> {
17123 let url = format!(
17124 "{}/my/ships/{}/mounts/remove", self.baseurl, encode_path(& ship_symbol
17125 .to_string()),
17126 );
17127 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17128 header_map
17129 .append(
17130 ::reqwest::header::HeaderName::from_static("api-version"),
17131 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17132 );
17133 #[allow(unused_mut)]
17134 let mut request = self
17135 .client
17136 .post(url)
17137 .header(
17138 ::reqwest::header::ACCEPT,
17139 ::reqwest::header::HeaderValue::from_static("application/json"),
17140 )
17141 .json(&body)
17142 .headers(header_map)
17143 .build()?;
17144 let info = OperationInfo {
17145 operation_id: "remove_mount",
17146 };
17147 self.pre(&mut request, &info).await?;
17148 let result = self.exec(request, &info).await;
17149 self.post(&result, &info).await?;
17150 let response = result?;
17151 match response.status().as_u16() {
17152 201u16 => ResponseValue::from_response(response).await,
17153 _ => Err(Error::UnexpectedResponse(response)),
17154 }
17155 }
17156 /**Get Ship Nav
17157
17158Get the current nav status of a ship.
17159
17160Sends a `GET` request to `/my/ships/{shipSymbol}/nav`
17161
17162Arguments:
17163- `ship_symbol`: The symbol of the ship.
17164*/
17165 pub async fn get_ship_nav<'a>(
17166 &'a self,
17167 ship_symbol: &'a str,
17168 ) -> Result<ResponseValue<types::GetShipNavResponse>, Error<()>> {
17169 let url = format!(
17170 "{}/my/ships/{}/nav", self.baseurl, encode_path(& ship_symbol.to_string()),
17171 );
17172 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17173 header_map
17174 .append(
17175 ::reqwest::header::HeaderName::from_static("api-version"),
17176 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17177 );
17178 #[allow(unused_mut)]
17179 let mut request = self
17180 .client
17181 .get(url)
17182 .header(
17183 ::reqwest::header::ACCEPT,
17184 ::reqwest::header::HeaderValue::from_static("application/json"),
17185 )
17186 .headers(header_map)
17187 .build()?;
17188 let info = OperationInfo {
17189 operation_id: "get_ship_nav",
17190 };
17191 self.pre(&mut request, &info).await?;
17192 let result = self.exec(request, &info).await;
17193 self.post(&result, &info).await?;
17194 let response = result?;
17195 match response.status().as_u16() {
17196 200u16 => ResponseValue::from_response(response).await,
17197 _ => Err(Error::UnexpectedResponse(response)),
17198 }
17199 }
17200 /**Patch Ship Nav
17201
17202Update the nav configuration of a ship.
17203
17204Currently only supports configuring the Flight Mode of the ship, which affects its speed and fuel consumption.
17205
17206Sends a `PATCH` request to `/my/ships/{shipSymbol}/nav`
17207
17208Arguments:
17209- `ship_symbol`: The symbol of the ship.
17210- `body`
17211*/
17212 pub async fn patch_ship_nav<'a>(
17213 &'a self,
17214 ship_symbol: &'a str,
17215 body: &'a types::PatchShipNavBody,
17216 ) -> Result<ResponseValue<types::PatchShipNavResponse>, Error<()>> {
17217 let url = format!(
17218 "{}/my/ships/{}/nav", self.baseurl, encode_path(& ship_symbol.to_string()),
17219 );
17220 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17221 header_map
17222 .append(
17223 ::reqwest::header::HeaderName::from_static("api-version"),
17224 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17225 );
17226 #[allow(unused_mut)]
17227 let mut request = self
17228 .client
17229 .patch(url)
17230 .header(
17231 ::reqwest::header::ACCEPT,
17232 ::reqwest::header::HeaderValue::from_static("application/json"),
17233 )
17234 .json(&body)
17235 .headers(header_map)
17236 .build()?;
17237 let info = OperationInfo {
17238 operation_id: "patch_ship_nav",
17239 };
17240 self.pre(&mut request, &info).await?;
17241 let result = self.exec(request, &info).await;
17242 self.post(&result, &info).await?;
17243 let response = result?;
17244 match response.status().as_u16() {
17245 200u16 => ResponseValue::from_response(response).await,
17246 _ => Err(Error::UnexpectedResponse(response)),
17247 }
17248 }
17249 /**Navigate Ship
17250
17251Navigate to a target destination. The ship must be in orbit to use this function. The destination waypoint must be within the same system as the ship's current location. Navigating will consume the necessary fuel from the ship's manifest based on the distance to the target waypoint.
17252
17253The returned response will detail the route information including the expected time of arrival. Most ship actions are unavailable until the ship has arrived at it's destination.
17254
17255To travel between systems, see the ship's Warp or Jump actions.
17256
17257Sends a `POST` request to `/my/ships/{shipSymbol}/navigate`
17258
17259Arguments:
17260- `ship_symbol`: The symbol of the ship.
17261- `body`
17262*/
17263 pub async fn navigate_ship<'a>(
17264 &'a self,
17265 ship_symbol: &'a str,
17266 body: &'a types::NavigateShipBody,
17267 ) -> Result<ResponseValue<types::NavigateShipResponse>, Error<()>> {
17268 let url = format!(
17269 "{}/my/ships/{}/navigate", self.baseurl, encode_path(& ship_symbol
17270 .to_string()),
17271 );
17272 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17273 header_map
17274 .append(
17275 ::reqwest::header::HeaderName::from_static("api-version"),
17276 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17277 );
17278 #[allow(unused_mut)]
17279 let mut request = self
17280 .client
17281 .post(url)
17282 .header(
17283 ::reqwest::header::ACCEPT,
17284 ::reqwest::header::HeaderValue::from_static("application/json"),
17285 )
17286 .json(&body)
17287 .headers(header_map)
17288 .build()?;
17289 let info = OperationInfo {
17290 operation_id: "navigate_ship",
17291 };
17292 self.pre(&mut request, &info).await?;
17293 let result = self.exec(request, &info).await;
17294 self.post(&result, &info).await?;
17295 let response = result?;
17296 match response.status().as_u16() {
17297 200u16 => ResponseValue::from_response(response).await,
17298 _ => Err(Error::UnexpectedResponse(response)),
17299 }
17300 }
17301 /**Negotiate Contract
17302
17303Negotiate a new contract with the HQ.
17304
17305In order to negotiate a new contract, an agent must not have ongoing or offered contracts over the allowed maximum amount. Currently the maximum contracts an agent can have at a time is 1.
17306
17307Once a contract is negotiated, it is added to the list of contracts offered to the agent, which the agent can then accept.
17308
17309The ship must be present at any waypoint with a faction present to negotiate a contract with that faction.
17310
17311Sends a `POST` request to `/my/ships/{shipSymbol}/negotiate/contract`
17312
17313Arguments:
17314- `ship_symbol`: The symbol of the ship.
17315*/
17316 pub async fn negotiate_contract<'a>(
17317 &'a self,
17318 ship_symbol: &'a str,
17319 ) -> Result<ResponseValue<types::NegotiateContract201Response>, Error<()>> {
17320 let url = format!(
17321 "{}/my/ships/{}/negotiate/contract", self.baseurl, encode_path(& ship_symbol
17322 .to_string()),
17323 );
17324 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17325 header_map
17326 .append(
17327 ::reqwest::header::HeaderName::from_static("api-version"),
17328 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17329 );
17330 #[allow(unused_mut)]
17331 let mut request = self
17332 .client
17333 .post(url)
17334 .header(
17335 ::reqwest::header::ACCEPT,
17336 ::reqwest::header::HeaderValue::from_static("application/json"),
17337 )
17338 .headers(header_map)
17339 .build()?;
17340 let info = OperationInfo {
17341 operation_id: "negotiate_contract",
17342 };
17343 self.pre(&mut request, &info).await?;
17344 let result = self.exec(request, &info).await;
17345 self.post(&result, &info).await?;
17346 let response = result?;
17347 match response.status().as_u16() {
17348 201u16 => ResponseValue::from_response(response).await,
17349 _ => Err(Error::UnexpectedResponse(response)),
17350 }
17351 }
17352 /**Orbit Ship
17353
17354Attempt to move your ship into orbit at its current location. The request will only succeed if your ship is capable of moving into orbit at the time of the request.
17355
17356Orbiting ships are able to do actions that require the ship to be above surface such as navigating or extracting, but cannot access elements in their current waypoint, such as the market or a shipyard.
17357
17358The endpoint is idempotent - successive calls will succeed even if the ship is already in orbit.
17359
17360Sends a `POST` request to `/my/ships/{shipSymbol}/orbit`
17361
17362*/
17363 pub async fn orbit_ship<'a>(
17364 &'a self,
17365 ship_symbol: &'a str,
17366 ) -> Result<ResponseValue<types::OrbitShip200Response>, Error<()>> {
17367 let url = format!(
17368 "{}/my/ships/{}/orbit", self.baseurl, encode_path(& ship_symbol.to_string()),
17369 );
17370 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17371 header_map
17372 .append(
17373 ::reqwest::header::HeaderName::from_static("api-version"),
17374 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17375 );
17376 #[allow(unused_mut)]
17377 let mut request = self
17378 .client
17379 .post(url)
17380 .header(
17381 ::reqwest::header::ACCEPT,
17382 ::reqwest::header::HeaderValue::from_static("application/json"),
17383 )
17384 .headers(header_map)
17385 .build()?;
17386 let info = OperationInfo {
17387 operation_id: "orbit_ship",
17388 };
17389 self.pre(&mut request, &info).await?;
17390 let result = self.exec(request, &info).await;
17391 self.post(&result, &info).await?;
17392 let response = result?;
17393 match response.status().as_u16() {
17394 200u16 => ResponseValue::from_response(response).await,
17395 _ => Err(Error::UnexpectedResponse(response)),
17396 }
17397 }
17398 /**Purchase Cargo
17399
17400Purchase cargo from a market.
17401
17402The ship must be docked in a waypoint that has `Marketplace` trait, and the market must be selling a good to be able to purchase it.
17403
17404The maximum amount of units of a good that can be purchased in each transaction are denoted by the `tradeVolume` value of the good, which can be viewed by using the Get Market action.
17405
17406Purchased goods are added to the ship's cargo hold.
17407
17408Sends a `POST` request to `/my/ships/{shipSymbol}/purchase`
17409
17410Arguments:
17411- `ship_symbol`: The symbol of the ship.
17412- `body`
17413*/
17414 pub async fn purchase_cargo<'a>(
17415 &'a self,
17416 ship_symbol: &'a str,
17417 body: &'a types::PurchaseCargoRequest,
17418 ) -> Result<ResponseValue<types::PurchaseCargo201Response>, Error<()>> {
17419 let url = format!(
17420 "{}/my/ships/{}/purchase", self.baseurl, encode_path(& ship_symbol
17421 .to_string()),
17422 );
17423 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17424 header_map
17425 .append(
17426 ::reqwest::header::HeaderName::from_static("api-version"),
17427 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17428 );
17429 #[allow(unused_mut)]
17430 let mut request = self
17431 .client
17432 .post(url)
17433 .header(
17434 ::reqwest::header::ACCEPT,
17435 ::reqwest::header::HeaderValue::from_static("application/json"),
17436 )
17437 .json(&body)
17438 .headers(header_map)
17439 .build()?;
17440 let info = OperationInfo {
17441 operation_id: "purchase_cargo",
17442 };
17443 self.pre(&mut request, &info).await?;
17444 let result = self.exec(request, &info).await;
17445 self.post(&result, &info).await?;
17446 let response = result?;
17447 match response.status().as_u16() {
17448 201u16 => ResponseValue::from_response(response).await,
17449 _ => Err(Error::UnexpectedResponse(response)),
17450 }
17451 }
17452 /**Ship Refine
17453
17454Attempt to refine the raw materials on your ship. The request will only succeed if your ship is capable of refining at the time of the request. In order to be able to refine, a ship must have goods that can be refined and have installed a `Refinery` module that can refine it.
17455
17456When refining, 100 basic goods will be converted into 10 processed goods.
17457
17458Sends a `POST` request to `/my/ships/{shipSymbol}/refine`
17459
17460Arguments:
17461- `ship_symbol`: The symbol of the ship.
17462- `body`
17463*/
17464 pub async fn ship_refine<'a>(
17465 &'a self,
17466 ship_symbol: &'a str,
17467 body: &'a types::ShipRefineBody,
17468 ) -> Result<ResponseValue<types::ShipRefine201Response>, Error<()>> {
17469 let url = format!(
17470 "{}/my/ships/{}/refine", self.baseurl, encode_path(& ship_symbol
17471 .to_string()),
17472 );
17473 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17474 header_map
17475 .append(
17476 ::reqwest::header::HeaderName::from_static("api-version"),
17477 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17478 );
17479 #[allow(unused_mut)]
17480 let mut request = self
17481 .client
17482 .post(url)
17483 .header(
17484 ::reqwest::header::ACCEPT,
17485 ::reqwest::header::HeaderValue::from_static("application/json"),
17486 )
17487 .json(&body)
17488 .headers(header_map)
17489 .build()?;
17490 let info = OperationInfo {
17491 operation_id: "ship_refine",
17492 };
17493 self.pre(&mut request, &info).await?;
17494 let result = self.exec(request, &info).await;
17495 self.post(&result, &info).await?;
17496 let response = result?;
17497 match response.status().as_u16() {
17498 201u16 => ResponseValue::from_response(response).await,
17499 _ => Err(Error::UnexpectedResponse(response)),
17500 }
17501 }
17502 /**Refuel Ship
17503
17504Refuel your ship by buying fuel from the local market.
17505
17506Requires the ship to be docked in a waypoint that has the `Marketplace` trait, and the market must be selling fuel in order to refuel.
17507
17508Each fuel bought from the market replenishes 100 units in your ship's fuel.
17509
17510Ships will always be refuel to their frame's maximum fuel capacity when using this action.
17511
17512Sends a `POST` request to `/my/ships/{shipSymbol}/refuel`
17513
17514Arguments:
17515- `ship_symbol`: The symbol of the ship.
17516- `body`
17517*/
17518 pub async fn refuel_ship<'a>(
17519 &'a self,
17520 ship_symbol: &'a str,
17521 body: &'a types::RefuelShipBody,
17522 ) -> Result<ResponseValue<types::RefuelShipResponse>, Error<()>> {
17523 let url = format!(
17524 "{}/my/ships/{}/refuel", self.baseurl, encode_path(& ship_symbol
17525 .to_string()),
17526 );
17527 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17528 header_map
17529 .append(
17530 ::reqwest::header::HeaderName::from_static("api-version"),
17531 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17532 );
17533 #[allow(unused_mut)]
17534 let mut request = self
17535 .client
17536 .post(url)
17537 .header(
17538 ::reqwest::header::ACCEPT,
17539 ::reqwest::header::HeaderValue::from_static("application/json"),
17540 )
17541 .json(&body)
17542 .headers(header_map)
17543 .build()?;
17544 let info = OperationInfo {
17545 operation_id: "refuel_ship",
17546 };
17547 self.pre(&mut request, &info).await?;
17548 let result = self.exec(request, &info).await;
17549 self.post(&result, &info).await?;
17550 let response = result?;
17551 match response.status().as_u16() {
17552 200u16 => ResponseValue::from_response(response).await,
17553 _ => Err(Error::UnexpectedResponse(response)),
17554 }
17555 }
17556 /**Get Repair Ship
17557
17558Get the cost of repairing a ship. Requires the ship to be docked at a waypoint that has the `Shipyard` trait.
17559
17560Sends a `GET` request to `/my/ships/{shipSymbol}/repair`
17561
17562Arguments:
17563- `ship_symbol`: The symbol of the ship.
17564*/
17565 pub async fn get_repair_ship<'a>(
17566 &'a self,
17567 ship_symbol: &'a str,
17568 ) -> Result<ResponseValue<types::GetRepairShipResponse>, Error<()>> {
17569 let url = format!(
17570 "{}/my/ships/{}/repair", self.baseurl, encode_path(& ship_symbol
17571 .to_string()),
17572 );
17573 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17574 header_map
17575 .append(
17576 ::reqwest::header::HeaderName::from_static("api-version"),
17577 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17578 );
17579 #[allow(unused_mut)]
17580 let mut request = self
17581 .client
17582 .get(url)
17583 .header(
17584 ::reqwest::header::ACCEPT,
17585 ::reqwest::header::HeaderValue::from_static("application/json"),
17586 )
17587 .headers(header_map)
17588 .build()?;
17589 let info = OperationInfo {
17590 operation_id: "get_repair_ship",
17591 };
17592 self.pre(&mut request, &info).await?;
17593 let result = self.exec(request, &info).await;
17594 self.post(&result, &info).await?;
17595 let response = result?;
17596 match response.status().as_u16() {
17597 200u16 => ResponseValue::from_response(response).await,
17598 _ => Err(Error::UnexpectedResponse(response)),
17599 }
17600 }
17601 /**Repair Ship
17602
17603Repair a ship, restoring the ship to maximum condition. The ship must be docked at a waypoint that has the `Shipyard` trait in order to use this function. To preview the cost of repairing the ship, use the Get action.
17604
17605Sends a `POST` request to `/my/ships/{shipSymbol}/repair`
17606
17607Arguments:
17608- `ship_symbol`: The symbol of the ship.
17609*/
17610 pub async fn repair_ship<'a>(
17611 &'a self,
17612 ship_symbol: &'a str,
17613 ) -> Result<ResponseValue<types::RepairShipResponse>, Error<()>> {
17614 let url = format!(
17615 "{}/my/ships/{}/repair", self.baseurl, encode_path(& ship_symbol
17616 .to_string()),
17617 );
17618 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17619 header_map
17620 .append(
17621 ::reqwest::header::HeaderName::from_static("api-version"),
17622 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17623 );
17624 #[allow(unused_mut)]
17625 let mut request = self
17626 .client
17627 .post(url)
17628 .header(
17629 ::reqwest::header::ACCEPT,
17630 ::reqwest::header::HeaderValue::from_static("application/json"),
17631 )
17632 .headers(header_map)
17633 .build()?;
17634 let info = OperationInfo {
17635 operation_id: "repair_ship",
17636 };
17637 self.pre(&mut request, &info).await?;
17638 let result = self.exec(request, &info).await;
17639 self.post(&result, &info).await?;
17640 let response = result?;
17641 match response.status().as_u16() {
17642 200u16 => ResponseValue::from_response(response).await,
17643 _ => Err(Error::UnexpectedResponse(response)),
17644 }
17645 }
17646 /**Scan Ships
17647
17648Scan for nearby ships, retrieving information for all ships in range.
17649
17650Requires a ship to have the `Sensor Array` mount installed to use.
17651
17652The ship will enter a cooldown after using this function, during which it cannot execute certain actions.
17653
17654Sends a `POST` request to `/my/ships/{shipSymbol}/scan/ships`
17655
17656Arguments:
17657- `ship_symbol`: The symbol of the ship.
17658*/
17659 pub async fn create_ship_ship_scan<'a>(
17660 &'a self,
17661 ship_symbol: &'a str,
17662 ) -> Result<ResponseValue<types::CreateShipShipScanResponse>, Error<()>> {
17663 let url = format!(
17664 "{}/my/ships/{}/scan/ships", self.baseurl, encode_path(& ship_symbol
17665 .to_string()),
17666 );
17667 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17668 header_map
17669 .append(
17670 ::reqwest::header::HeaderName::from_static("api-version"),
17671 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17672 );
17673 #[allow(unused_mut)]
17674 let mut request = self
17675 .client
17676 .post(url)
17677 .header(
17678 ::reqwest::header::ACCEPT,
17679 ::reqwest::header::HeaderValue::from_static("application/json"),
17680 )
17681 .headers(header_map)
17682 .build()?;
17683 let info = OperationInfo {
17684 operation_id: "create_ship_ship_scan",
17685 };
17686 self.pre(&mut request, &info).await?;
17687 let result = self.exec(request, &info).await;
17688 self.post(&result, &info).await?;
17689 let response = result?;
17690 match response.status().as_u16() {
17691 201u16 => ResponseValue::from_response(response).await,
17692 _ => Err(Error::UnexpectedResponse(response)),
17693 }
17694 }
17695 /**Scan Systems
17696
17697Scan for nearby systems, retrieving information on the systems' distance from the ship and their waypoints. Requires a ship to have the `Sensor Array` mount installed to use.
17698
17699The ship will enter a cooldown after using this function, during which it cannot execute certain actions.
17700
17701Sends a `POST` request to `/my/ships/{shipSymbol}/scan/systems`
17702
17703Arguments:
17704- `ship_symbol`: The symbol of the ship.
17705*/
17706 pub async fn create_ship_system_scan<'a>(
17707 &'a self,
17708 ship_symbol: &'a str,
17709 ) -> Result<ResponseValue<types::CreateShipSystemScanResponse>, Error<()>> {
17710 let url = format!(
17711 "{}/my/ships/{}/scan/systems", self.baseurl, encode_path(& ship_symbol
17712 .to_string()),
17713 );
17714 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17715 header_map
17716 .append(
17717 ::reqwest::header::HeaderName::from_static("api-version"),
17718 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17719 );
17720 #[allow(unused_mut)]
17721 let mut request = self
17722 .client
17723 .post(url)
17724 .header(
17725 ::reqwest::header::ACCEPT,
17726 ::reqwest::header::HeaderValue::from_static("application/json"),
17727 )
17728 .headers(header_map)
17729 .build()?;
17730 let info = OperationInfo {
17731 operation_id: "create_ship_system_scan",
17732 };
17733 self.pre(&mut request, &info).await?;
17734 let result = self.exec(request, &info).await;
17735 self.post(&result, &info).await?;
17736 let response = result?;
17737 match response.status().as_u16() {
17738 201u16 => ResponseValue::from_response(response).await,
17739 _ => Err(Error::UnexpectedResponse(response)),
17740 }
17741 }
17742 /**Scan Waypoints
17743
17744Scan for nearby waypoints, retrieving detailed information on each waypoint in range. Scanning uncharted waypoints will allow you to ignore their uncharted state and will list the waypoints' traits.
17745
17746Requires a ship to have the `Sensor Array` mount installed to use.
17747
17748The ship will enter a cooldown after using this function, during which it cannot execute certain actions.
17749
17750Sends a `POST` request to `/my/ships/{shipSymbol}/scan/waypoints`
17751
17752Arguments:
17753- `ship_symbol`: The symbol of the ship.
17754*/
17755 pub async fn create_ship_waypoint_scan<'a>(
17756 &'a self,
17757 ship_symbol: &'a str,
17758 ) -> Result<ResponseValue<types::CreateShipWaypointScanResponse>, Error<()>> {
17759 let url = format!(
17760 "{}/my/ships/{}/scan/waypoints", self.baseurl, encode_path(& ship_symbol
17761 .to_string()),
17762 );
17763 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17764 header_map
17765 .append(
17766 ::reqwest::header::HeaderName::from_static("api-version"),
17767 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17768 );
17769 #[allow(unused_mut)]
17770 let mut request = self
17771 .client
17772 .post(url)
17773 .header(
17774 ::reqwest::header::ACCEPT,
17775 ::reqwest::header::HeaderValue::from_static("application/json"),
17776 )
17777 .headers(header_map)
17778 .build()?;
17779 let info = OperationInfo {
17780 operation_id: "create_ship_waypoint_scan",
17781 };
17782 self.pre(&mut request, &info).await?;
17783 let result = self.exec(request, &info).await;
17784 self.post(&result, &info).await?;
17785 let response = result?;
17786 match response.status().as_u16() {
17787 201u16 => ResponseValue::from_response(response).await,
17788 _ => Err(Error::UnexpectedResponse(response)),
17789 }
17790 }
17791 /**Get Scrap Ship
17792
17793Get the value of scrapping a ship. Requires the ship to be docked at a waypoint that has the `Shipyard` trait.
17794
17795Sends a `GET` request to `/my/ships/{shipSymbol}/scrap`
17796
17797Arguments:
17798- `ship_symbol`: The symbol of the ship.
17799*/
17800 pub async fn get_scrap_ship<'a>(
17801 &'a self,
17802 ship_symbol: &'a str,
17803 ) -> Result<ResponseValue<types::GetScrapShipResponse>, Error<()>> {
17804 let url = format!(
17805 "{}/my/ships/{}/scrap", self.baseurl, encode_path(& ship_symbol.to_string()),
17806 );
17807 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17808 header_map
17809 .append(
17810 ::reqwest::header::HeaderName::from_static("api-version"),
17811 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17812 );
17813 #[allow(unused_mut)]
17814 let mut request = self
17815 .client
17816 .get(url)
17817 .header(
17818 ::reqwest::header::ACCEPT,
17819 ::reqwest::header::HeaderValue::from_static("application/json"),
17820 )
17821 .headers(header_map)
17822 .build()?;
17823 let info = OperationInfo {
17824 operation_id: "get_scrap_ship",
17825 };
17826 self.pre(&mut request, &info).await?;
17827 let result = self.exec(request, &info).await;
17828 self.post(&result, &info).await?;
17829 let response = result?;
17830 match response.status().as_u16() {
17831 200u16 => ResponseValue::from_response(response).await,
17832 _ => Err(Error::UnexpectedResponse(response)),
17833 }
17834 }
17835 /**Scrap Ship
17836
17837Scrap a ship, removing it from the game and receiving a portion of the ship's value back in credits. The ship must be docked in a waypoint that has the `Shipyard` trait to be scrapped.
17838
17839Sends a `POST` request to `/my/ships/{shipSymbol}/scrap`
17840
17841Arguments:
17842- `ship_symbol`: The symbol of the ship.
17843*/
17844 pub async fn scrap_ship<'a>(
17845 &'a self,
17846 ship_symbol: &'a str,
17847 ) -> Result<ResponseValue<types::ScrapShipResponse>, Error<()>> {
17848 let url = format!(
17849 "{}/my/ships/{}/scrap", self.baseurl, encode_path(& ship_symbol.to_string()),
17850 );
17851 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17852 header_map
17853 .append(
17854 ::reqwest::header::HeaderName::from_static("api-version"),
17855 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17856 );
17857 #[allow(unused_mut)]
17858 let mut request = self
17859 .client
17860 .post(url)
17861 .header(
17862 ::reqwest::header::ACCEPT,
17863 ::reqwest::header::HeaderValue::from_static("application/json"),
17864 )
17865 .headers(header_map)
17866 .build()?;
17867 let info = OperationInfo {
17868 operation_id: "scrap_ship",
17869 };
17870 self.pre(&mut request, &info).await?;
17871 let result = self.exec(request, &info).await;
17872 self.post(&result, &info).await?;
17873 let response = result?;
17874 match response.status().as_u16() {
17875 200u16 => ResponseValue::from_response(response).await,
17876 _ => Err(Error::UnexpectedResponse(response)),
17877 }
17878 }
17879 /**Sell Cargo
17880
17881Sell cargo in your ship to a market that trades this cargo. The ship must be docked in a waypoint that has the `Marketplace` trait in order to use this function.
17882
17883Sends a `POST` request to `/my/ships/{shipSymbol}/sell`
17884
17885Arguments:
17886- `ship_symbol`: The symbol of the ship.
17887- `body`
17888*/
17889 pub async fn sell_cargo<'a>(
17890 &'a self,
17891 ship_symbol: &'a str,
17892 body: &'a types::SellCargoRequest,
17893 ) -> Result<ResponseValue<types::SellCargo201Response>, Error<()>> {
17894 let url = format!(
17895 "{}/my/ships/{}/sell", self.baseurl, encode_path(& ship_symbol.to_string()),
17896 );
17897 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17898 header_map
17899 .append(
17900 ::reqwest::header::HeaderName::from_static("api-version"),
17901 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17902 );
17903 #[allow(unused_mut)]
17904 let mut request = self
17905 .client
17906 .post(url)
17907 .header(
17908 ::reqwest::header::ACCEPT,
17909 ::reqwest::header::HeaderValue::from_static("application/json"),
17910 )
17911 .json(&body)
17912 .headers(header_map)
17913 .build()?;
17914 let info = OperationInfo {
17915 operation_id: "sell_cargo",
17916 };
17917 self.pre(&mut request, &info).await?;
17918 let result = self.exec(request, &info).await;
17919 self.post(&result, &info).await?;
17920 let response = result?;
17921 match response.status().as_u16() {
17922 201u16 => ResponseValue::from_response(response).await,
17923 _ => Err(Error::UnexpectedResponse(response)),
17924 }
17925 }
17926 /**Siphon Resources
17927
17928Siphon gases or other resources from gas giants.
17929
17930The ship must be in orbit to be able to siphon and must have siphon mounts and a gas processor installed.
17931
17932Sends a `POST` request to `/my/ships/{shipSymbol}/siphon`
17933
17934Arguments:
17935- `ship_symbol`: The symbol of the ship.
17936*/
17937 pub async fn siphon_resources<'a>(
17938 &'a self,
17939 ship_symbol: &'a str,
17940 ) -> Result<ResponseValue<types::SiphonResourcesResponse>, Error<()>> {
17941 let url = format!(
17942 "{}/my/ships/{}/siphon", self.baseurl, encode_path(& ship_symbol
17943 .to_string()),
17944 );
17945 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17946 header_map
17947 .append(
17948 ::reqwest::header::HeaderName::from_static("api-version"),
17949 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
17950 );
17951 #[allow(unused_mut)]
17952 let mut request = self
17953 .client
17954 .post(url)
17955 .header(
17956 ::reqwest::header::ACCEPT,
17957 ::reqwest::header::HeaderValue::from_static("application/json"),
17958 )
17959 .headers(header_map)
17960 .build()?;
17961 let info = OperationInfo {
17962 operation_id: "siphon_resources",
17963 };
17964 self.pre(&mut request, &info).await?;
17965 let result = self.exec(request, &info).await;
17966 self.post(&result, &info).await?;
17967 let response = result?;
17968 match response.status().as_u16() {
17969 201u16 => ResponseValue::from_response(response).await,
17970 _ => Err(Error::UnexpectedResponse(response)),
17971 }
17972 }
17973 /**Create Survey
17974
17975Create surveys on a waypoint that can be extracted such as asteroid fields. A survey focuses on specific types of deposits from the extracted location. When ships extract using this survey, they are guaranteed to procure a high amount of one of the goods in the survey.
17976
17977In order to use a survey, send the entire survey details in the body of the extract request.
17978
17979Each survey may have multiple deposits, and if a symbol shows up more than once, that indicates a higher chance of extracting that resource.
17980
17981Your ship will enter a cooldown after surveying in which it is unable to perform certain actions. Surveys will eventually expire after a period of time or will be exhausted after being extracted several times based on the survey's size. Multiple ships can use the same survey for extraction.
17982
17983A ship must have the `Surveyor` mount installed in order to use this function.
17984
17985Sends a `POST` request to `/my/ships/{shipSymbol}/survey`
17986
17987Arguments:
17988- `ship_symbol`: The symbol of the ship.
17989*/
17990 pub async fn create_survey<'a>(
17991 &'a self,
17992 ship_symbol: &'a str,
17993 ) -> Result<ResponseValue<types::CreateSurveyResponse>, Error<()>> {
17994 let url = format!(
17995 "{}/my/ships/{}/survey", self.baseurl, encode_path(& ship_symbol
17996 .to_string()),
17997 );
17998 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17999 header_map
18000 .append(
18001 ::reqwest::header::HeaderName::from_static("api-version"),
18002 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18003 );
18004 #[allow(unused_mut)]
18005 let mut request = self
18006 .client
18007 .post(url)
18008 .header(
18009 ::reqwest::header::ACCEPT,
18010 ::reqwest::header::HeaderValue::from_static("application/json"),
18011 )
18012 .headers(header_map)
18013 .build()?;
18014 let info = OperationInfo {
18015 operation_id: "create_survey",
18016 };
18017 self.pre(&mut request, &info).await?;
18018 let result = self.exec(request, &info).await;
18019 self.post(&result, &info).await?;
18020 let response = result?;
18021 match response.status().as_u16() {
18022 201u16 => ResponseValue::from_response(response).await,
18023 _ => Err(Error::UnexpectedResponse(response)),
18024 }
18025 }
18026 /**Transfer Cargo
18027
18028Transfer cargo between ships.
18029
18030The receiving ship must be in the same waypoint as the transferring ship, and it must able to hold the additional cargo after the transfer is complete. Both ships also must be in the same state, either both are docked or both are orbiting.
18031
18032The response body's cargo shows the cargo of the transferring ship after the transfer is complete.
18033
18034Sends a `POST` request to `/my/ships/{shipSymbol}/transfer`
18035
18036Arguments:
18037- `ship_symbol`: The symbol of the ship.
18038- `body`
18039*/
18040 pub async fn transfer_cargo<'a>(
18041 &'a self,
18042 ship_symbol: &'a str,
18043 body: &'a types::TransferCargoRequest,
18044 ) -> Result<ResponseValue<types::TransferCargo200Response>, Error<()>> {
18045 let url = format!(
18046 "{}/my/ships/{}/transfer", self.baseurl, encode_path(& ship_symbol
18047 .to_string()),
18048 );
18049 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18050 header_map
18051 .append(
18052 ::reqwest::header::HeaderName::from_static("api-version"),
18053 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18054 );
18055 #[allow(unused_mut)]
18056 let mut request = self
18057 .client
18058 .post(url)
18059 .header(
18060 ::reqwest::header::ACCEPT,
18061 ::reqwest::header::HeaderValue::from_static("application/json"),
18062 )
18063 .json(&body)
18064 .headers(header_map)
18065 .build()?;
18066 let info = OperationInfo {
18067 operation_id: "transfer_cargo",
18068 };
18069 self.pre(&mut request, &info).await?;
18070 let result = self.exec(request, &info).await;
18071 self.post(&result, &info).await?;
18072 let response = result?;
18073 match response.status().as_u16() {
18074 200u16 => ResponseValue::from_response(response).await,
18075 _ => Err(Error::UnexpectedResponse(response)),
18076 }
18077 }
18078 /**Warp Ship
18079
18080Warp your ship to a target destination in another system. The ship must be in orbit to use this function and must have the `Warp Drive` module installed. Warping will consume the necessary fuel from the ship's manifest.
18081
18082The returned response will detail the route information including the expected time of arrival. Most ship actions are unavailable until the ship has arrived at its destination.
18083
18084Sends a `POST` request to `/my/ships/{shipSymbol}/warp`
18085
18086Arguments:
18087- `ship_symbol`: The symbol of the ship.
18088- `body`
18089*/
18090 pub async fn warp_ship<'a>(
18091 &'a self,
18092 ship_symbol: &'a str,
18093 body: &'a types::WarpShipBody,
18094 ) -> Result<ResponseValue<types::WarpShipResponse>, Error<()>> {
18095 let url = format!(
18096 "{}/my/ships/{}/warp", self.baseurl, encode_path(& ship_symbol.to_string()),
18097 );
18098 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18099 header_map
18100 .append(
18101 ::reqwest::header::HeaderName::from_static("api-version"),
18102 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18103 );
18104 #[allow(unused_mut)]
18105 let mut request = self
18106 .client
18107 .post(url)
18108 .header(
18109 ::reqwest::header::ACCEPT,
18110 ::reqwest::header::HeaderValue::from_static("application/json"),
18111 )
18112 .json(&body)
18113 .headers(header_map)
18114 .build()?;
18115 let info = OperationInfo {
18116 operation_id: "warp_ship",
18117 };
18118 self.pre(&mut request, &info).await?;
18119 let result = self.exec(request, &info).await;
18120 self.post(&result, &info).await?;
18121 let response = result?;
18122 match response.status().as_u16() {
18123 200u16 => ResponseValue::from_response(response).await,
18124 _ => Err(Error::UnexpectedResponse(response)),
18125 }
18126 }
18127 /**Register New Agent
18128
18129Creates a new agent and ties it to an account.
18130The agent symbol must consist of a 3-14 character string, and will be used to represent your agent. This symbol will prefix the symbol of every ship you own. Agent symbols will be cast to all uppercase characters.
18131
18132This new agent will be tied to a starting faction of your choice, which determines your starting location, and will be granted an authorization token, a contract with their starting faction, a command ship that can fly across space with advanced capabilities, a small probe ship that can be used for reconnaissance, and 175,000 credits.
18133
18134> #### Keep your token safe and secure
18135>
18136> Keep careful track of where you store your token. You can generate a new token from our account dashboard, but if someone else gains access to your token they will be able to use it to make API requests on your behalf until the end of the reset.
18137
18138If you are new to SpaceTraders, It is recommended to register with the COSMIC faction, a faction that is well connected to the rest of the universe. After registering, you should try our interactive [quickstart guide](https://docs.spacetraders.io/quickstart/new-game) which will walk you through a few basic API requests in just a few minutes.
18139
18140Sends a `POST` request to `/register`
18141
18142*/
18143 pub async fn register<'a>(
18144 &'a self,
18145 body: &'a types::RegisterBody,
18146 ) -> Result<ResponseValue<types::RegisterResponse>, Error<()>> {
18147 let url = format!("{}/register", self.baseurl,);
18148 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18149 header_map
18150 .append(
18151 ::reqwest::header::HeaderName::from_static("api-version"),
18152 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18153 );
18154 #[allow(unused_mut)]
18155 let mut request = self
18156 .client
18157 .post(url)
18158 .header(
18159 ::reqwest::header::ACCEPT,
18160 ::reqwest::header::HeaderValue::from_static("application/json"),
18161 )
18162 .json(&body)
18163 .headers(header_map)
18164 .build()?;
18165 let info = OperationInfo {
18166 operation_id: "register",
18167 };
18168 self.pre(&mut request, &info).await?;
18169 let result = self.exec(request, &info).await;
18170 self.post(&result, &info).await?;
18171 let response = result?;
18172 match response.status().as_u16() {
18173 201u16 => ResponseValue::from_response(response).await,
18174 _ => Err(Error::UnexpectedResponse(response)),
18175 }
18176 }
18177 /**List Systems
18178
18179Return a paginated list of all systems.
18180
18181Sends a `GET` request to `/systems`
18182
18183Arguments:
18184- `limit`: How many entries to return per page
18185- `page`: What entry offset to request
18186*/
18187 pub async fn get_systems<'a>(
18188 &'a self,
18189 limit: Option<::std::num::NonZeroU64>,
18190 page: Option<::std::num::NonZeroU64>,
18191 ) -> Result<ResponseValue<types::GetSystemsResponse>, Error<()>> {
18192 let url = format!("{}/systems", self.baseurl,);
18193 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18194 header_map
18195 .append(
18196 ::reqwest::header::HeaderName::from_static("api-version"),
18197 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18198 );
18199 #[allow(unused_mut)]
18200 let mut request = self
18201 .client
18202 .get(url)
18203 .header(
18204 ::reqwest::header::ACCEPT,
18205 ::reqwest::header::HeaderValue::from_static("application/json"),
18206 )
18207 .query(&progenitor_client::QueryParam::new("limit", &limit))
18208 .query(&progenitor_client::QueryParam::new("page", &page))
18209 .headers(header_map)
18210 .build()?;
18211 let info = OperationInfo {
18212 operation_id: "get_systems",
18213 };
18214 self.pre(&mut request, &info).await?;
18215 let result = self.exec(request, &info).await;
18216 self.post(&result, &info).await?;
18217 let response = result?;
18218 match response.status().as_u16() {
18219 200u16 => ResponseValue::from_response(response).await,
18220 _ => Err(Error::UnexpectedResponse(response)),
18221 }
18222 }
18223 /**Get System
18224
18225Get the details of a system. Requires the system to have been visited or charted.
18226
18227Sends a `GET` request to `/systems/{systemSymbol}`
18228
18229*/
18230 pub async fn get_system<'a>(
18231 &'a self,
18232 system_symbol: &'a str,
18233 ) -> Result<ResponseValue<types::GetSystemResponse>, Error<()>> {
18234 let url = format!(
18235 "{}/systems/{}", self.baseurl, encode_path(& system_symbol.to_string()),
18236 );
18237 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18238 header_map
18239 .append(
18240 ::reqwest::header::HeaderName::from_static("api-version"),
18241 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18242 );
18243 #[allow(unused_mut)]
18244 let mut request = self
18245 .client
18246 .get(url)
18247 .header(
18248 ::reqwest::header::ACCEPT,
18249 ::reqwest::header::HeaderValue::from_static("application/json"),
18250 )
18251 .headers(header_map)
18252 .build()?;
18253 let info = OperationInfo {
18254 operation_id: "get_system",
18255 };
18256 self.pre(&mut request, &info).await?;
18257 let result = self.exec(request, &info).await;
18258 self.post(&result, &info).await?;
18259 let response = result?;
18260 match response.status().as_u16() {
18261 200u16 => ResponseValue::from_response(response).await,
18262 _ => Err(Error::UnexpectedResponse(response)),
18263 }
18264 }
18265 /**List Waypoints in System
18266
18267Return a paginated list of all of the waypoints for a given system.
18268
18269If a waypoint is uncharted, it will return the `Uncharted` trait instead of its actual traits.
18270
18271Sends a `GET` request to `/systems/{systemSymbol}/waypoints`
18272
18273Arguments:
18274- `system_symbol`
18275- `limit`: How many entries to return per page
18276- `page`: What entry offset to request
18277- `traits`: Filter waypoints by one or more traits.
18278- `type_`: Filter waypoints by type.
18279*/
18280 pub async fn get_system_waypoints<'a>(
18281 &'a self,
18282 system_symbol: &'a str,
18283 limit: Option<::std::num::NonZeroU64>,
18284 page: Option<::std::num::NonZeroU64>,
18285 traits: Option<&'a types::GetSystemWaypointsTraits>,
18286 type_: Option<types::WaypointType>,
18287 ) -> Result<ResponseValue<types::GetSystemWaypointsResponse>, Error<()>> {
18288 let url = format!(
18289 "{}/systems/{}/waypoints", self.baseurl, encode_path(& system_symbol
18290 .to_string()),
18291 );
18292 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18293 header_map
18294 .append(
18295 ::reqwest::header::HeaderName::from_static("api-version"),
18296 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18297 );
18298 #[allow(unused_mut)]
18299 let mut request = self
18300 .client
18301 .get(url)
18302 .header(
18303 ::reqwest::header::ACCEPT,
18304 ::reqwest::header::HeaderValue::from_static("application/json"),
18305 )
18306 .query(&progenitor_client::QueryParam::new("limit", &limit))
18307 .query(&progenitor_client::QueryParam::new("page", &page))
18308 .query(&progenitor_client::QueryParam::new("traits", &traits))
18309 .query(&progenitor_client::QueryParam::new("type", &type_))
18310 .headers(header_map)
18311 .build()?;
18312 let info = OperationInfo {
18313 operation_id: "get_system_waypoints",
18314 };
18315 self.pre(&mut request, &info).await?;
18316 let result = self.exec(request, &info).await;
18317 self.post(&result, &info).await?;
18318 let response = result?;
18319 match response.status().as_u16() {
18320 200u16 => ResponseValue::from_response(response).await,
18321 _ => Err(Error::UnexpectedResponse(response)),
18322 }
18323 }
18324 /**Get Waypoint
18325
18326View the details of a waypoint.
18327
18328If the waypoint is uncharted, it will return the 'Uncharted' trait instead of its actual traits.
18329
18330Sends a `GET` request to `/systems/{systemSymbol}/waypoints/{waypointSymbol}`
18331
18332Arguments:
18333- `system_symbol`: The system symbol
18334- `waypoint_symbol`: The waypoint symbol
18335*/
18336 pub async fn get_waypoint<'a>(
18337 &'a self,
18338 system_symbol: &'a str,
18339 waypoint_symbol: &'a str,
18340 ) -> Result<ResponseValue<types::GetWaypointResponse>, Error<()>> {
18341 let url = format!(
18342 "{}/systems/{}/waypoints/{}", self.baseurl, encode_path(& system_symbol
18343 .to_string()), encode_path(& waypoint_symbol.to_string()),
18344 );
18345 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18346 header_map
18347 .append(
18348 ::reqwest::header::HeaderName::from_static("api-version"),
18349 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18350 );
18351 #[allow(unused_mut)]
18352 let mut request = self
18353 .client
18354 .get(url)
18355 .header(
18356 ::reqwest::header::ACCEPT,
18357 ::reqwest::header::HeaderValue::from_static("application/json"),
18358 )
18359 .headers(header_map)
18360 .build()?;
18361 let info = OperationInfo {
18362 operation_id: "get_waypoint",
18363 };
18364 self.pre(&mut request, &info).await?;
18365 let result = self.exec(request, &info).await;
18366 self.post(&result, &info).await?;
18367 let response = result?;
18368 match response.status().as_u16() {
18369 200u16 => ResponseValue::from_response(response).await,
18370 _ => Err(Error::UnexpectedResponse(response)),
18371 }
18372 }
18373 /**Get Construction Site
18374
18375Get construction details for a waypoint. Requires a waypoint with a property of `isUnderConstruction` to be true.
18376
18377Sends a `GET` request to `/systems/{systemSymbol}/waypoints/{waypointSymbol}/construction`
18378
18379Arguments:
18380- `system_symbol`: The system symbol
18381- `waypoint_symbol`: The waypoint symbol
18382*/
18383 pub async fn get_construction<'a>(
18384 &'a self,
18385 system_symbol: &'a str,
18386 waypoint_symbol: &'a str,
18387 ) -> Result<ResponseValue<types::GetConstructionResponse>, Error<()>> {
18388 let url = format!(
18389 "{}/systems/{}/waypoints/{}/construction", self.baseurl, encode_path(&
18390 system_symbol.to_string()), encode_path(& waypoint_symbol.to_string()),
18391 );
18392 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18393 header_map
18394 .append(
18395 ::reqwest::header::HeaderName::from_static("api-version"),
18396 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18397 );
18398 #[allow(unused_mut)]
18399 let mut request = self
18400 .client
18401 .get(url)
18402 .header(
18403 ::reqwest::header::ACCEPT,
18404 ::reqwest::header::HeaderValue::from_static("application/json"),
18405 )
18406 .headers(header_map)
18407 .build()?;
18408 let info = OperationInfo {
18409 operation_id: "get_construction",
18410 };
18411 self.pre(&mut request, &info).await?;
18412 let result = self.exec(request, &info).await;
18413 self.post(&result, &info).await?;
18414 let response = result?;
18415 match response.status().as_u16() {
18416 200u16 => ResponseValue::from_response(response).await,
18417 _ => Err(Error::UnexpectedResponse(response)),
18418 }
18419 }
18420 /**Supply Construction Site
18421
18422Supply a construction site with the specified good. Requires a waypoint with a property of `isUnderConstruction` to be true.
18423
18424The good must be in your ship's cargo. The good will be removed from your ship's cargo and added to the construction site's materials.
18425
18426Sends a `POST` request to `/systems/{systemSymbol}/waypoints/{waypointSymbol}/construction/supply`
18427
18428Arguments:
18429- `system_symbol`: The system symbol
18430- `waypoint_symbol`: The waypoint symbol
18431- `body`
18432*/
18433 pub async fn supply_construction<'a>(
18434 &'a self,
18435 system_symbol: &'a str,
18436 waypoint_symbol: &'a str,
18437 body: &'a types::SupplyConstructionBody,
18438 ) -> Result<ResponseValue<types::SupplyConstructionResponse>, Error<()>> {
18439 let url = format!(
18440 "{}/systems/{}/waypoints/{}/construction/supply", self.baseurl, encode_path(&
18441 system_symbol.to_string()), encode_path(& waypoint_symbol.to_string()),
18442 );
18443 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18444 header_map
18445 .append(
18446 ::reqwest::header::HeaderName::from_static("api-version"),
18447 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18448 );
18449 #[allow(unused_mut)]
18450 let mut request = self
18451 .client
18452 .post(url)
18453 .header(
18454 ::reqwest::header::ACCEPT,
18455 ::reqwest::header::HeaderValue::from_static("application/json"),
18456 )
18457 .json(&body)
18458 .headers(header_map)
18459 .build()?;
18460 let info = OperationInfo {
18461 operation_id: "supply_construction",
18462 };
18463 self.pre(&mut request, &info).await?;
18464 let result = self.exec(request, &info).await;
18465 self.post(&result, &info).await?;
18466 let response = result?;
18467 match response.status().as_u16() {
18468 201u16 => ResponseValue::from_response(response).await,
18469 _ => Err(Error::UnexpectedResponse(response)),
18470 }
18471 }
18472 /**Get Jump Gate
18473
18474Get jump gate details for a waypoint. Requires a waypoint of type `JUMP_GATE` to use.
18475
18476Waypoints connected to this jump gate can be found by querying the waypoints in the system.
18477
18478Sends a `GET` request to `/systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate`
18479
18480Arguments:
18481- `system_symbol`: The system symbol
18482- `waypoint_symbol`: The waypoint symbol
18483*/
18484 pub async fn get_jump_gate<'a>(
18485 &'a self,
18486 system_symbol: &'a str,
18487 waypoint_symbol: &'a str,
18488 ) -> Result<ResponseValue<types::GetJumpGateResponse>, Error<()>> {
18489 let url = format!(
18490 "{}/systems/{}/waypoints/{}/jump-gate", self.baseurl, encode_path(&
18491 system_symbol.to_string()), encode_path(& waypoint_symbol.to_string()),
18492 );
18493 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18494 header_map
18495 .append(
18496 ::reqwest::header::HeaderName::from_static("api-version"),
18497 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18498 );
18499 #[allow(unused_mut)]
18500 let mut request = self
18501 .client
18502 .get(url)
18503 .header(
18504 ::reqwest::header::ACCEPT,
18505 ::reqwest::header::HeaderValue::from_static("application/json"),
18506 )
18507 .headers(header_map)
18508 .build()?;
18509 let info = OperationInfo {
18510 operation_id: "get_jump_gate",
18511 };
18512 self.pre(&mut request, &info).await?;
18513 let result = self.exec(request, &info).await;
18514 self.post(&result, &info).await?;
18515 let response = result?;
18516 match response.status().as_u16() {
18517 200u16 => ResponseValue::from_response(response).await,
18518 _ => Err(Error::UnexpectedResponse(response)),
18519 }
18520 }
18521 /**Get Market
18522
18523Retrieve imports, exports and exchange data from a marketplace. Requires a waypoint that has the `Marketplace` trait to use.
18524
18525Send a ship to the waypoint to access trade good prices and recent transactions. Refer to the [Market Overview page](https://docs.spacetraders.io/game-concepts/markets) to gain better a understanding of the market in the game.
18526
18527Sends a `GET` request to `/systems/{systemSymbol}/waypoints/{waypointSymbol}/market`
18528
18529Arguments:
18530- `system_symbol`: The system symbol
18531- `waypoint_symbol`: The waypoint symbol
18532*/
18533 pub async fn get_market<'a>(
18534 &'a self,
18535 system_symbol: &'a str,
18536 waypoint_symbol: &'a str,
18537 ) -> Result<ResponseValue<types::GetMarketResponse>, Error<()>> {
18538 let url = format!(
18539 "{}/systems/{}/waypoints/{}/market", self.baseurl, encode_path(&
18540 system_symbol.to_string()), encode_path(& waypoint_symbol.to_string()),
18541 );
18542 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18543 header_map
18544 .append(
18545 ::reqwest::header::HeaderName::from_static("api-version"),
18546 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18547 );
18548 #[allow(unused_mut)]
18549 let mut request = self
18550 .client
18551 .get(url)
18552 .header(
18553 ::reqwest::header::ACCEPT,
18554 ::reqwest::header::HeaderValue::from_static("application/json"),
18555 )
18556 .headers(header_map)
18557 .build()?;
18558 let info = OperationInfo {
18559 operation_id: "get_market",
18560 };
18561 self.pre(&mut request, &info).await?;
18562 let result = self.exec(request, &info).await;
18563 self.post(&result, &info).await?;
18564 let response = result?;
18565 match response.status().as_u16() {
18566 200u16 => ResponseValue::from_response(response).await,
18567 _ => Err(Error::UnexpectedResponse(response)),
18568 }
18569 }
18570 /**Get Shipyard
18571
18572Get the shipyard for a waypoint. Requires a waypoint that has the `Shipyard` trait to use. Send a ship to the waypoint to access data on ships that are currently available for purchase and recent transactions.
18573
18574Sends a `GET` request to `/systems/{systemSymbol}/waypoints/{waypointSymbol}/shipyard`
18575
18576Arguments:
18577- `system_symbol`: The system symbol
18578- `waypoint_symbol`: The waypoint symbol
18579*/
18580 pub async fn get_shipyard<'a>(
18581 &'a self,
18582 system_symbol: &'a str,
18583 waypoint_symbol: &'a str,
18584 ) -> Result<ResponseValue<types::GetShipyardResponse>, Error<()>> {
18585 let url = format!(
18586 "{}/systems/{}/waypoints/{}/shipyard", self.baseurl, encode_path(&
18587 system_symbol.to_string()), encode_path(& waypoint_symbol.to_string()),
18588 );
18589 let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18590 header_map
18591 .append(
18592 ::reqwest::header::HeaderName::from_static("api-version"),
18593 ::reqwest::header::HeaderValue::from_static(Self::api_version()),
18594 );
18595 #[allow(unused_mut)]
18596 let mut request = self
18597 .client
18598 .get(url)
18599 .header(
18600 ::reqwest::header::ACCEPT,
18601 ::reqwest::header::HeaderValue::from_static("application/json"),
18602 )
18603 .headers(header_map)
18604 .build()?;
18605 let info = OperationInfo {
18606 operation_id: "get_shipyard",
18607 };
18608 self.pre(&mut request, &info).await?;
18609 let result = self.exec(request, &info).await;
18610 self.post(&result, &info).await?;
18611 let response = result?;
18612 match response.status().as_u16() {
18613 200u16 => ResponseValue::from_response(response).await,
18614 _ => Err(Error::UnexpectedResponse(response)),
18615 }
18616 }
18617}
18618/// Items consumers will typically use such as the Client.
18619pub mod prelude {
18620 #[allow(unused_imports)]
18621 pub use super::Client;
18622}